diff --git a/src/permission.js b/src/permission.js index 9696346..0c17e9c 100644 --- a/src/permission.js +++ b/src/permission.js @@ -32,18 +32,17 @@ router.beforeEach((to, from, next) => { // console.log(JSON.stringify(res)) // console.log('=== 测试跳转页面,获取个人信息 -- end ===') if (res.menus.length < 1) { - next({ path: '/welcome' }) - // Modal.error({ - // title: '提示:', - // content: '无菜单权限,请联系管理员', - // okText: '确定', - // onOk: () => { - // next({ path: '/welcome' }) - // // store.dispatch('Logout').then(() => { - // // window.location.reload() - // // }) - // } - // }) + Modal.error({ + title: '提示:', + content: '无菜单权限,请联系管理员', + okText: '确定', + onOk: () => { + next({ path: '/welcome' }) + // store.dispatch('Logout').then(() => { + // window.location.reload() + // }) + } + }) return } // eslint-disable-next-line camelcase diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 7d88c81..9d2e304 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -116,7 +116,7 @@ const user = { loginWithCode(userInfo) .then(response => { if (!response.success) { - reject(response.message) + reject(response) return } const result = response.data @@ -127,7 +127,7 @@ const user = { }) .catch(error => { console.log(error) - reject('后端未启动或代理错误') + reject(error) }) }) }, diff --git a/src/views/getway/index.vue b/src/views/getway/index.vue index 8796c53..6cbebc2 100644 --- a/src/views/getway/index.vue +++ b/src/views/getway/index.vue @@ -1,10 +1,20 @@