|
@@ -279,32 +279,32 @@
|
|
this.codeText = text;
|
|
this.codeText = text;
|
|
},
|
|
},
|
|
getCode() {
|
|
getCode() {
|
|
- if (this.form.phone) {
|
|
|
|
- this.codeLoading = true
|
|
|
|
- request({
|
|
|
|
- url: '/sailun/appStoreBasicInfo/sendCode',
|
|
|
|
- method: 'post',
|
|
|
|
- data: {
|
|
|
|
- "phoneNumber": parseInt(this.form.phone),
|
|
|
|
- "opreaType": "0"
|
|
|
|
- },
|
|
|
|
- }).then(res => {
|
|
|
|
- if (res.data.code == 0) {
|
|
|
|
- if (this.$refs.uCode.canGetCode) {
|
|
|
|
|
|
+ if (this.$u.test.mobile(this.form.phone)) {
|
|
|
|
+ if (this.$refs.uCode.canGetCode) {
|
|
|
|
+ this.codeLoading = true
|
|
|
|
+ request({
|
|
|
|
+ url: '/sailun/appStoreBasicInfo/sendCode',
|
|
|
|
+ method: 'post',
|
|
|
|
+ data: {
|
|
|
|
+ "phoneNumber": parseInt(this.form.phone),
|
|
|
|
+ "opreaType": "0"
|
|
|
|
+ },
|
|
|
|
+ }).then(res => {
|
|
|
|
+ if (res.data.code == 0) {
|
|
this.$refs.uCode.start();
|
|
this.$refs.uCode.start();
|
|
- } else {
|
|
|
|
- this.$u.toast('倒计时结束后再发送');
|
|
|
|
}
|
|
}
|
|
- }
|
|
|
|
- if (res.data.code == 500) {
|
|
|
|
- this.$u.toast(res.data.msg);
|
|
|
|
- }
|
|
|
|
- }).catch(err => {
|
|
|
|
- console.log(err)
|
|
|
|
- }).finally(() => {
|
|
|
|
- this.codeLoading = false
|
|
|
|
- // 通知验证码组件内部开始倒计时
|
|
|
|
- })
|
|
|
|
|
|
+ if (res.data.code == 500) {
|
|
|
|
+ this.$u.toast(res.data.msg);
|
|
|
|
+ }
|
|
|
|
+ }).catch(err => {
|
|
|
|
+ console.log(err)
|
|
|
|
+ }).finally(() => {
|
|
|
|
+ this.codeLoading = false
|
|
|
|
+ // 通知验证码组件内部开始倒计时
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ this.$u.toast('倒计时结束后再发送');
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
this.$u.toast('请输入手机号');
|
|
this.$u.toast('请输入手机号');
|
|
}
|
|
}
|