You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
665 B
27 lines
665 B
export default {
|
|
data() {
|
|
return {
|
|
disabled: false,
|
|
text: this.$t('common.verificationcodetip')
|
|
};
|
|
},
|
|
methods: {
|
|
sendCode() {
|
|
if (this.disabled) return;
|
|
this.disabled = true;
|
|
let n = 60;
|
|
this.text = this.$t('common.verificationcodetip1').replace('%d',n+'');
|
|
const run = setInterval(() => {
|
|
n = n - 1;
|
|
if (n < 0) {
|
|
clearInterval(run);
|
|
}
|
|
this.text = this.$t('common.verificationcodetip1').replace('%d',n+'');
|
|
if (n < 0) {
|
|
this.disabled = false;
|
|
this.text = this.$t('common.verificationcodetip3');
|
|
}
|
|
}, 1000);
|
|
}
|
|
}
|
|
};
|