dedsudiyu 2 年之前
父节点
当前提交
f152b543a4
共有 1 个文件被更改,包括 22 次插入26 次删除
  1. 22 26
      src/views/loginOne.vue

+ 22 - 26
src/views/loginOne.vue

@@ -95,7 +95,7 @@
                 if(response.code != 200){
                   this.text = "*"+response.msg;
                   if(response.code == 530){
-                    this.text = "*用户不存在";
+                    this.text = "*"+response.msg;
                   }
                 }else {
                   this.text = "";
@@ -144,46 +144,42 @@
         //登录
         handleLogin(){
           let self = this;
-          console.log("0")
           if(this.checkPhone(this.loginForm.username)&&this.loginForm.password){
             this.text = "";
-            console.log("1")
             this.$refs.loginForm.validate(valid => {
               if (valid) {
-                console.log("2")
                 this.loading = true;
                 this.loginForm.authType = 'mobile'
-                console.log("login",this.loginForm);
                 this.$store.dispatch("LoginPhone", this.loginForm).then((res) => {
                   if(res.code != 200){
                     this.text = "*"+res.msg;
                     if(res.code == 530){
-                      this.text = "*用户不存在";
+                      this.text = "*"+res.msg;
                     }else if(res.code == 503){
-                      this.text = "*验证码错误";
+                      this.text = "*"+res.msg;
                     }
                     this.loading = false;
                     return
                   }
-                  if(res.data.reset_password){
-                    this.$confirm('账号当前登录密码为默认密码,是否现在修改?', "提示", {
-                      confirmButtonText: "确定",
-                      cancelButtonText: "取消",
-                      type: "warning"
-                    }).then(function() {
-                      let routeData = JSON.parse(localStorage.getItem("routeData"))
-                      for(let i=0;i<routeData.length;i++){
-                        if(!routeData[i].hidden&&routeData[i].name != 'Https://www.sxitdlc.com'){
-                          store.dispatch('settings/setPageName', routeData[i].meta.title)
-                          self.$store.commit("SET_SIDEBAR_ROUTERS", routeData[i].children);
-                          self.$router.push({ path: '/comprehensive/system/mine' });
-                          break
-                        }
-                      }
-                    }).then(() => {
-                    }).catch(() => {
-                    });
-                  }
+                  // if(res.data.reset_password){
+                  //   this.$confirm('账号当前登录密码为默认密码,是否现在修改?', "提示", {
+                  //     confirmButtonText: "确定",
+                  //     cancelButtonText: "取消",
+                  //     type: "warning"
+                  //   }).then(function() {
+                  //     let routeData = JSON.parse(localStorage.getItem("routeData"))
+                  //     for(let i=0;i<routeData.length;i++){
+                  //       if(!routeData[i].hidden&&routeData[i].name != 'Https://www.sxitdlc.com'){
+                  //         store.dispatch('settings/setPageName', routeData[i].meta.title)
+                  //         self.$store.commit("SET_SIDEBAR_ROUTERS", routeData[i].children);
+                  //         self.$router.push({ path: '/comprehensive/system/mine' });
+                  //         break
+                  //       }
+                  //     }
+                  //   }).then(() => {
+                  //   }).catch(() => {
+                  //   });
+                  // }
                   if(res.data.type){
                     localStorage.setItem('userType',res.data.type)
                     localStorage.setItem('userId',res.data.user_id)