马宇豪
2024-07-22 7ac5363a676588078fdce082a45a28300479e158
pages/index/index.vue
@@ -47,7 +47,7 @@
        cstyle: {
          background: '#fff',
          padding: '10px',
          boxShadow: '0 2px 4px rgba(0,0,0,.2),0 -2px 4px rgba(255,255,255,.2),inset 0 2px 4px rgba(0,0,0,.2)',
          boxShadow: '0 2px 4px rgba(0,0,0,.2),0 -2px 4px rgba(255,255,255,.2),inset 0 2px 4px rgba(0,0,0,.1)',
          border: '1px solid #fff'
        }
         }
@@ -87,8 +87,11 @@
      },
         Login(){
            this.isLogining = true;
        this.form.password = this.base64Encode(this.form.password)
            login(this.form).then(res => {
        // this.form.password = this.base64Encode(this.form.password)
        const {username,password,code,uuid} = this.form
        const data = {username,password,code,uuid}
        data.password = this.base64Encode(data.password)
            login(data).then(res => {
               if (res.code === 200) {
                  this.isLogining = false;
                   //登录成功后
@@ -126,13 +129,13 @@
                     icon: "none",
                     title: res.message
                  });
                  this.form.name = '';
                  this.form.pwd = '';
                  this.form.username = '';
                  this.form.password = '';
                  this.isLogining = false;
               }
            }).catch(err=>{
               this.form.name = '';
               this.form.pwd = '';
          this.form.username = '';
          this.form.password = '';
               this.isLogining = false;
            })
         },