diff --git a/src/permission.js b/src/permission.js index 0e124be..2dbbd62 100644 --- a/src/permission.js +++ b/src/permission.js @@ -28,10 +28,11 @@ router.beforeEach(async (to, from, next) => { if (hasToken) { if (to.path === '/login') { - // if is logged in, redirect to the home page - next({ - path: '/' - }) + // if is logged in, redirect to the home page + + await store.dispatch('user/resetToken'); + next(to.fullPath) + NProgress.done() } else { // determine whether the user has obtained his permission roles through getInfo diff --git a/src/views/rain/inspection/inspection.vue b/src/views/rain/inspection/inspection.vue index f8de792..09aafae 100644 --- a/src/views/rain/inspection/inspection.vue +++ b/src/views/rain/inspection/inspection.vue @@ -17,8 +17,6 @@ - - @@ -97,6 +95,9 @@ +
+ {{getUserName(scope.row)}} +
+
+ {{getUserName(scope.row)}} +