| | |
| | | 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 |