|
@@ -1,26 +1,48 @@
|
1
|
1
|
<template>
|
2
|
2
|
<div v-if="showSelf" class="dialog" :style="{'z-index': zIndex}">
|
3
|
3
|
<div class="dialog-mark" @click.self="closeMyself" :style="{'z-index': zIndex + 1}">
|
|
4
|
+ <div v-show="myShareShow" class="sharetiptxt" style>
|
|
5
|
+ <img style="width:100%; height:100%;" src="../assets/popupImg/myShare.png" alt />
|
|
6
|
+ </div>
|
4
|
7
|
<transition name="dialog">
|
5
|
8
|
<div class="dialog-sprite" :style="{'z-index': zIndex + 2}">
|
6
|
9
|
<div class="dialog-body">
|
7
|
|
- <div class="dialog-popuImag">
|
8
|
|
- <img src="../assets/popupImg/popuBody.jpg" alt />
|
|
10
|
+ <div class="card-wrapper">
|
|
11
|
+ <div :class="`dialog-popuImag ${classDivAA?'flipped':''}`">
|
|
12
|
+ <!-- <img src="../assets/popupImg/popuBody.jpg" alt /> -->
|
|
13
|
+ <!-- <ImageTrans :classDiv="show" /> -->
|
|
14
|
+ <div class="back">
|
|
15
|
+ <img style="width: 180px; height:492px" src="../assets/popupImg/popuBody.jpg" alt />
|
|
16
|
+ </div>
|
|
17
|
+
|
|
18
|
+ <div class="front">
|
|
19
|
+ <img
|
|
20
|
+ style="width: 180px; height:492px "
|
|
21
|
+ src="../assets/popupImg/backImag.jpg"
|
|
22
|
+ alt
|
|
23
|
+ />
|
|
24
|
+ </div>
|
|
25
|
+ </div>
|
9
|
26
|
</div>
|
|
27
|
+
|
10
|
28
|
<div class="dialog-footer">
|
11
|
29
|
<img @click="cancel" class="btn" src="../assets/popupImg/cancelmage.png" alt />
|
12
|
30
|
</div>
|
13
|
31
|
</div>
|
14
|
32
|
<!-- 右侧 -->
|
15
|
33
|
<div class="section-box">
|
16
|
|
- <div class="section-box-share">
|
|
34
|
+ <div class="section-box-share" @click="()=>{this.myShareShow=true}">
|
17
|
35
|
<img src="../assets/popupImg/shareImage.png" alt />
|
18
|
36
|
</div>
|
19
|
37
|
<div class="section-box-receive">
|
20
|
|
- <img src="../assets/popupImg/receiveImage.png" alt />
|
|
38
|
+ <router-link :to="{path:'SaveShare',query: { states: 0 }}">
|
|
39
|
+ <img src="../assets/popupImg/receiveImage.png" alt />
|
|
40
|
+ </router-link>
|
21
|
41
|
</div>
|
22
|
42
|
<div class="section-box-save">
|
23
|
|
- <img src="../assets/popupImg/saveImage.png" alt />
|
|
43
|
+ <router-link :to="{path:'SaveShare',query: { states: 1 }}">
|
|
44
|
+ <img src="../assets/popupImg/saveImage.png" alt />
|
|
45
|
+ </router-link>
|
24
|
46
|
</div>
|
25
|
47
|
</div>
|
26
|
48
|
</div>
|
|
@@ -32,6 +54,9 @@
|
32
|
54
|
<script>
|
33
|
55
|
export default {
|
34
|
56
|
name: 'Popup',
|
|
57
|
+ components: {
|
|
58
|
+ ImageTrans: () => import('@/components/ImageTrans.vue')
|
|
59
|
+ },
|
35
|
60
|
props: {
|
36
|
61
|
show: {
|
37
|
62
|
type: Boolean,
|
|
@@ -69,13 +94,19 @@ export default {
|
69
|
94
|
name: 'dialog',
|
70
|
95
|
showSelf: false,
|
71
|
96
|
zIndex: this.getZIndex(),
|
72
|
|
- bodyOverflow: ''
|
|
97
|
+ bodyOverflow: '',
|
|
98
|
+ classDivAA: false,
|
|
99
|
+ myShareShow: false
|
73
|
100
|
}
|
74
|
101
|
},
|
75
|
102
|
watch: {
|
76
|
103
|
show(val) {
|
77
|
104
|
console.log('🚀 ~ file: Popup.vue ~ line 78 ~ show ~ val', val)
|
78
|
105
|
this.showSelf = val
|
|
106
|
+ if (this.show === false) {
|
|
107
|
+ this.myShareShow = false
|
|
108
|
+ }
|
|
109
|
+ this.transform()
|
79
|
110
|
|
80
|
111
|
// if (!val) {
|
81
|
112
|
// this.closeMyself()
|
|
@@ -89,8 +120,28 @@ export default {
|
89
|
120
|
},
|
90
|
121
|
mounted() {
|
91
|
122
|
this.forbidScroll()
|
|
123
|
+ if (this.show === true) {
|
|
124
|
+ this.transform()
|
|
125
|
+ }
|
92
|
126
|
},
|
93
|
127
|
methods: {
|
|
128
|
+ shareClick() {
|
|
129
|
+ this.$router.replace({
|
|
130
|
+ path: 'SaveShare',
|
|
131
|
+ query: { states: 0 }
|
|
132
|
+ })
|
|
133
|
+ },
|
|
134
|
+ saveClick() {
|
|
135
|
+ this.$router.replace({
|
|
136
|
+ path: 'SaveShare',
|
|
137
|
+ query: { states: 1 }
|
|
138
|
+ })
|
|
139
|
+ },
|
|
140
|
+ transform() {
|
|
141
|
+ setTimeout(() => {
|
|
142
|
+ this.classDivAA = this.show
|
|
143
|
+ }, 0)
|
|
144
|
+ },
|
94
|
145
|
/** 禁止页面滚动 */
|
95
|
146
|
forbidScroll() {
|
96
|
147
|
this.bodyOverflow = document.body.style.overflow
|
|
@@ -128,15 +179,6 @@ export default {
|
128
|
179
|
|
129
|
180
|
<style lang="less" scoped>
|
130
|
181
|
// 弹窗动画
|
131
|
|
-.dialog-enter-active,
|
132
|
|
-.dialog-leave-active {
|
133
|
|
- transition: opacity 1s;
|
134
|
|
-}
|
135
|
|
-
|
136
|
|
-.dialog-enter,
|
137
|
|
-.dialog-leave-to {
|
138
|
|
- opacity: 0;
|
139
|
|
-}
|
140
|
182
|
|
141
|
183
|
// 最外层 设置position定位
|
142
|
184
|
// 遮罩 设置背景层,z-index值要足够大确保能覆盖,高度 宽度设置满 做到全屏遮罩
|
|
@@ -163,6 +205,29 @@ export default {
|
163
|
205
|
display: flex;
|
164
|
206
|
align-items: center;
|
165
|
207
|
justify-content: center;
|
|
208
|
+ .sharetiptxt {
|
|
209
|
+ background-size: 100% auto;
|
|
210
|
+ background-repeat: no-repeat;
|
|
211
|
+ z-index: 55;
|
|
212
|
+ width: 20px;
|
|
213
|
+ height: 320px;
|
|
214
|
+ display: block;
|
|
215
|
+ position: absolute;
|
|
216
|
+ right: 1rem;
|
|
217
|
+ top: 0.5em;
|
|
218
|
+ animation: tipup 1s ease infinite;
|
|
219
|
+ }
|
|
220
|
+ }
|
|
221
|
+}
|
|
222
|
+@keyframes tipup {
|
|
223
|
+ 0% {
|
|
224
|
+ transform: translateY(0%);
|
|
225
|
+ }
|
|
226
|
+ 50% {
|
|
227
|
+ transform: translateY(5%);
|
|
228
|
+ }
|
|
229
|
+ 100% {
|
|
230
|
+ transform: translateY(0%);
|
166
|
231
|
}
|
167
|
232
|
}
|
168
|
233
|
|
|
@@ -185,13 +250,53 @@ export default {
|
185
|
250
|
overflow-y: scroll;
|
186
|
251
|
padding: 0 15px 20px 15px;
|
187
|
252
|
//中间卡片
|
188
|
|
- .dialog-popuImag {
|
189
|
|
- position: relative;
|
|
253
|
+ .card-wrapper {
|
|
254
|
+ perspective: 600px;
|
190
|
255
|
|
191
|
|
- display: flex;
|
192
|
|
- justify-content: center;
|
193
|
|
- img {
|
194
|
|
- width: 48vw;
|
|
256
|
+ .dialog-popuImag {
|
|
257
|
+ position: relative;
|
|
258
|
+ display: flex;
|
|
259
|
+ justify-content: center;
|
|
260
|
+ transform-style: preserve-3d;
|
|
261
|
+ transition: all 1.2s ease;
|
|
262
|
+ // div {
|
|
263
|
+ // // position: relative;
|
|
264
|
+ // position: absolute;
|
|
265
|
+ // width: 100%;
|
|
266
|
+ // height: 100%;
|
|
267
|
+ // /* 背面不显示 */
|
|
268
|
+ // // backface-visibility: hidden;
|
|
269
|
+ // }
|
|
270
|
+ .front {
|
|
271
|
+ }
|
|
272
|
+ .back {
|
|
273
|
+ position: absolute;
|
|
274
|
+ transform: rotateY(180deg);
|
|
275
|
+
|
|
276
|
+ // animation: change 0.8s linear forwards;
|
|
277
|
+ }
|
|
278
|
+
|
|
279
|
+ img {
|
|
280
|
+ width: 48vw;
|
|
281
|
+ }
|
|
282
|
+ }
|
|
283
|
+ .flipped {
|
|
284
|
+ animation: change 0.8s linear forwards;
|
|
285
|
+ }
|
|
286
|
+ }
|
|
287
|
+ @keyframes change {
|
|
288
|
+ from {
|
|
289
|
+ top: -20vh;
|
|
290
|
+ left: -20vw;
|
|
291
|
+ opacity: 0;
|
|
292
|
+ transform: scale(0.5);
|
|
293
|
+ }
|
|
294
|
+ to {
|
|
295
|
+ top: -0;
|
|
296
|
+ left: -0;
|
|
297
|
+ opacity: 2;
|
|
298
|
+ transform: scale(1);
|
|
299
|
+ transform: rotateY(180deg);
|
195
|
300
|
}
|
196
|
301
|
}
|
197
|
302
|
//底部按钮
|