瀏覽代碼

修复token问题

test
wzl 2 月之前
父節點
當前提交
28d8749e98
共有 1 個檔案被更改,包括 13 行新增12 行删除
  1. +13
    -12
      src/views/health/psychological/reportDetails/index.vue

+ 13
- 12
src/views/health/psychological/reportDetails/index.vue 查看文件

@@ -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…
取消
儲存