main
xy 2 years ago
parent 5f461957ee
commit 1766e8a6eb

@ -23,9 +23,9 @@
</view>
<view class="box-text">
<scroll-view class="box-text" :scroll-y="true" @touchmove.stop>
<slot name="box-content"></slot>
</view>
</scroll-view>
</view>
</view>
@ -153,6 +153,7 @@ export default {
left: 2rpx;
}
&-text {
width: calc(100% - 32rpx - 32rpx);
max-height: 46vh;
overflow: scroll;

@ -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 => {

Loading…
Cancel
Save