|
@@ -1,7 +1,7 @@
|
|
|
let loginMsg = require("./login"),
|
|
let loginMsg = require("./login"),
|
|
|
md5 = require("../../../utils/md5"),
|
|
md5 = require("../../../utils/md5"),
|
|
|
_Http = getApp().globalData.http,
|
|
_Http = getApp().globalData.http,
|
|
|
- Check = require("../../../utils/Check"),
|
|
|
|
|
|
|
+ deleteMark = require("../../../utils/Check"),
|
|
|
downCount = null;
|
|
downCount = null;
|
|
|
|
|
|
|
|
Component({
|
|
Component({
|
|
@@ -13,7 +13,8 @@ Component({
|
|
|
phonenumber: '',
|
|
phonenumber: '',
|
|
|
password: '',
|
|
password: '',
|
|
|
showText: "获取验证码",
|
|
showText: "获取验证码",
|
|
|
- memory: true
|
|
|
|
|
|
|
+ memory: true,
|
|
|
|
|
+ focus: false
|
|
|
},
|
|
},
|
|
|
lifetimes: {
|
|
lifetimes: {
|
|
|
attached: function () {
|
|
attached: function () {
|
|
@@ -21,14 +22,19 @@ Component({
|
|
|
this.setData({
|
|
this.setData({
|
|
|
...wx.getStorageSync('loginMsg')
|
|
...wx.getStorageSync('loginMsg')
|
|
|
});
|
|
});
|
|
|
- setTimeout(this.allowOrNot, 300)
|
|
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ this.allowOrNot();
|
|
|
|
|
+ }, 100)
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
/* 获取验证码 */
|
|
/* 获取验证码 */
|
|
|
getPassword() {
|
|
getPassword() {
|
|
|
|
|
+ this.setData({
|
|
|
|
|
+ focus: false
|
|
|
|
|
+ })
|
|
|
if (this.data.showText != "获取验证码") return;
|
|
if (this.data.showText != "获取验证码") return;
|
|
|
- if (!Check.CheckPhoneNumber(this.data.phonenumber)) return;
|
|
|
|
|
|
|
+ if (!deleteMark.CheckPhoneNumber(this.data.phonenumber)) return;
|
|
|
_Http.getpassword({
|
|
_Http.getpassword({
|
|
|
"phonenumber": this.data.phonenumber,
|
|
"phonenumber": this.data.phonenumber,
|
|
|
"systemclient": "wechatsaletool"
|
|
"systemclient": "wechatsaletool"
|
|
@@ -40,7 +46,8 @@ Component({
|
|
|
})
|
|
})
|
|
|
if (res.code != 1) return;
|
|
if (res.code != 1) return;
|
|
|
this.setData({
|
|
this.setData({
|
|
|
- showText: 30
|
|
|
|
|
|
|
+ showText: 30,
|
|
|
|
|
+ focus: true
|
|
|
})
|
|
})
|
|
|
downCount = setInterval(() => {
|
|
downCount = setInterval(() => {
|
|
|
let showText = this.data.showText;
|
|
let showText = this.data.showText;
|