DESKTOP-CVS3R96\我恁爹
2022-11-14 f8b256ef152e54c19adb85856f62432d59c16b6e
src/page/login/login.vue
@@ -18,7 +18,7 @@
          <div class="password">
            <input type="password"  placeholder="登录密码" v-model="userPassword" @input="handleInput()" />
          </div> -->
          <el-input placeholder="请输入手机号" :size="medium" v-model="userName" clearable>
          <el-input placeholder="请输入手机号" :size="medium" maxlength="11" v-model="userName" clearable>
          </el-input>
          <el-input style="margin-top: 0.46rem;" show-password placeholder="登录密码" :size="medium" v-model="userPassword"   @input="handleInput()">
          </el-input>
@@ -53,7 +53,7 @@
    v-show="alertShow"
    :closable="closable"
    :title="texts"
    type="warning" center></el-alert>
    :type="eltype" center></el-alert>
  </div>
</template>
<script>
@@ -76,6 +76,7 @@
      medium: "medium",
      alertShow:false,
      closable:false,
      eltype:'warning',
      texts:"",
      dengl:false,
      loginBtn:false,
@@ -120,11 +121,19 @@
      if (data.status === 0) {
        this.$store.state.userInfo.phone = this.userName
        this.$store.state.userInfo.token = data.data.token
        this.texts=data.msg
        this.eltype='success'
      this.alertShow=true
      setTimeout(()=>{
        this.alertShow=false
        this.eltype='warning'
        this.$router.push('/home')
      },1000)
      this.loginBtn = false;
        window.localStorage.clear()
        window.localStorage.setItem("USERTOKEN", data.data.token);
        this.$router.push('/home')
        this.loginBtn = false;
      } else {
        this.texts=data.msg
      this.alertShow=true
@@ -134,7 +143,10 @@
      },2000)
        //Toast(data.msg)
      }
      if (navigator.vibrate) {
          // 支持
        navigator.vibrate([55]);
      }
    },
  },
  beforeDestroy() { },
@@ -336,20 +348,7 @@
    }
  }
}
/deep/.el-alert{
  width: 70%!important;
  height: 1rem!important;
  position: absolute!important;
  top: 0!important;
  bottom: 0!important;
  left: 0!important;
  right: 0!important;
  margin: auto!important;
  font-size: 0.3rem!important;
}
/deep/.el-alert__title{
  font-size: 0.3rem!important;
}
/deep/.el-input__suffix{
  width: 1rem!important;
  display: flex;