GuidePage.vue
1.06 KB
1
2
3
4
5
6
7
8
9
10
11
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
<template>
<div class="guide-page" v-if="show">
<img :src="img" @click="tap" />
</div>
</template>
<script type="text/ecmascript-6">
const imgUrl = 'https://img02.glsx.com.cn/weapp/resource/scrm-mobile/crowdfunding/guide-'
export default {
name: 'GuidePage',
data () {
return {
img: '',
index: 0,
show: true
}
},
mounted () {
this.img = `${imgUrl}${this.index}.webp`
let timer = setTimeout(() => {
if (this.show) this.hide()
clearTimeout(timer)
}, 10e3)
},
methods: {
tap () {
let { index } = this
if (index == 2) {
this.hide()
return
}
++this.index
this.img = `${imgUrl}${this.index}.webp?v=${Date.now()}`
},
hide () {
this.$parent.loginLinkFlag = false
this.$parent.getActivityGroup()
this.show = false
this.setLocalStorage('login_link_flag', true)
}
}
}
</script>
<style scoped lang="scss">
.guide-page {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 10086;
background-color: #000;
}
</style>