判分点设置
-- 操作一致性规则:用户完成的功能操作与下方设置的操作点一致 -
-diff --git a/src/utils/http.js b/src/utils/http.js index ef4d4f2..295b513 100644 --- a/src/utils/http.js +++ b/src/utils/http.js @@ -18,7 +18,7 @@ if(isKd){ host = 'http://124.71.12.62:9000'; // 巢湖版 } else if (dev) { host = 'http://121.37.12.51'; - host = 'http://192.168.31.217:9000'; + // host = 'http://192.168.31.217:9000'; } } @@ -35,10 +35,9 @@ service.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8' // 请求拦截器 service.interceptors.request.use(config => { - // if (sessionStorage.getItem('token')) { - // 存在将token写入 request header - config.headers.token = store.state.token - // } + // 存在将token写入 request header + const { token } = router.currentRoute.query + config.headers.token = token ? atob(decodeURI(token)) : localStorage.getItem('token') return config; }, err => { Message.error({ @@ -106,7 +105,11 @@ function logouts(){ let referrer = store.state.referrer store.replaceState({}) sessionStorage.removeItem('kd_client_username') - location.href = referrer + if (referrer) { + location.href = referrer + } else { + window.history.back() + } } let tokenStatus = { 0: '用户未登录,请登录后操作!', diff --git a/src/views/Home.vue b/src/views/Home.vue index 642e886..0c48062 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -135,15 +135,12 @@ export default { }, }, mounted () { - console.log('当前地址=', location.host); - console.log("token=", this.$route.query.token) - console.log("systemId=", this.$route.query.systemId) this.isProcess = this.systemId == 11 || this.systemId == 12 || this.systemId == 19 - // sessionStorage.setItem('token',this.$route.query.token) - this.$route.query.token && this.$store.commit('setParam', { - token: atob(decodeURI(this.$route.query.token)), - referrer: atob(decodeURI(this.$route.query.referrer)) - }) + const { token, referrer } = this.$route.query + if (token) { + localStorage.setItem('token', atob(decodeURI(token))) + localStorage.setItem('referrer', atob(decodeURI(referrer))) + } this.initData(); }, diff --git a/src/views/Program.vue b/src/views/Program.vue index 0137089..0a10dc8 100644 --- a/src/views/Program.vue +++ b/src/views/Program.vue @@ -206,10 +206,11 @@ export default { }; }, mounted () { - this.$route.query.token && this.$store.commit('setParam', { - token: atob(decodeURI(this.$route.query.token)), - referrer: atob(decodeURI(this.$route.query.referrer)) - }); + const { token, referrer } = this.$route.query + if (token) { + localStorage.setItem('token', atob(decodeURI(token))) + localStorage.setItem('referrer', atob(decodeURI(referrer))) + } if (this.$route.query.bcId) { this.bcId = this.$route.query.bcId; this.getInfoData(this.$route.query.bcId); diff --git a/src/views/ProgramOptions.vue b/src/views/ProgramOptions.vue index 6419e0a..8846671 100644 --- a/src/views/ProgramOptions.vue +++ b/src/views/ProgramOptions.vue @@ -2,16 +2,16 @@
判分点设置
-- 操作一致性规则:用户完成的功能操作与下方设置的操作点一致 -
-+ 交易结果一致性规则:用户交易的结果需要与下面设置的交易指标要求一致 +
+- 交易结果一致性规则:用户交易的结果需要与下面设置的交易指标要求一致 -
-