346149741
2024-06-22 bf5651cc5fd25fe282d674b2996e3f3aaf98c62f
pages/companyLogin/companyLogin.vue
@@ -107,10 +107,14 @@
                  title: '正在获取验证码'
               })
               getCode({phone: this.form.phone }).then(val => {
                     this.startCountdown()
                     uni.hideLoading();
                     this.tips = `${this.countdownTime}s后重新获取`
                     uni.$u.toast('验证码已发送');
                     if(val.data.code == 200) {
                        this.startCountdown()
                        uni.hideLoading();
                        this.tips = `${this.countdownTime}s后重新获取`
                        uni.$u.toast('验证码已发送');
                     }
               }).catch(err => {
                  this.isSendCode = false
               })
            } else {
               uni.$u.toast('倒计时结束后再发送');
@@ -134,6 +138,20 @@
            }, 1000)
         },
         loging() {
            if(!this.form.phone){
               uni.showToast({
                  title: '请输入手机号',
                  icon: 'none'
               })
               return
            }
            if(!this.form.code){
               uni.showToast({
                  title: '请输入验证码',
                  icon: 'none'
               })
               return
            }
            codeLogin(this.form).then(val => {
               if(val.data.token) {
                  this.loginToken = val.data.token