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

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)=>{ }).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(){ selectProject(){
this.lockIt = false this.lockIt = false
@ -646,7 +636,7 @@ export default {
this.projectId = data.data.projectManage.projectId; this.projectId = data.data.projectManage.projectId;
this.projectManage = data.data.projectManage; this.projectManage = data.data.projectManage;
this.requires = data.data.projectJudgmentVos; this.requires = data.data.projectJudgmentVos;
this.toPage(token, cid, systemId) this.$router.push('/index/list')
} }
}).catch((error)=>{ }).catch((error)=>{
}) })
@ -873,7 +863,6 @@ export default {
this.grade = '00' this.grade = '00'
this.$router.push('/index/list') this.$router.push('/index/list')
this.getBeginTime() this.getBeginTime()
this.toPage(token, cid, systemId)
}, },
checkVer() { checkVer() {

@ -1402,12 +1402,7 @@ export default {
}, },
showManage() {// showManage() {//
this.manageVisible = true; this.manageVisible = true;
const path = sessionStorage.getItem('computerPath') this.$router.push(sessionStorage.getItem('computerPath') || '/counter/list/manage/consumerClient')
if(path) {
this.$router.push(path)
}else {
this.$router.push('/counter/list/manage/consumerClient');
}
}, },
popSure(){/* 弹框-确定 */ popSure(){/* 弹框-确定 */
// //

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

@ -4,12 +4,14 @@ import util from '@/libs/util'
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
document.title = Setting.titleSuffix document.title = Setting.titleSuffix
const role = util.local.get(Setting.tokenKey) // 全局伴随参数
// if (!role && to.path !== '/login') { if (to.query.token) {
// next('/login') next()
// } else if(role && to.path == '/login') { } else {
// next('/index') next({
// } else { path: to.path,
next() query: Object.assign(from.query, to.query)
// } })
}
}); });
Loading…
Cancel
Save