|
@@ -26,9 +26,6 @@ Component({
|
|
|
setTimeout(() => {
|
|
|
this.allowOrNot();
|
|
|
}, 300)
|
|
|
- setTimeout(() => {
|
|
|
- this.allowOrNot();
|
|
|
- }, 500)
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -68,14 +65,15 @@ Component({
|
|
|
this.setData({
|
|
|
[e.target.dataset.name]: e.detail.value.trim()
|
|
|
})
|
|
|
- // this.allowOrNot();
|
|
|
+ this.allowOrNot();
|
|
|
},
|
|
|
/* 验证是否允许登录 */
|
|
|
allowOrNot() {
|
|
|
+ console.log("查询", this.data.phonenumber.length != 0)
|
|
|
getCurrentPages().forEach(v => {
|
|
|
if (['pages/login/phone'].includes(v.__route__)) {
|
|
|
v.setData({
|
|
|
- disabled: this.data.phonenumber.length != 0
|
|
|
+ disabled: this.data.phonenumber.length == 0 && this.data.password.length == 0
|
|
|
})
|
|
|
}
|
|
|
})
|