diff --git a/src/components/case/index.vue b/src/components/case/index.vue index 9278461..164e0c2 100644 --- a/src/components/case/index.vue +++ b/src/components/case/index.vue @@ -586,16 +586,6 @@ export default { }).catch((error)=>{ }) }, - // 跳转 - toPage(token, cid, systemId) { - const url = location.href - const host = url.includes('occupationlab.com') ? - `http://www.huorantech.cn/banksystem` : - process.env.NODE_ENV === 'development' ? - `http://192.168.31.155:8093` : - `http://39.108.250.202/banksystem` - location.href = `${host}/#/index/list?token=${token}&cid=${cid}&systemId=${systemId}` - }, //选择好题目 selectProject(){ this.lockIt = false @@ -646,7 +636,7 @@ export default { this.projectId = data.data.projectManage.projectId; this.projectManage = data.data.projectManage; this.requires = data.data.projectJudgmentVos; - this.toPage(token, cid, systemId) + this.$router.push('/index/list') } }).catch((error)=>{ }) @@ -873,7 +863,6 @@ export default { this.grade = '00' this.$router.push('/index/list') this.getBeginTime() - this.toPage(token, cid, systemId) }, checkVer() { diff --git a/src/pages/counter/list/index.vue b/src/pages/counter/list/index.vue index 74a926c..1b9e3d0 100644 --- a/src/pages/counter/list/index.vue +++ b/src/pages/counter/list/index.vue @@ -1528,12 +1528,7 @@ export default { }, showManage() {// 展示系统管理 this.manageVisible = true; - const path = sessionStorage.getItem('computerPath') - if(path) { - this.$router.push(path) - }else { - this.$router.push('/counter/list/manage/consumerClient'); - } + this.$router.push(sessionStorage.getItem('computerPath') || '/counter/list/manage/consumerClient') }, popSure(){/* 弹框-确定 */ // 拦截 由于下面太多没拦截的,所以在这拦截舒服 diff --git a/src/pages/index/list/index.vue b/src/pages/index/list/index.vue index 6434663..d749a61 100644 --- a/src/pages/index/list/index.vue +++ b/src/pages/index/list/index.vue @@ -114,10 +114,7 @@ export default { } }, toPart(path){ - this.$router.push({ - path, - query: this.$route.query - }) + this.$router.push(path) }, showComing(){ this.comingVisible = true diff --git a/src/router/permission.js b/src/router/permission.js index 9507649..49639a8 100644 --- a/src/router/permission.js +++ b/src/router/permission.js @@ -4,12 +4,14 @@ import util from '@/libs/util' router.beforeEach((to, from, next) => { document.title = Setting.titleSuffix - const role = util.local.get(Setting.tokenKey) - // if (!role && to.path !== '/login') { - // next('/login') - // } else if(role && to.path == '/login') { - // next('/index') - // } else { - next() - // } + // 全局伴随参数 + if (to.query.token) { + next() + } else { + next({ + path: to.path, + query: Object.assign(from.query, to.query) + }) + } + }); \ No newline at end of file