Przeglądaj źródła

修复token问题

test
wzl 2 miesięcy temu
rodzic
commit
28d8749e98
1 zmienionych plików z 13 dodań i 12 usunięć
  1. +13
    -12
      src/views/health/psychological/reportDetails/index.vue

+ 13
- 12
src/views/health/psychological/reportDetails/index.vue Wyświetl plik

@@ -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


Ładowanie…
Anuluj
Zapisz