guhongwei 4 years ago
parent
commit
c2cd324bc1
3 changed files with 8 additions and 5 deletions
  1. 3 2
      src/views/adminLogin.vue
  2. 4 2
      src/views/dockLogin.vue
  3. 1 1
      src/views/webLogin.vue

+ 3 - 2
src/views/adminLogin.vue

@@ -57,12 +57,13 @@ export default {
         data.role = '0';
         const res = await this.toLogin({ user: data });
         if (res.uid) {
-          history.back();
+          this.$router.push({ path: '/superAdminCenter/index', query: { num: '1' } });
         }
       } else {
         const res = await this.toLogin({ user: this.form });
         if (res.uid) {
-          history.back();
+          // history.back();
+          this.$router.push({ path: '/superAdminCenter/index', query: { num: '1' } });
         }
       }
     },

+ 4 - 2
src/views/dockLogin.vue

@@ -52,7 +52,8 @@ export default {
       if (this.form.role == '3') {
         let res = await this.todockLogin({ user: this.form });
         if (res.uid) {
-          history.back();
+          this.$router.push({ path: '/adminCenter/index', query: { num: '1' } });
+          // history.back();
         }
       } else if (this.form.role == '8') {
         let data = {};
@@ -61,7 +62,8 @@ export default {
         data.role = this.form.role;
         let res = await this.toLogin({ user: data });
         if (res.uid) {
-          history.back();
+          this.$router.push({ path: '/vipCenter/index', query: { num: '1' } });
+          // history.back();
         }
       }
     },

+ 1 - 1
src/views/webLogin.vue

@@ -37,7 +37,7 @@ export default {
     async submitnewLogin(form) {
       let res = await this.toLogin({ user: form });
       if (res.uid) {
-        history.back();
+        this.$router.push({ path: '/userCenter/index', query: { num: '1' } });
       }
     },
     // 注册