多租户商城-商户小程序端
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

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. export default {
  2. data() {
  3. return {
  4. disabled: false,
  5. text: this.$t('common.verificationcodetip')
  6. };
  7. },
  8. methods: {
  9. sendCode() {
  10. if (this.disabled) return;
  11. this.disabled = true;
  12. let n = 60;
  13. this.text = this.$t('common.verificationcodetip1').replace('%d',n+'');
  14. const run = setInterval(() => {
  15. n = n - 1;
  16. if (n < 0) {
  17. clearInterval(run);
  18. }
  19. this.text = this.$t('common.verificationcodetip1').replace('%d',n+'');
  20. if (n < 0) {
  21. this.disabled = false;
  22. this.text = this.$t('common.verificationcodetip3');
  23. }
  24. }, 1000);
  25. }
  26. }
  27. };