Commit e4169051 by 胡悦

活动话术添加动画效果

1 parent e1ffd01f

230 KB | W: | H:

119 KB | W: | H:

src/assets/images/big-module-marketing-img.png
src/assets/images/big-module-marketing-img.png
src/assets/images/big-module-marketing-img.png
src/assets/images/big-module-marketing-img.png
  • 2-up
  • Swipe
  • Onion skin
<!--
* @Description: 右下
* @Author: huyue
* @Date: 2024-01-26 21:05:56
* @LastEditors: huyue
* @LastEditTime: 2024-01-29 14:15:07
-->
<template>
<div class="big-module-marketing-box">
<BoxTitle :title="'基于大模型生成营销活动话术'" :textAlign="'center'" class="top-title" :fontSize="20"></BoxTitle>
<div>基于大模型的能力,快速生成个性化的活动标题、</div>
<div>营销文案和活动海报,提升门店营销效率。</div>
<img src="../../../assets/images/big-module-marketing-img.png" alt="" />
<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 v-show="showR" class="ai-reply"></p>
</div>
</template>
<script>
let t = null
export default {
name: 'BigModuleMarketing',
data() {
return {}
return {
showQ: false,
showR: false,
pNode: null,
isLoading: false,
hasAvtivity: false
}
},
mounted() {},
mounted() {
this.pNode = document.querySelector('p')
this.send()
t = setInterval(this.send, 7000)
},
methods: {}
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
}, 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)
}
},
destroyed() {
clearInterval(t)
}
}
</script>
<style lang="scss" scoped>
.big-module-marketing-box {
position: relative;
box-sizing: border-box;
width: 31.67vw;
height: 40.37vh;
......@@ -41,5 +117,126 @@ export default {
height: 27.5vh;
margin-top: 1.48vh;
}
.send {
display: inline-block;
position: absolute;
right: 9vw;
top: 22vh;
}
.ask-question {
position: absolute;
right: 9vw;
width: 160px;
height: 22px;
top: 13.5vh;
}
.ai-reply {
position: absolute;
// width: 155px;
// height: 22px;
left: 8vw;
top: 18vh;
}
.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: 8px;
color: #333;
border-radius: 3px;
}
.loadding {
position: absolute;
left: 2dvw;
}
.wrap {
margin: 120px 0 0 240px;
width: 75px;
height: 75px;
position: relative;
/* transform-origin: 设置的效果搭配边框看,效果更加明显 */
/* border: 1px solid #e9e9e9; */
}
.round {
position: absolute;
width: 13px;
height: 13px;
border-radius: 50%;
background-color: rgb(241, 141, 157);
/* 加上动画效果 */
animation: circleRound 2.8s ease infinite;
/* 设置旋转中心,搭配.wrap的border看 */
transform-origin: 50% 75px;
}
/* 注意z-index层级关系,依次递减 */
.round:nth-child(1) {
z-index: 7;
}
/* 注意动画延后animation-delay播放,依次递增 */
/* 至于小圆球则越来越小 */
.round:nth-child(2) {
height: 12px;
width: 12px;
background-color: rgb(199, 136, 185);
animation-delay: 0.2s;
z-index: 6;
}
.round:nth-child(3) {
height: 11px;
width: 11px;
background-color: rgb(153, 69, 223);
animation-delay: 0.4s;
z-index: 5;
}
.round:nth-child(4) {
height: 10px;
width: 10px;
background-color: rgb(69, 141, 223);
animation-delay: 0.6s;
z-index: 4;
}
.round:nth-child(5) {
height: 9px;
width: 9px;
background-color: rgb(69, 223, 203);
animation-delay: 0.8s;
z-index: 3;
}
.round:nth-child(6) {
height: 8px;
width: 8px;
background-color: rgb(100, 223, 69);
animation-delay: 1s;
z-index: 2;
}
.round:nth-child(7) {
height: 7px;
width: 7px;
background-color: rgb(223, 200, 69);
animation-delay: 1.2s;
z-index: 1;
}
@keyframes circleRound {
to {
transform: rotate(1turn);
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!