|
@@ -143,19 +143,21 @@ export const registerBeforeRouter = async (router) => {
|
|
|
NProgress.inc()
|
|
|
const { menus, errcode, errmsg } = await getUserMeta(token)
|
|
|
// 登录信息有问题
|
|
|
- if (errcode.includes('FRAMEERROR_401')) {
|
|
|
- await ElMessageBox.alert(errmsg, i18n.global.t('common.user_confirm'), {
|
|
|
- confirmButtonText: i18n.global.t('common.re_login'),
|
|
|
- type: 'error',
|
|
|
- })
|
|
|
- next('/login')
|
|
|
- return
|
|
|
- } else if (errcode !== 0) {
|
|
|
- await ElMessageBox.alert(errmsg, i18n.global.t('common.user_confirm'), {
|
|
|
- confirmButtonText: i18n.global.t('common.re_login'),
|
|
|
- type: 'error'
|
|
|
- })
|
|
|
- location.reload()
|
|
|
+ if (errcode !== 0) {
|
|
|
+ if (errcode.includes('FRAMEERROR_401')) {
|
|
|
+ await ElMessageBox.alert(errmsg, i18n.global.t('common.user_confirm'), {
|
|
|
+ confirmButtonText: i18n.global.t('common.re_login'),
|
|
|
+ type: 'error',
|
|
|
+ })
|
|
|
+ next('/login')
|
|
|
+ return
|
|
|
+ } else {
|
|
|
+ await ElMessageBox.alert(errmsg, i18n.global.t('common.user_confirm'), {
|
|
|
+ confirmButtonText: i18n.global.t('common.re_login'),
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ location.reload()
|
|
|
+ }
|
|
|
}
|
|
|
// 菜单格式不正确
|
|
|
if (!menus) {
|