Explorar o código

使用 this.$router.go(-1) 实现登入成功后返回登入前的页面

reghao hai 6 meses
pai
achega
f58023ffc2
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      src/assets/js/mixin.js

+ 5 - 1
src/assets/js/mixin.js

@@ -185,7 +185,11 @@ export const userMixin = {
           this.$store.commit('UPDATE_USER_INFO', userInfo)
 
           // 刷新当前页面
-          this.$router.go(0)
+          // this.$router.go(0)
+          // 返回上个页面
+          this.$router.go(-1)
+          // 返回上上个页面
+          // this.$router.go(-2)
           this.userLogin = {
             principal: null,
             credential: null,