验证码添加图形验证
This commit is contained in:
@@ -50,12 +50,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 {
|
||||
pageNameFlag:1,
|
||||
@@ -71,12 +77,13 @@
|
||||
loadingFlag:false,
|
||||
doneFlag:0,
|
||||
sendAgain:'发送验证码',
|
||||
sendAgainFlag:0,
|
||||
sendAgainFlag:1,
|
||||
resetFlag:0,
|
||||
vercode:'',
|
||||
second:60,
|
||||
errorMsg:'',
|
||||
disabledFlag:false
|
||||
disabledFlag:false,
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -114,6 +121,11 @@
|
||||
that.seeFlag=0;
|
||||
that.password='';
|
||||
}
|
||||
if( that.password.length>0 && that.again.length>0 ){
|
||||
that.sendAgainFlag=0
|
||||
}else{
|
||||
that.sendAgainFlag=1
|
||||
}
|
||||
},
|
||||
setAgain(e){
|
||||
var that = this;
|
||||
@@ -129,6 +141,11 @@
|
||||
that.seeAgainFlag=0;
|
||||
that.again='';
|
||||
}
|
||||
if( that.password.length>0 && that.again.length>0 ){
|
||||
that.sendAgainFlag=0
|
||||
}else{
|
||||
that.sendAgainFlag=1
|
||||
}
|
||||
},
|
||||
see(flag){
|
||||
this.passwordFlag=flag;
|
||||
@@ -137,18 +154,26 @@
|
||||
this.againFlag=flag;
|
||||
},
|
||||
sendVercodeAgain(){
|
||||
var that = this;
|
||||
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.phoneNum,
|
||||
devCode:that.cid(),
|
||||
type:3
|
||||
type:3,
|
||||
authToken: that.authTokenId
|
||||
},
|
||||
header: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
@@ -191,8 +216,10 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
}, 500);
|
||||
},
|
||||
complete(){
|
||||
var that = this;
|
||||
var password = that.password.trim();
|
||||
@@ -280,9 +307,7 @@
|
||||
onLoad(e) {
|
||||
this.phoneNum=e.phoneNum;
|
||||
},
|
||||
components:{
|
||||
back
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user