guhongwei 5 years ago
parent
commit
9aa33ec786
1 changed files with 4 additions and 5 deletions
  1. 4 5
      src/views/login.vue

+ 4 - 5
src/views/login.vue

@@ -41,11 +41,10 @@ export default {
     async submitLogin(form) {
     async submitLogin(form) {
       const res = await this.toLogin({ user: form });
       const res = await this.toLogin({ user: form });
       console.log(res);
       console.log(res);
-
-      // if (res.uid) {
-      //   if (res.role == 0 || res.role == 1) window.location.href = 'http://free.liaoningdoupo.com/platadmin';
-      //   else window.location.href = 'http://free.liaoningdoupo.com/platlive/home.html';
-      // }
+      if (res.uid) {
+        if (res.role == 0 || res.role == 1) window.location.href = 'http://free.liaoningdoupo.com/platadmin';
+        else window.location.href = 'http://free.liaoningdoupo.com/platlive/home.html';
+      }
     },
     },
     async submitRegister(forms) {
     async submitRegister(forms) {
       let data = this.forms;
       let data = this.forms;