|
|
|
|
@ -131,23 +131,27 @@ import popover from "@/component/popover/index.vue";
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
sendCode() {
|
|
|
|
|
// if(!/^1[3-9]\d{9}$/.test(`192${this.inputMobile}`)) {
|
|
|
|
|
// uni.showToast({
|
|
|
|
|
// icon: 'none',
|
|
|
|
|
// title: '手机号格式不正确'
|
|
|
|
|
// })
|
|
|
|
|
// return
|
|
|
|
|
// }
|
|
|
|
|
if(!/^1[3-9]\d{9}$/.test(`192${this.inputMobile}`)) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: '手机号格式不正确'
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if(this.$refs.uCode.canGetCode) {
|
|
|
|
|
this.$refs.uCode.start()
|
|
|
|
|
this.$u.api.sendSms({
|
|
|
|
|
tempate_key: 'sms_code_template',
|
|
|
|
|
mobile: this.inputMobile
|
|
|
|
|
//`192${this.inputMobile}`
|
|
|
|
|
this.$u.api.mobileCheck({
|
|
|
|
|
mobile: `192${this.inputMobile}`
|
|
|
|
|
}).then(res => {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: res.msg
|
|
|
|
|
this.$refs.uCode.start()
|
|
|
|
|
this.$u.api.sendSms({
|
|
|
|
|
tempate_key: 'sms_code_template',
|
|
|
|
|
mobile: `192${this.inputMobile}`
|
|
|
|
|
//`192${this.inputMobile}`
|
|
|
|
|
}).then(res => {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: res.msg
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
@ -158,7 +162,7 @@ import popover from "@/component/popover/index.vue";
|
|
|
|
|
bindMobile() {
|
|
|
|
|
if(this.inputMobile && this.code && /^\d{4}$/.test(this.code)) {
|
|
|
|
|
this.$u.api.bindMobile({
|
|
|
|
|
mobile: this.inputMobile,
|
|
|
|
|
mobile: `192${this.inputMobile}`,
|
|
|
|
|
//`192${this.inputMobile}`,
|
|
|
|
|
code: this.code
|
|
|
|
|
}).then(res => {
|
|
|
|
|
|