|
@@ -21,7 +21,7 @@ Component({
|
|
|
this.setData({
|
|
|
...wx.getStorageSync('loginMsg')
|
|
|
});
|
|
|
- this.allowOrNot();
|
|
|
+ setTimeout(this.allowOrNot, 300)
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -65,8 +65,12 @@ Component({
|
|
|
},
|
|
|
/* 验证是否允许登录 */
|
|
|
allowOrNot() {
|
|
|
- getCurrentPages()[0].setData({
|
|
|
- disabled: (this.data.phonenumber.length > 0 && this.data.password.length > 0) ? false : true
|
|
|
+ getCurrentPages().forEach(v => {
|
|
|
+ if (['pages/login/phone'].includes(v.__route__)) {
|
|
|
+ v.setData({
|
|
|
+ disabled: this.data.phonenumber && this.data.password.length
|
|
|
+ })
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
/* 处理登录 */
|