验证码添加图形验证
This commit is contained in:
53
components/tfVerify/tfVerify.vue
Normal file
53
components/tfVerify/tfVerify.vue
Normal file
@@ -0,0 +1,53 @@
|
||||
<template>
|
||||
<view>
|
||||
<!-- 图片滑块 -->
|
||||
<tf-verify-img @succeed="chenggong" @close="showVerify = false" v-if="showVerify" :verifyImgs="imgs"></tf-verify-img>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import tfVerifyImg from '@/components/tf-verify-img/tf-verify-img.vue';
|
||||
export default {
|
||||
components: { tfVerifyImg },
|
||||
data() {
|
||||
return {
|
||||
showVerify: false,
|
||||
imgs: [
|
||||
{
|
||||
src: '/static/pic/BG0.jpeg',
|
||||
color: '#67c23a'
|
||||
},
|
||||
{
|
||||
src: '/static/pic/BG1.jpeg',
|
||||
color: '#67c23a'
|
||||
},{
|
||||
src: '/static/pic/BG2.jpg',
|
||||
color: '#67c23a'
|
||||
},{
|
||||
src: '/static/pic/BG3.jpg',
|
||||
color: '#67c23a'
|
||||
},{
|
||||
src: '/static/pic/BG4.jpg',
|
||||
color: '#67c23a'
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open(){
|
||||
this.showVerify=true
|
||||
},
|
||||
chenggong() {
|
||||
uni.showToast({
|
||||
title: '验证成功'
|
||||
});
|
||||
this.showVerify = false;
|
||||
this.$emit('chenggong');
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user