wjt
2024-06-22 a1bbf87a3bee300226d4d13416961dde9e12cdb6
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
@@ -146,15 +164,15 @@
            getInfo().then(val => {
               uni.setStorageSync('userInfo',  val.data.data)
               if(this.form.userType == '02') {
                  uni.redirectTo({
                  uni.reLaunch({
                     url:`/qiye/qiyeIndex/qiyeIndex`
                  })
               } else if(this.form.userType == '01'){
                  uni.redirectTo({
                     url:`/policy/policyIndex/policyIndex`
                  uni.reLaunch({
                     url:`/policy/policyIndex/policyIndex?id=${val.data.data.deptId}`
                  })
               } else {
                  uni.redirectTo({
                  uni.reLaunch({
                     url:`/policy/policyIndex/policyIndex`
                  })
               }