BigModuleMarketingDia.vue
6.59 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
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
<template>
<div class="mask" v-if="isShow">
<div class="dialog-wrap">
<div class="dialog">
<div class="dialog-title">
基于大模型生成营销活动话术
<div class="close" @click.stop="closeHandle">
<img src="@/assets/images/icon-close.png" />
</div>
</div>
<div class="content-box">
<!-- <BoxTitle :title="'基于大模型生成营销活动话术'" :textAlign="'center'" class="top-title" :fontSize="20"></BoxTitle> -->
<div class="text">基于大模型的能力,快速生成个性化的活动标题、营销文案和活动海报,提升门店营销效率。</div>
<div v-show="isLoading" class="loadding">
<div class="wrap">
<div class="round"></div>
<div class="round"></div>
<div class="round"></div>
<div class="round"></div>
<div class="round"></div>
<div class="round"></div>
<div class="round"></div>
</div>
</div>
<img :src="require(`../../../assets/images/${hasAvtivity ? 'activity-matekting' : 'big-module-marketing-img'}.png`)" alt="" />
<img v-show="showQ" class="ask-question" src="../../../assets/images/ask-question.png" alt="" />
<p id="qestion-3" v-show="showR" class="ai-reply"></p>
</div>
</div>
</div>
</div>
</template>
<script>
let t = null
export default {
name: 'BigModuleMarketingDia',
props: {
isShow: Boolean
},
data() {
return {
showQ: false,
showR: false,
pNode: null,
isLoading: false,
hasAvtivity: false
}
},
watch: {
isShow(val) {
console.log(val, '------------弹窗');
}
},
mounted() {
this.pNode = document.getElementById('qestion-3')
this.send()
t = setInterval(this.send, 7000)
},
methods: {
send() {
if (!this.showQ) {
this.showText()
} else {
this.showQ = false
this.showR = false
this.isLoading = false
this.hasAvtivity = false
this.pNode.innerHTML = ''
setTimeout(() => {
this.showText()
}, 1000)
}
},
showText() {
this.showQ = true
setTimeout(() => {
this.showR = true
this.addText()
setTimeout(() => {
this.isLoading = true
setTimeout(() => {
this.isLoading = false
this.hasAvtivity = true
this.showR = false
}, 3000)
}, 1000)
}, 1000)
},
addText() {
const str = '我们为您生成以下方案,请查看“营销模型解析”'
let i = 0
const timer = setInterval(() => {
if (i < str.length - 1) {
this.pNode.innerHTML = this.pNode.innerHTML + str[i]
i = i + 1
} else {
clearInterval(timer)
}
}, 17)
},
closeHandle() {
this.$emit('closeDialog')
}
},
destroyed() {
clearInterval(t)
}
}
</script>
<style lang="scss" scoped>
.mask {
width: 100%;
height: 100%;
position: fixed;
z-index: 99;
left: 0px;
top: 0px;
background: rgba(0, 0, 0, 0.8);
}
.dialog-wrap {
width: 67.31vw;
height: 90.38vh;
position: absolute;
z-index: 1;
left: 50%;
top: 50%;
background-image: url('../../../assets/images/bg-5.png');
background-repeat: no-repeat;
background-size: 100% 100%;
transform: translate(-50%, -50%);
border-radius: 5px;
padding: 3.9vh 3.67vw;
box-sizing: border-box;
.close {
width: 60px;
height: 60px;
position: absolute;
right: -28vw;
top: -3vh;
cursor: pointer;
}
.dialog-title {
width: 20.19vw;
height: 4.39vh;
text-align: center;
font-size: 30px;
font-weight: 900;
color: #19ECFF;
margin: 0 auto;
position: relative;
line-height: 1.39vh;
}
.content-box {
position: relative;
.text {
padding-top: 5.33vh;
font-weight: 500;
font-size: 20px;
color: #09AEF2;
}
img {
width: 42.59vw;
height: 63.46vh;
margin-top: 3.46vh;
}
.send {
display: inline-block;
position: absolute;
right: 9vw;
top: 22vh;
}
.ask-question {
position: absolute;
right: 18.5vw;
width: 200px;
height: 26px;
top: 17.5vh;
}
.ai-reply {
position: absolute;
left: 17vw;
top: 25vh;
padding: 5px 10px;
}
.activity-form {
position: absolute;
width: 293px;
height: 133px;
bottom: 1.33vh;
left: 7.7vw;
}
}
p {
margin: 0;
background-color: #eee;
box-sizing: border-box;
padding: 3px 5px;
font-size: 7px;
color: #333;
border-radius: 3px;
}
.loadding {
position: absolute;
right: 12vw;
top: 22vh;
}
.wrap {
margin: 120px 0 0 240px;
width: 25px;
height: 25px;
position: relative;
/* transform-origin: 设置的效果搭配边框看,效果更加明显 */
/* border: 1px solid #e9e9e9; */
}
.round {
position: absolute;
width: 11px;
height: 11px;
border-radius: 50%;
background-color: rgb(241, 141, 157);
/* 加上动画效果 */
animation: circleRound 2.8s ease infinite;
/* 设置旋转中心,搭配.wrap的border看 */
transform-origin: 50% 25px;
}
/* 注意z-index层级关系,依次递减 */
.round:nth-child(1) {
z-index: 7;
}
/* 注意动画延后animation-delay播放,依次递增 */
/* 至于小圆球则越来越小 */
.round:nth-child(2) {
height: 10px;
width: 10px;
background-color: rgb(199, 136, 185);
animation-delay: 0.2s;
z-index: 6;
}
.round:nth-child(3) {
height: 9px;
width: 9px;
background-color: rgb(153, 69, 223);
animation-delay: 0.4s;
z-index: 5;
}
.round:nth-child(4) {
height: 8px;
width: 8px;
background-color: rgb(69, 141, 223);
animation-delay: 0.6s;
z-index: 4;
}
.round:nth-child(5) {
height: 7px;
width: 7px;
background-color: rgb(69, 223, 203);
animation-delay: 0.8s;
z-index: 3;
}
.round:nth-child(6) {
height: 6px;
width: 6px;
background-color: rgb(100, 223, 69);
animation-delay: 1s;
z-index: 2;
}
.round:nth-child(7) {
height: 5px;
width: 5px;
background-color: rgb(223, 200, 69);
animation-delay: 1.2s;
z-index: 1;
}
@keyframes circleRound {
to {
transform: rotate(1turn);
}
}
}
</style>