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. 1248
      src/views/ProgramOptions.vue
  5. 8
      src/views/Transaction.vue

@ -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: '用户未登录,请登录后操作!',

@ -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();
},

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

File diff suppressed because it is too large Load Diff

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

Loading…
Cancel
Save