Commit 9d3d59e3 authored by 朱国瑞's avatar 朱国瑞

Merge branch 'master' into eu

parents c38eb073 f82345ac
...@@ -23,3 +23,5 @@ dist-ssr ...@@ -23,3 +23,5 @@ dist-ssr
*.njsproj *.njsproj
*.sln *.sln
*.sw? *.sw?
dist-eu.zip
dist.zip
This diff is collapsed.
...@@ -190,9 +190,18 @@ export default { ...@@ -190,9 +190,18 @@ export default {
pageHeight: "", pageHeight: "",
_isMobile: false, _isMobile: false,
scale: 0, scale: 0,
lying: 0 lying: 0,
config: {
apiKey: "DLab-BFAR-Coach-000001",
region: "eu",
completeUrl: "https://bfai-service-eu.d-lab-services.danone.com/demo/#/complete",
incompleteUrl: "https://bfai-service-eu.d-lab-services.danone.com/demo/#/",
sdkUrl: "https://bfai-service-eu.d-lab-services.danone.com/sdk/#/"
},
usagetrackingkey: "",
}; };
}, },
components: { components: {
lightButton lightButton
}, },
...@@ -907,23 +916,23 @@ export default { ...@@ -907,23 +916,23 @@ export default {
console.log(import.meta.env); console.log(import.meta.env);
if (camera) { if (camera) {
let apiKey = "DLab-BFAR-Coach-000001"; 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 aiParams = { let aiParams = {
env: env, env: env,
apiKey: apiKey, apiKey: this.usagetrackingkey ? this.usagetrackingkey : apiKey,
region: "eu" region: this.config.region
}; };
localStorage.setItem("aiParams", JSON.stringify(aiParams)); localStorage.setItem("aiParams", JSON.stringify(aiParams));
let openDev = this.$route.query.openDev; let openDev = this.$route.query.openDev;
localStorage.setItem( localStorage.setItem(
"completeUrl", "completeUrl",
"https://bfai-service-eu.d-lab-services.danone.com/demo/#/complete" this.config.completeUrl
); );
localStorage.setItem("incompleteUrl", "https://bfai-service-eu.d-lab-services.danone.com/demo/#/"); localStorage.setItem("incompleteUrl", this.config.incompleteUrl);
let url = let url =
"https://bfai-service-eu.d-lab-services.danone.com/sdk/#/?lying=" + this.config.sdkUrl + "?lying=" +
this.lying; this.lying;
if (openDev) { if (openDev) {
url = url + "&openDev=true"; url = url + "&openDev=true";
...@@ -951,6 +960,11 @@ export default { ...@@ -951,6 +960,11 @@ export default {
} }
}, },
created() { created() {
let usagetrackingkey = "";
if (this.$route.query.usagetrackingkey != null) {
usagetrackingkey = this.$route.query.usagetrackingkey;
}
this.usagetrackingkey = usagetrackingkey;
let lying = 0; // 默认0 为坐姿 let lying = 0; // 默认0 为坐姿
if (this.$route.query.lying != null) { if (this.$route.query.lying != null) {
lying = ~~this.$route.query.lying; lying = ~~this.$route.query.lying;
......
...@@ -140,11 +140,19 @@ export default { ...@@ -140,11 +140,19 @@ export default {
}, },
clickGestureItem(val) { clickGestureItem(val) {
let lying = Number(val.code); let lying = Number(val.code);
this.$router.push({ let usagetrackingkey = "";
path: "/introduce", if (this.$route.query.usagetrackingkey != null) {
query: { usagetrackingkey = this.$route.query.usagetrackingkey;
}
let query = {
lying: lying lying: lying
} }
if (usagetrackingkey) {
query.usagetrackingkey = usagetrackingkey;
}
this.$router.push({
path: "/introduce",
query: query
}); });
} }
}, },
......
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