Browse Source

修复token问题

test
wzl 3 months ago
parent
commit
28d8749e98
1 changed files with 13 additions and 12 deletions
  1. +13
    -12
      src/views/health/psychological/reportDetails/index.vue

+ 13
- 12
src/views/health/psychological/reportDetails/index.vue View File

@@ -894,6 +894,7 @@ export default {
},
created() {},
mounted() {
this.initData();
/* window.addEventListener("resize", this.onResize, false); */
},
destroyed(){
@@ -977,18 +978,6 @@ export default {
async loadParams() {
let params = this.$route.query;
if (params) {
// 获取token
if (!params.accessToken) {
this.$toast.loading({
message: "数据加载中",
});
let authToken = await this.getAuth();
this.$toast.clear()
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;
@@ -1013,6 +1002,18 @@ export default {
this.$dayjs(params.date).hour(0).minute(0).second(0).format()
);
}

// 获取token
if (!params.accessToken) {
this.$toast.loading({
message: "数据加载中",
});
let authToken = await this.getAuth();
this.$toast.clear()
this.$store.commit("ssjlToken", authToken);
} else {
this.$store.commit("ssjlToken", params.accessToken);
}
}
},
// 获取b端token


Loading…
Cancel
Save