全局伴随参数,防止参数丢失

20240205
yujialong 3 years ago
parent b70dc5dfc6
commit ab82cce8b5
  1. 13
      src/components/case/index.vue
  2. 7
      src/pages/counter/list/index.vue
  3. 5
      src/pages/index/list/index.vue
  4. 18
      src/router/permission.js

@ -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() {

@ -1402,12 +1402,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(){/* 弹框-确定 */
//

@ -114,10 +114,7 @@ export default {
}
},
toPart(path){
this.$router.push({
path,
query: this.$route.query
})
this.$router.push(path)
},
showComing(){
this.comingVisible = true

@ -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)
})
}
});
Loading…
Cancel
Save