guhongwei 5 년 전
부모
커밋
e1bea6e9c1
1개의 변경된 파일4개의 추가작업 그리고 7개의 파일을 삭제
  1. 4 7
      src/views/login.vue

+ 4 - 7
src/views/login.vue

@@ -40,13 +40,10 @@ export default {
     },
     async submitLogin(form) {
       const res = await this.toLogin({ user: form });
-      console.log(res);
-      console.log(res);
-
-      // if (res.uid) {
-      //   if (res.role == 1 || res.role == 4 || res.role == 3) 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 == 1 || res.role == 4 || res.role == 3) window.location.href = 'http://free.liaoningdoupo.com/platadmin';
+        else window.location.href = 'http://free.liaoningdoupo.com/platlive/home.html';
+      }
     },
     async submitRegister(forms) {
       let data = this.forms;