|
@@ -1,10 +1,11 @@
|
|
|
import router from './router'
|
|
|
import store from './store'
|
|
|
-import { Message } from 'element-ui'
|
|
|
+import { MessageBox, Message } from 'element-ui'
|
|
|
import NProgress from 'nprogress'
|
|
|
import 'nprogress/nprogress.css'
|
|
|
import methods from '@/utils/methodsTool';
|
|
|
import { getToken } from '@/utils/auth'
|
|
|
+import $api from "@/api/api"
|
|
|
|
|
|
NProgress.configure({ showSpinner: false })
|
|
|
|
|
@@ -49,6 +50,9 @@ router.beforeEach((to, from, next) => {
|
|
|
to.query.TenantId = sessionStorage.TenantId
|
|
|
next(to)
|
|
|
} else {
|
|
|
+ if (!to.path.includes('/user/profile')) {
|
|
|
+ checkFunc()
|
|
|
+ }
|
|
|
next()
|
|
|
}
|
|
|
}
|
|
@@ -68,7 +72,23 @@ router.beforeEach((to, from, next) => {
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
+function checkFunc() {
|
|
|
+ $api.inquireusercheckPwdTime().then(res => {
|
|
|
+ if (res.data) {
|
|
|
+ MessageBox.confirm('您已90天为修改密码,请前往修改密码', '系统提示', {
|
|
|
+ confirmButtonText: '前往修改',
|
|
|
+ showCancelButton: false,
|
|
|
+ closeOnClickModal: false,
|
|
|
+ closeOnPressEscape: false,
|
|
|
+ showClose: false,
|
|
|
+ type: 'warning'
|
|
|
+ }
|
|
|
+ ).then(() => {
|
|
|
+ location.href = '/user/profile';
|
|
|
+ }).catch(() => { });
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
router.afterEach(() => {
|
|
|
NProgress.done()
|
|
|
})
|