|
@@ -1,12 +1,14 @@
|
|
|
<template>
|
|
|
<view class="smsVerification-container">
|
|
|
- <view class="sms-title">输入短信验证码</view>
|
|
|
- <text class="sms-describe">验证码已发送至{{userPhone}},请在下方输入框内输入6位数字验证码</text>
|
|
|
- <view class="sms-item" @tap="showKeyboard=!showKeyboard">
|
|
|
- <u-message-input mode="bottomLine" :maxlength="6" v-model="value" :disabled-keyboard="true"></u-message-input>
|
|
|
- </view>
|
|
|
- <view class="sendcode-con">
|
|
|
- <text :class="['getcode-btn', isDisable ? 'grey-btn' : '']" @click="isDisable ? null : pageInit()">{{nowVal}}</text>
|
|
|
+ <view v-if="sendCode" class="">
|
|
|
+ <view class="sms-title">输入短信验证码</view>
|
|
|
+ <text class="sms-describe">验证码已发送至{{userPhone}},请在下方输入框内输入6位数字验证码</text>
|
|
|
+ <view class="sms-item" @tap="showKeyboard=!showKeyboard">
|
|
|
+ <u-message-input mode="bottomLine" :maxlength="6" v-model="value" :disabled-keyboard="true"></u-message-input>
|
|
|
+ </view>
|
|
|
+ <view class="sendcode-con">
|
|
|
+ <text :class="['getcode-btn', isDisable ? 'grey-btn' : '']" @click="isDisable ? null : pageInit()">{{nowVal}}</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<!-- <view class="btn-con">
|
|
|
<u-button class="handle-btn" type="info" size="medium" @click="cancel">取消</u-button>
|
|
@@ -15,7 +17,7 @@
|
|
|
<!-- 数字键盘 -->
|
|
|
<u-keyboard ref="uKeyboard" :dot-enabled="false" :mask="false" :tooltip="false" v-model="showKeyboard" @change="valChange" @backspace="backspace"></u-keyboard>
|
|
|
<!-- 图文验证码 -->
|
|
|
- <uni-popup ref="imageTxtPopup" type="center">
|
|
|
+ <uni-popup :maskClick="false" ref="imageTxtPopup" type="center">
|
|
|
<popup-con title="图文验证码" :popBtn="popBtn" :changeImg="changeImg" @captchaImg="captchaVerify"></popup-con>
|
|
|
</uni-popup>
|
|
|
</view>
|
|
@@ -43,6 +45,7 @@
|
|
|
changeImg: false, // 是否重新更换图形验证码
|
|
|
verifyCode: '',
|
|
|
randomCode: '', // 图片验证码随机码
|
|
|
+ sendCode: false // 短信是否发送成功
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
@@ -76,6 +79,7 @@
|
|
|
methods:{
|
|
|
pageInit () {
|
|
|
this.value = ''
|
|
|
+ this.sendCode = false
|
|
|
this.showKeyboard = false
|
|
|
this.retsetCode()
|
|
|
// 图文验证码
|
|
@@ -96,6 +100,7 @@
|
|
|
this.$refs.imageTxtPopup.close()
|
|
|
// 开启倒计时
|
|
|
this.getCodeFun()
|
|
|
+ this.sendCode = true
|
|
|
this.showKeyboard = true
|
|
|
uni.showToast({icon: 'none',title: '验证码发送成功'})
|
|
|
}else { // 验证码输入错误
|