|
|
@@ -971,9 +971,17 @@ export default { |
|
|
|
return imgUrl; |
|
|
|
} |
|
|
|
}, |
|
|
|
loadParams() { |
|
|
|
async loadParams() { |
|
|
|
let params = this.$route.query; |
|
|
|
if (params) { |
|
|
|
// 获取token |
|
|
|
if (!params.accessToken) { |
|
|
|
let authToken = await this.getAuth(); |
|
|
|
this.$store.commit("ssjlToken", authToken); |
|
|
|
} else { |
|
|
|
this.$store.commit("ssjlToken", params.accessToken); |
|
|
|
} |
|
|
|
|
|
|
|
this.emoName = this.$replaceAll(EmotionModel[params.name].name, '抑郁', '忧郁'); |
|
|
|
this.emoType = EmotionModel[params.name].type; |
|
|
|
this.uid = params.uid; |
|
|
@@ -1000,6 +1008,22 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
// 获取b端token |
|
|
|
getAuth() { |
|
|
|
let manufactorId = "5bf13062-a41e-4d00-ba14-1101aad12650"; |
|
|
|
let that = this; |
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
APICore.getAuth({ manufactorId: manufactorId }).then((res) => { |
|
|
|
let data = res.data; |
|
|
|
if (data.code === 0) { |
|
|
|
resolve(res.data.data); |
|
|
|
} else { |
|
|
|
this.$toast.fail(`${data.message}`); |
|
|
|
reject(""); |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 计算点击的天数 |
|
|
|
calcDaysByTabClick(value) { |
|
|
|
let days = ""; |
|
|
|