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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
| <template>
| <div>
| <div class="abs-module" v-show="isShow">
| <div class="abs-box">
| <i class="el-icon-circle-close" @click="close" />
| <a href="https://www.aliyun.com/minisite/goods?userCode=kqyyppx2">
| <img src="~@/assets/image/aliyun-abs.jpg" width="300" />
| </a>
| </div>
| </div>
| </div>
| </template>
| <script>
| export default {
| data() {
| return {
| isShow: false,
| }
| },
| created() {
| if (this.getNum() <= 2) {
| setTimeout(() => {
| this.isShow = true
| }, 1000 * 60 * 2)
| }
| },
| methods: {
| getNum() {
| return parseInt(sessionStorage.getItem('ABS_BOX')) || 0
| },
| close() {
| sessionStorage.setItem('ABS_BOX', this.getNum() + 1)
| this.isShow = false
| },
| },
| }
| </script>
| <style lang="less" scoped>
| .abs-module {
| position: fixed;
| width: 300px;
| height: 163.63px;
| right: 20px;
| top: 20px;
| border-radius: 5px;
| z-index: 9999;
| overflow: hidden;
| transition: all 2s;
| animation: absfade 1000ms infinite;
|
| .abs-box {
| width: 100%;
| height: 100%;
| position: relative;
|
| i {
| position: absolute;
| right: 10px;
| top: 10px;
| color: white;
| cursor: pointer;
| font-size: 22px;
| }
| }
| }
|
| @keyframes absfade {
| from {
| transform: scale(1);
| }
|
| 50% {
| transform: scale(1.02);
| }
|
| to {
| transform: scale(1);
| }
| }
| </style>
|
|