问题描述:
登录页获取短信验证码异常。
解决方法:
public/wap/first/zsff/components/base-login/index.js,找到这个文件,修改getVerifyCode()方法。
// 获取验证码
getVerifyCode: function (data) {
var vm = this;
if (!this.verifyPhone()) {
return;
}
this.count = this.TIME_COUNT;
this.timer = setInterval(function () {
vm.count--;
if (vm.count < 0) {
clearInterval(vm.timer);
vm.timer = null;
}
}, 1000);
var index = layer.load(1);
axios.post(helper.U({
c: 'auth_api',
a: 'code'
}), {
phone: this.phone,
captchaVerification: data.captchaVerification,
captchaType: 'blockPuzzle'
}).then(function (res) {
layer.msg(res.data.msg);
if (res.data.code === 400 && vm.timer) {
clearInterval(vm.timer);
vm.timer = null;
vm.count = -1;
}
}).catch(function (err) {
console.error(err);
}).then(function () {
layer.close(index);
});
},
修改完后,清除缓存。