Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
breast-feeding-ai-demo-web
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
朱国瑞
breast-feeding-ai-demo-web
Commits
2b4a467d
Commit
2b4a467d
authored
May 16, 2025
by
朱国瑞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
动态获取域名
parent
f843f995
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
index.vue
src/views/index.vue
+11
-6
No files found.
src/views/index.vue
View file @
2b4a467d
...
...
@@ -194,9 +194,10 @@ export default {
config
:
{
apiKey
:
"DLAB-customername-12345687"
,
region
:
"apac"
,
completeUrl
:
"https://bfai-service-apac-uat.d-lab-services.danone.com/demo/#/complete"
,
incompleteUrl
:
"https://bfai-service-apac-uat.d-lab-services.danone.com/demo/#/"
,
sdkUrl
:
"https://bfai-service-apac-uat.d-lab-services.danone.com/sdk/#/"
host
:
"https://bfai-service-apac-uat.d-lab-services.danone.com"
,
completeUrl
:
"/demo/#/complete"
,
incompleteUrl
:
"/demo/#/"
,
sdkUrl
:
"/sdk/#/"
},
usagetrackingkey
:
""
,
};
...
...
@@ -918,6 +919,10 @@ export default {
let
apiKey
=
this
.
config
.
apiKey
;
let
env
=
import
.
meta
.
env
.
VITE_TRACKING_ENV
;
console
.
log
(
env
);
let
host
=
this
.
config
.
host
;
let
currentDomain
=
window
.
location
.
origin
;
host
=
currentDomain
;
// 获取当前域名
let
aiParams
=
{
env
:
env
,
apiKey
:
this
.
usagetrackingkey
?
this
.
usagetrackingkey
:
apiKey
,
...
...
@@ -925,8 +930,8 @@ export default {
};
localStorage
.
setItem
(
"aiParams"
,
JSON
.
stringify
(
aiParams
));
let
openDev
=
this
.
$route
.
query
.
openDev
;
let
completeUrl
=
this
.
config
.
completeUrl
;
let
incompleteUrl
=
this
.
config
.
incompleteUrl
;
let
completeUrl
=
`
${
host
}${
this
.
config
.
completeUrl
}
`
;
let
incompleteUrl
=
`
${
host
}${
this
.
config
.
incompleteUrl
}
`
;
if
(
this
.
usagetrackingkey
)
{
completeUrl
=
completeUrl
+
"?usagetrackingkey="
+
this
.
usagetrackingkey
;
...
...
@@ -935,7 +940,7 @@ export default {
localStorage
.
setItem
(
"completeUrl"
,
completeUrl
);
localStorage
.
setItem
(
"incompleteUrl"
,
incompleteUrl
);
let
url
=
this
.
config
.
sdkUrl
+
"?lying="
+
`
${
host
}${
this
.
config
.
sdkUrl
}
`
+
"?lying="
+
this
.
lying
;
if
(
openDev
)
{
url
=
url
+
"&openDev=true"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment