|
|
@ -33,14 +33,14 @@ export const pageRoutes = [{ |
|
|
|
title: '登录' |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
path: '/loginWork', |
|
|
|
component: () => import('@/views/pages/loginWork'), |
|
|
|
name: 'loginWork', |
|
|
|
meta: { |
|
|
|
title: '工作端登录' |
|
|
|
} |
|
|
|
}, |
|
|
|
// {
|
|
|
|
// path: '/loginWork',
|
|
|
|
// component: () => import('@/views/pages/loginWork'),
|
|
|
|
// name: 'loginWork',
|
|
|
|
// meta: {
|
|
|
|
// title: '工作端登录'
|
|
|
|
// }
|
|
|
|
// },
|
|
|
|
{ |
|
|
|
path: '/indexWork', |
|
|
|
component: () => import('@/views/pages/indexWork'), |
|
|
@ -151,9 +151,9 @@ router.beforeEach((to, from, next) => { |
|
|
|
const userType = localStorage.getItem('userType') |
|
|
|
|
|
|
|
|
|
|
|
if (userType === 'work') { |
|
|
|
const customerId = localStorage.getItem('customerId') |
|
|
|
console.log('customerId:', customerId) |
|
|
|
// if (userType === 'work') {
|
|
|
|
// const customerId = localStorage.getItem('customerId')
|
|
|
|
// console.log('customerId:', customerId)
|
|
|
|
// if(customerId==='1e68188b8f7e9ab15658c164bd5b3676'){
|
|
|
|
// // if(customerId==='45687aa479955f9d06204d415238f7cc'){
|
|
|
|
// const menuList=[
|
|
|
@ -204,37 +204,37 @@ router.beforeEach((to, from, next) => { |
|
|
|
// // next({ ...to, replace: true })
|
|
|
|
// next({ ...to, replace: true })
|
|
|
|
// }else{
|
|
|
|
http |
|
|
|
.get('/gov/access/menu/nav') |
|
|
|
.then(({ |
|
|
|
data: res |
|
|
|
}) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
// Vue.prototype.$message.error(res.msg)
|
|
|
|
return next({ |
|
|
|
name: 'loginWork' |
|
|
|
}) |
|
|
|
} |
|
|
|
window.SITE_CONFIG['menuList'] = res.data |
|
|
|
fnAddDynamicMenuRoutes(window.SITE_CONFIG['menuList']) |
|
|
|
// next({ ...to, replace: true })
|
|
|
|
next({ |
|
|
|
...to, |
|
|
|
replace: true |
|
|
|
}) |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
next({ |
|
|
|
name: 'loginWork' |
|
|
|
}) |
|
|
|
}) |
|
|
|
// http
|
|
|
|
// .get('/gov/access/menu/nav')
|
|
|
|
// .then(({
|
|
|
|
// data: res
|
|
|
|
// }) => {
|
|
|
|
// if (res.code !== 0) {
|
|
|
|
// // Vue.prototype.$message.error(res.msg)
|
|
|
|
// return next({
|
|
|
|
// name: 'loginWork'
|
|
|
|
// })
|
|
|
|
// }
|
|
|
|
// window.SITE_CONFIG['menuList'] = res.data
|
|
|
|
// fnAddDynamicMenuRoutes(window.SITE_CONFIG['menuList'])
|
|
|
|
// // next({ ...to, replace: true })
|
|
|
|
// next({
|
|
|
|
// ...to,
|
|
|
|
// replace: true
|
|
|
|
// })
|
|
|
|
// })
|
|
|
|
// .catch(() => {
|
|
|
|
// next({
|
|
|
|
// name: 'loginWork'
|
|
|
|
// })
|
|
|
|
// })
|
|
|
|
// }
|
|
|
|
|
|
|
|
// localStorage.getItem('customerId')
|
|
|
|
// 1e68188b8f7e9ab15658c164bd5b3676
|
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
// } else {
|
|
|
|
http |
|
|
|
.get('/oper/access/menu/nav') |
|
|
|
.then(({ |
|
|
@ -259,7 +259,7 @@ router.beforeEach((to, from, next) => { |
|
|
|
name: 'login' |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
// }
|
|
|
|
}) |
|
|
|
|
|
|
|
/** |
|
|
|