From 72e2c20564e7df6e6995d4b642cc6ae9a381816c Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Mon, 18 Nov 2024 10:24:17 +0800 Subject: [PATCH] fix --- src/App.vue | 2 +- src/pages/myReview/theoryReview/index.vue | 13 +++++++------ src/plugins/requests/index.js | 6 +++++- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/App.vue b/src/App.vue index 4d6bda1..acd0d41 100644 --- a/src/App.vue +++ b/src/App.vue @@ -22,7 +22,7 @@ export default { }; }, created () { - location.host.includes('huorantech.cn') ? localStorage.setItem('reviewFromNakadai', '1') : localStorage.removeItem('reviewFromNakadai') // 来自中台 + location.host.includes('huorantech.cn') || Setting.isDev ? localStorage.setItem('reviewFromNakadai', '1') : localStorage.removeItem('reviewFromNakadai') // 来自中台 //在页面加载时读取localStorage里的状态信息 if (Util.local.get(Setting.storeKey)) { this.$store.replaceState(Object.assign({}, this.$store.state, Util.local.get(Setting.storeKey))); diff --git a/src/pages/myReview/theoryReview/index.vue b/src/pages/myReview/theoryReview/index.vue index 21e6eb3..c0bbb5e 100644 --- a/src/pages/myReview/theoryReview/index.vue +++ b/src/pages/myReview/theoryReview/index.vue @@ -247,7 +247,8 @@ export default { outline: [], editing: false, loading: false, - curReview: +this.$route.query.m ? 0 : '', + // curReview: +this.$route.query.m ? 0 : '', + curReview: '', reviews: [ { id: '', @@ -390,11 +391,11 @@ export default { } }) // 初始化的时候,如果没有待评阅的试题,则查询已评阅 - if (!paper.length && init) { - this.curReview = 1 - this.getData() - return false - } + // if (!paper.length && init) { + // this.curReview = 1 + // this.getData() + // return false + // } this.paper = paper this.loading = false diff --git a/src/plugins/requests/index.js b/src/plugins/requests/index.js index bca3cdd..c12c855 100644 --- a/src/plugins/requests/index.js +++ b/src/plugins/requests/index.js @@ -13,8 +13,12 @@ service.defaults.headers.post["Content-Type"] = "application/json;charset=UTF-8" // 请求拦截器 service.interceptors.request.use(config => { + console.log(33, location.pathname) let token = localStorage.getItem(inIframe || router.app._route.path === '/theoryReview' ? 'review_token' : 'expert_token') - if (token) config.headers.token = token + // let token = localStorage.getItem(location.pathname !== '/reviewCenter/' ? 'review_token' : 'expert_token') + let token1 = localStorage.getItem('review_token') + let token2 = localStorage.getItem('expert_token') + if (token || token1 || token2) config.headers.token = token || token1 || token2 return config }, err => { Util.errorMsg({