|
@@ -35,8 +35,8 @@
|
|
|
<view class="top_four">
|
|
|
<input type="number" class="input_show" maxlength="6" @input='submit' v-model="inputList" focus="true" />
|
|
|
</view>
|
|
|
- <!-- 重新获取 -->
|
|
|
- <view class="top_five" @click='regain' :class="!status ? 'active' : '' "><text v-if="!status">重新发送</text><text
|
|
|
+ <!-- 重新获取 regain -->
|
|
|
+ <view class="top_five" @click='judge' :class="!status ? 'active' : '' "><text v-if="!status">重新发送</text><text
|
|
|
v-if="status">{{count_down}}秒后重新发送</text></view>
|
|
|
</view>
|
|
|
</template>
|
|
@@ -73,8 +73,15 @@
|
|
|
navBack() {
|
|
|
uni.navigateBack();
|
|
|
},
|
|
|
+ judge(){
|
|
|
+ if(this.count_down > 0){
|
|
|
+ return
|
|
|
+ }else{
|
|
|
+ this.regain()
|
|
|
+ }
|
|
|
+ },
|
|
|
regain() {
|
|
|
- console.log("regain", this.phone);
|
|
|
+ this.count_down = 60
|
|
|
this.status = true
|
|
|
// console.log(e)150500
|
|
|
// 设定一个定时器 1000是1秒的意思
|
|
@@ -89,6 +96,7 @@
|
|
|
this.status = false
|
|
|
clearInterval(interval) //括号里面的名字要与setInterval定义的相同
|
|
|
}, 60000)
|
|
|
+
|
|
|
this.$request.baseRequest('get', '/commonUser/sendVerifyCode', {
|
|
|
phone: this.phone
|
|
|
}).then(res => {
|