Commit 20d69ede authored by 朱国瑞's avatar 朱国瑞

Merge branch 'master' into eu

parents 3585946b 2b4a467d
...@@ -194,9 +194,10 @@ export default { ...@@ -194,9 +194,10 @@ export default {
config: { config: {
apiKey: "DLab-BFAR-Coach-000001", apiKey: "DLab-BFAR-Coach-000001",
region: "eu", region: "eu",
completeUrl: "https://bfai-service-eu.d-lab-services.danone.com/demo/#/complete", host: "https://bfai-service-eu.d-lab-services.danone.com",
incompleteUrl: "https://bfai-service-eu.d-lab-services.danone.com/demo/#/", completeUrl: "/demo/#/complete",
sdkUrl: "https://bfai-service-eu.d-lab-services.danone.com/sdk/#/" incompleteUrl: "/demo/#/",
sdkUrl: "/sdk/#/"
}, },
usagetrackingkey: "", usagetrackingkey: "",
}; };
...@@ -919,6 +920,10 @@ export default { ...@@ -919,6 +920,10 @@ export default {
let apiKey = this.config.apiKey; let apiKey = this.config.apiKey;
let env = import.meta.env.VITE_TRACKING_ENV; let env = import.meta.env.VITE_TRACKING_ENV;
console.log(env); console.log(env);
let host = this.config.host;
let currentDomain = window.location.origin;
host = currentDomain;
// 获取当前域名
let aiParams = { let aiParams = {
env: env, env: env,
apiKey: this.usagetrackingkey ? this.usagetrackingkey : apiKey, apiKey: this.usagetrackingkey ? this.usagetrackingkey : apiKey,
...@@ -926,8 +931,8 @@ export default { ...@@ -926,8 +931,8 @@ export default {
}; };
localStorage.setItem("aiParams", JSON.stringify(aiParams)); localStorage.setItem("aiParams", JSON.stringify(aiParams));
let openDev = this.$route.query.openDev; let openDev = this.$route.query.openDev;
let completeUrl = this.config.completeUrl; let completeUrl = `${host}${this.config.completeUrl}`;
let incompleteUrl = this.config.incompleteUrl; let incompleteUrl = `${host}${this.config.incompleteUrl}`;
if (this.usagetrackingkey) { if (this.usagetrackingkey) {
completeUrl = completeUrl =
completeUrl + "?usagetrackingkey=" + this.usagetrackingkey; completeUrl + "?usagetrackingkey=" + this.usagetrackingkey;
...@@ -936,7 +941,7 @@ export default { ...@@ -936,7 +941,7 @@ export default {
localStorage.setItem("completeUrl", completeUrl); localStorage.setItem("completeUrl", completeUrl);
localStorage.setItem("incompleteUrl", incompleteUrl); localStorage.setItem("incompleteUrl", incompleteUrl);
let url = let url =
this.config.sdkUrl + "?lying=" + `${host}${this.config.sdkUrl}` + "?lying=" +
this.lying; this.lying;
if (openDev) { if (openDev) {
url = url + "&openDev=true"; url = url + "&openDev=true";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment