yujialong 9 months ago
parent ad4113d1f1
commit 03ce15ee99
  1. 15
      src/utils/http.js
  2. 13
      src/views/Home.vue
  3. 9
      src/views/Program.vue
  4. 1246
      src/views/ProgramOptions.vue
  5. 8
      src/views/Transaction.vue

@ -18,7 +18,7 @@ if(isKd){
host = 'http://124.71.12.62:9000'; // 巢湖版 host = 'http://124.71.12.62:9000'; // 巢湖版
} else if (dev) { } else if (dev) {
host = 'http://121.37.12.51'; 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 => { service.interceptors.request.use(config => {
// if (sessionStorage.getItem('token')) { // 存在将token写入 request header
// 存在将token写入 request header const { token } = router.currentRoute.query
config.headers.token = store.state.token config.headers.token = token ? atob(decodeURI(token)) : localStorage.getItem('token')
// }
return config; return config;
}, err => { }, err => {
Message.error({ Message.error({
@ -106,7 +105,11 @@ function logouts(){
let referrer = store.state.referrer let referrer = store.state.referrer
store.replaceState({}) store.replaceState({})
sessionStorage.removeItem('kd_client_username') sessionStorage.removeItem('kd_client_username')
location.href = referrer if (referrer) {
location.href = referrer
} else {
window.history.back()
}
} }
let tokenStatus = { let tokenStatus = {
0: '用户未登录,请登录后操作!', 0: '用户未登录,请登录后操作!',

@ -135,15 +135,12 @@ export default {
}, },
}, },
mounted () { 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 this.isProcess = this.systemId == 11 || this.systemId == 12 || this.systemId == 19
// sessionStorage.setItem('token',this.$route.query.token) const { token, referrer } = this.$route.query
this.$route.query.token && this.$store.commit('setParam', { if (token) {
token: atob(decodeURI(this.$route.query.token)), localStorage.setItem('token', atob(decodeURI(token)))
referrer: atob(decodeURI(this.$route.query.referrer)) localStorage.setItem('referrer', atob(decodeURI(referrer)))
}) }
this.initData(); this.initData();
}, },

@ -206,10 +206,11 @@ export default {
}; };
}, },
mounted () { mounted () {
this.$route.query.token && this.$store.commit('setParam', { const { token, referrer } = this.$route.query
token: atob(decodeURI(this.$route.query.token)), if (token) {
referrer: atob(decodeURI(this.$route.query.referrer)) localStorage.setItem('token', atob(decodeURI(token)))
}); localStorage.setItem('referrer', atob(decodeURI(referrer)))
}
if (this.$route.query.bcId) { if (this.$route.query.bcId) {
this.bcId = this.$route.query.bcId; this.bcId = this.$route.query.bcId;
this.getInfoData(this.$route.query.bcId); this.getInfoData(this.$route.query.bcId);

File diff suppressed because it is too large Load Diff

@ -563,9 +563,11 @@ export default {
}) })
}, },
mounted () { mounted () {
this.$route.query.token && this.$store.commit("setParam", { const { token, referrer } = this.$route.query
token: atob(decodeURI(this.$route.query.token)) if (token) {
}); localStorage.setItem('token', atob(decodeURI(token)))
localStorage.setItem('referrer', atob(decodeURI(referrer)))
}
if (this.isSt) { if (this.isSt) {
this.leftSymbols = [ this.leftSymbols = [
{ {

Loading…
Cancel
Save