| | |
| | | <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> |
| | |
| | | v-show="alertShow" |
| | | :closable="closable" |
| | | :title="texts" |
| | | type="warning" center></el-alert> |
| | | :type="eltype" center></el-alert> |
| | | </div> |
| | | </template> |
| | | <script> |
| | |
| | | medium: "medium", |
| | | alertShow:false, |
| | | closable:false, |
| | | eltype:'warning', |
| | | texts:"", |
| | | dengl:false, |
| | | loginBtn:false, |
| | |
| | | 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 |
| | |
| | | },2000) |
| | | //Toast(data.msg) |
| | | } |
| | | |
| | | if (navigator.vibrate) { |
| | | // 支持 |
| | | navigator.vibrate([55]); |
| | | } |
| | | }, |
| | | }, |
| | | beforeDestroy() { }, |
| | |
| | | } |
| | | } |
| | | } |
| | | /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; |