Commit f82345ac authored by 朱国瑞's avatar 朱国瑞

支持使用传入的apikey

parent a6c2b12e
......@@ -190,7 +190,15 @@ export default {
pageHeight: "",
_isMobile: false,
scale: 0,
lying: 0
lying: 0,
config: {
apiKey: "DLAB-customername-12345687",
region: "apac",
completeUrl: "https://bfai-service-apac-uat.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: {
......@@ -907,23 +915,23 @@ export default {
console.log(import.meta.env);
if (camera) {
let apiKey = "DLAB-customername-12345687";
let apiKey = this.config.apiKey;
let env = import.meta.env.VITE_TRACKING_ENV;
console.log(env);
let aiParams = {
env: env,
apiKey: apiKey,
region: "apac"
apiKey: this.usagetrackingkey ? this.usagetrackingkey : apiKey,
region: this.config.region
};
localStorage.setItem("aiParams", JSON.stringify(aiParams));
let openDev = this.$route.query.openDev;
localStorage.setItem(
"completeUrl",
"https://bfai-service-apac-uat.d-lab-services.danone.com/demo/#/complete"
this.config.completeUrl
);
localStorage.setItem("incompleteUrl", "https://bfai-service-apac-uat.d-lab-services.danone.com/demo/#/");
localStorage.setItem("incompleteUrl", this.config.incompleteUrl);
let url =
"https://bfai-service-apac-uat.d-lab-services.danone.com/sdk/#/?lying=" +
this.config.sdkUrl + "?lying=" +
this.lying;
if (openDev) {
url = url + "&openDev=true";
......@@ -951,6 +959,11 @@ export default {
}
},
created() {
let usagetrackingkey = "";
if (this.$route.query.usagetrackingkey != null) {
usagetrackingkey = this.$route.query.usagetrackingkey;
}
this.usagetrackingkey = usagetrackingkey;
let lying = 0; // 默认0 为坐姿
if (this.$route.query.lying != null) {
lying = ~~this.$route.query.lying;
......
......@@ -140,11 +140,19 @@ export default {
},
clickGestureItem(val) {
let lying = Number(val.code);
let usagetrackingkey = "";
if (this.$route.query.usagetrackingkey != null) {
usagetrackingkey = this.$route.query.usagetrackingkey;
}
let query = {
lying: lying
}
if (usagetrackingkey) {
query.usagetrackingkey = usagetrackingkey;
}
this.$router.push({
path: "/introduce",
query: {
lying: lying
}
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