94c1e6a3
liuqimichale
微信公众号 个人页面集合
|
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
</div>
</div>
</template>
<script>
export default {
name: 'binDing',
data() {
return {
codeText: '',
phone: '',
timeText: '获取验证码',
timeNum: 60,
}
},
created(){
this.timeNum = this.timeText
},
methods: {
getCode: function () {
var _this = this
// this.timeText = this.timeNum+'S'
let Num = 5
var timer = setInterval(function () {
_this.timeNum = Num-- +'s'
if(Num== -1){
_this.timeNum = '获取验证码'
clearInterval(timer)
}
}, 1000)
}
}
}
</script>
<style scoped lang="scss">
.getCode {
width: 100px;
height: 48px;
line-height: 48px;
background: #ef4f4f;
color: #fff;
text-align: center;
}
</style>
|