fix: phoneIntval

修复注册页面验证码倒计时bug
This commit is contained in:
亚龙 2023-07-01 15:10:30 +08:00 committed by chuzhixin
parent 450cf5d632
commit 99784b87b4

View File

@ -160,8 +160,8 @@
}, },
beforeDestroy() { beforeDestroy() {
document.body.style.overflow = 'auto' document.body.style.overflow = 'auto'
this.getPhoneIntval = null
clearInterval(this.getPhoneIntval) clearInterval(this.getPhoneIntval)
this.getPhoneIntval = null
}, },
methods: { methods: {
getPhoneCode() { getPhoneCode() {
@ -177,8 +177,8 @@
n-- n--
this.phoneCode = '重新获取(' + n + 's)' this.phoneCode = '重新获取(' + n + 's)'
} else { } else {
this.getPhoneIntval = null
clearInterval(this.getPhoneIntval) clearInterval(this.getPhoneIntval)
this.getPhoneIntval = null
this.phoneCode = '获取验证码' this.phoneCode = '获取验证码'
this.isGetphone = false this.isGetphone = false
} }