|
|
@@ -995,8 +995,12 @@ router.beforeEach((to, from, next) => {
|
|
|
cancelButtonText: '取消'
|
|
|
})
|
|
|
.then(() => {
|
|
|
- if (info && info.status === 'DENY') {
|
|
|
+ if (store.state.personalInfo && info.status === 'PENDING') {
|
|
|
router.push('/authentication');
|
|
|
+ } else if (store.state.personalInfo && info.status === 'DENY') {
|
|
|
+ router.push('/Authenticationfail');
|
|
|
+ } else if (store.state.institutionInfo && info.status === 'DENY') {
|
|
|
+ router.push('/Authenticationsfail');
|
|
|
} else if (!info) {
|
|
|
router.push('/registration');
|
|
|
} else if (store.state.personalInfo) {
|
|
|
@@ -1005,6 +1009,17 @@ router.beforeEach((to, from, next) => {
|
|
|
router.push('/authentications');
|
|
|
}
|
|
|
})
|
|
|
+ // .then(() => {
|
|
|
+ // if (info && info.status === 'DENY') {
|
|
|
+ // router.push('/authentication');
|
|
|
+ // } else if (!info) {
|
|
|
+ // router.push('/registration');
|
|
|
+ // } else if (store.state.personalInfo) {
|
|
|
+ // router.push('/personal');
|
|
|
+ // } else {
|
|
|
+ // router.push('/authentications');
|
|
|
+ // }
|
|
|
+ // })
|
|
|
.catch(() => {});
|
|
|
} else {
|
|
|
next();
|
|
|
@@ -1021,8 +1036,13 @@ router.beforeEach((to, from, next) => {
|
|
|
cancelButtonText: '取消'
|
|
|
})
|
|
|
.then(() => {
|
|
|
- if (info && info.status === 'DENY') {
|
|
|
+ console.log(store.state.personalInfo);
|
|
|
+ if (store.state.personalInfo && info.status === 'PENDING') {
|
|
|
router.push('/authentication');
|
|
|
+ } else if (store.state.personalInfo && info.status === 'DENY') {
|
|
|
+ router.push('/Authenticationfail');
|
|
|
+ } else if (store.state.institutionInfo && info.status === 'DENY') {
|
|
|
+ router.push('/Authenticationsfail');
|
|
|
} else if (!info) {
|
|
|
router.push('/registration');
|
|
|
} else if (store.state.personalInfo) {
|
|
|
@@ -1031,6 +1051,17 @@ router.beforeEach((to, from, next) => {
|
|
|
router.push('/authentications');
|
|
|
}
|
|
|
})
|
|
|
+ // .then(() => {
|
|
|
+ // if (info && info.status === 'DENY') {
|
|
|
+ // router.push('/authentication');
|
|
|
+ // } else if (!info) {
|
|
|
+ // router.push('/registration');
|
|
|
+ // } else if (store.state.personalInfo) {
|
|
|
+ // router.push('/personal');
|
|
|
+ // } else {
|
|
|
+ // router.push('/authentications');
|
|
|
+ // }
|
|
|
+ // })
|
|
|
.catch(() => {});
|
|
|
} else {
|
|
|
next();
|