修复退出实验,跳转路径错误bug

master
yujialong 3 years ago
parent 0fb6777472
commit ce91faa0ba
  1. 2
      src/config/index.js
  2. 19
      src/views/Home.vue

@ -1,7 +1,7 @@
const isHh = location.host.includes('10.196.131.73') //是否是河海版本 const isHh = location.host.includes('10.196.131.73') //是否是河海版本
export default { export default {
/** /**
* @description 域名切换liuwan职站测试环境occupationlab.com职站正式环境10.196.131.73河海版本 * @description 域名切换120.78.198.231职站测试环境occupationlab.com职站正式环境10.196.131.73河海版本
*/ */
host: (process.env.NODE_ENV === 'development' || location.host.includes('120.78.198.231')) ? 'http://120.78.198.231:8081/' : (location.host.includes('10.196.131.73') ? 'http://10.196.131.73/' : 'http://www.occupationlab.com/'), host: (process.env.NODE_ENV === 'development' || location.host.includes('120.78.198.231')) ? 'http://120.78.198.231:8081/' : (location.host.includes('10.196.131.73') ? 'http://10.196.131.73/' : 'http://www.occupationlab.com/'),
/** /**

@ -114,7 +114,6 @@ export default {
? parseInt(sessionStorage.getItem("timer")) ? parseInt(sessionStorage.getItem("timer"))
: 0, : 0,
codeKey: 1, codeKey: 1,
host: this.$config.host
}; };
}, },
components: { components: {
@ -190,9 +189,23 @@ export default {
back() { back() {
this.leavePage() this.leavePage()
if(this.projectPermissions){ if(this.projectPermissions){
location.href = `${this.host}#/dashboard#2` //
if(location.host.includes('10.196.131.73')) { //
location.href = `http://120.78.198.231/#/ass/list`
} else if (location.host.includes('120.78.198.231')) { //
location.href = `http://120.78.198.231/#/ass/list`
} else { } else {
location.href = `${this.host}#/dashboard#1` location.href = `http://www.occupationlab.com/#/ass/list`
}
}else{
//
if(location.host.includes('10.196.131.73')) {
location.href = `http://120.78.198.231/#/ass/list`
} else if (location.host.includes('120.78.198.231')) {
location.href = `http://120.78.198.231/#/station/list`
} else {
location.href = `http://www.occupationlab.com/#/station/list`
}
} }
this.$refs.mainindex.getClearTime(); this.$refs.mainindex.getClearTime();
}, },

Loading…
Cancel
Save