验证码添加图形验证
This commit is contained in:
@@ -27,12 +27,18 @@
|
||||
<view class="textHigh">下一步</view>
|
||||
</button>
|
||||
</view>
|
||||
<!-- 图片滑块 -->
|
||||
<tfVerify ref="tfVerifyRef" @chenggong="chenggong"/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import back from '../../components/back.vue';
|
||||
import tfVerify from '@/components/tfVerify/tfVerify.vue';
|
||||
export default {
|
||||
components:{
|
||||
back,tfVerify
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
phoneNum:'',
|
||||
@@ -69,18 +75,24 @@
|
||||
}
|
||||
},
|
||||
sendVercodeAgain(){
|
||||
this.$refs.tfVerifyRef.open()
|
||||
},
|
||||
async chenggong(){
|
||||
var that = this;
|
||||
if(that.second!=60){
|
||||
return;
|
||||
}
|
||||
that.sendAgainFlag=1
|
||||
await that.authToken();
|
||||
setTimeout(() => {
|
||||
uni.request({
|
||||
url: that.serverUrl+'/user/authCode',
|
||||
method:'POST',
|
||||
data: {
|
||||
phone:that.phoneNumTrue,
|
||||
devCode:that.cid(),
|
||||
type:1
|
||||
type:1,
|
||||
authToken: that.authTokenId
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
@@ -124,7 +136,9 @@
|
||||
});
|
||||
}
|
||||
});
|
||||
}, 500);
|
||||
},
|
||||
|
||||
reset(){
|
||||
this.vercode='';
|
||||
this.resetFlag=0;
|
||||
@@ -199,9 +213,7 @@
|
||||
this.phoneNum = e.phoneNum.substr(0,3)+'****'+e.phoneNum.substr(7,11);
|
||||
this.sendVercodeAgain();
|
||||
},
|
||||
components:{
|
||||
back
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user