sunyize před 2 roky
rodič
revize
db347c3d77
1 změnil soubory, kde provedl 13 přidání a 23 odebrání
  1. 13 23
      src/views/user/LoginAccount.vue

+ 13 - 23
src/views/user/LoginAccount.vue

@@ -106,11 +106,11 @@ import { getAction, postAction, putAction } from '@/api/manage'
              password:this.model.passwordNew
             }
             console.log("修改密码提交数据",params)
-            putAction("sys/updatePassword",params).then((res)=>{
+            putAction("/sys/updatePassword",params).then((res)=>{
               if(res.success){
                 console.log(res)
                 that.$message.success(res.message);
-                that.close();
+                that.loadData(1);
               }else{
                 that.$message.warning(res.message);
               }
@@ -204,16 +204,19 @@ import { getAction, postAction, putAction } from '@/api/manage'
             //console.log("登录参数", loginParams)
             this.Login(loginParams).then((res) => {
               //判断是否首次登录
-              let httpUrl = '/sys/loginFirst';
-              postAction(httpUrl, loginParams).then((resa) => {
-                if (!resa.success) {
-                  this.$message.error( resa.message);
-                  this.isLogin=false
-                }else {
+              // let httpUrl = '/sys/loginFirst';
+              // postAction(httpUrl, loginParams).then((resa) => {
+              //   if (!resa.success) {
+              //     this.$message.error( resa.message);
+              //     this.isLogin=false
+              //   }else {
                   this.$emit('success', res.result)
-                }
-              })
+              //   }
+              // })
             }).catch((err) => {
+              if (err.message.indexOf("修改密码")!== -1){
+                this.isLogin=false
+              }
               this.$emit('fail', err)
             });
           }else{
@@ -225,19 +228,6 @@ import { getAction, postAction, putAction } from '@/api/manage'
         const value = e.target.value
         this.confirmDirty = this.confirmDirty || !!value
       },
-      getMesFirst(loginParams){
-        let info = false;
-        let httpUrl = '/sys/loginFirst';
-        postAction(httpUrl, loginParams).then((res) => {
-          if (!res.success) {
-            this.$message.error( res.message);
-            info=true;
-            return info
-          }
-        })
-        return info;
-      },
-
 
     }