Merge branch 'master' of http://218.28.192.34:9999/r/sqys/sqys_xcx
| | |
| | | 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('倒计时结束后再发送'); |
| | |
| | | }, 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 |
| | |
| | | }, |
| | | // 校验字段 |
| | | authField(){ |
| | | |
| | | if(!this.form.companyUser) { |
| | | return '请输入姓名' |
| | | } |
| | | if(!this.form.companyPhone) { |
| | | return '请输入手机号' |
| | | } |
| | | if(!this.form.code){ |
| | | return '请输入验证码' |
| | | } |
| | | if(!this.form.companyName) { |
| | | return "请输入企业名称" |
| | | } |
| | | if(!this.form.companyCode){ |
| | | return '请输入统一社会信用代码' |
| | | } |
| | | if(!this.form.companyAddress){ |
| | | return "请输入企业地址" |
| | | } |
| | | if(!this.form.companyImg || !this.form.companyImg.length){ |
| | | return '请上传营业执照' |
| | | } |
| | | return false |
| | | }, |
| | | // 校验code |
| | | async checkCode() { |
| | |
| | | throw "校验失败" |
| | | } |
| | | }, |
| | | |
| | | // 注册接口 |
| | | async register(){ |
| | | try{ |
| | | const value = this.authField() |
| | | if(value){ |
| | | uni.showToast({ |
| | | title: value, |
| | | icon: 'none' |
| | | }) |
| | | return |
| | | } |
| | | await this.checkCode() |
| | | // this.form.companyStatus = 1 |
| | | registerCompany(this.form).then(val=>{ |
| | |
| | | this.getDicts() |
| | | this.enforceList() |
| | | }, |
| | | onShow() { |
| | | |
| | | }, |
| | | methods: { |
| | | enforceList() { |
| | | enforceList().then(val => { |