Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
h5
/
glsk-data-view-scene
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 16c70007
authored
Jan 29, 2024
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改动画效果
1 parent
3228f165
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
27 deletions
src/views/lifeSceneDataPage/components/MarketingQuestion.vue
src/views/lifeSceneDataPage/components/MarketingQuestion.vue
View file @
16c7000
...
...
@@ -2,7 +2,7 @@
<div
class=
"markeing-box"
>
<Phone
:imgName=
"'ai-dialogue'"
>
<div
class=
"dialogue-content"
slot=
"content"
>
<div
v-
show
=
"showQ"
class=
"dialog-item"
>
<div
v-
if
=
"showQ"
class=
"dialog-item"
>
<div
class=
"user-content m-l"
>
为什么这么贵?不就是一层塑料纸吗?
</div>
<img
class=
"avatar m-s-l"
src=
"../../../assets//images/user-avatar.png"
alt=
""
>
</div>
...
...
@@ -27,8 +27,6 @@
</div>
</
template
>
<
script
>
let
t
=
null
let
pNode
=
null
import
Phone
from
"./Phone.vue"
export
default
{
name
:
'MarketingQuestion'
,
...
...
@@ -38,49 +36,51 @@ export default {
data
()
{
return
{
showQ
:
false
,
showR
:
false
showR
:
false
,
pNode
:
null
,
timer
:
null
}
},
mounted
()
{
pNode
=
document
.
getElementById
(
'qestion-1'
)
this
.
pNode
=
document
.
getElementById
(
'qestion-1'
)
// const str = '这位先生/女士/老板,一分钱一分货,就像同一款衣服,为什么有上万的,也有几百的,它材质是不一样的,表面上看它可能就是一层塑料,但是它里边的这个结构是非常复杂的,不同的结构,有的膜是五层、有的膜是七层、还有的十几层那都是有区别的,况且我们这个价格是全国统一价,你在官网是能查到的,这对车主来说是最公平合理。'
this
.
showText
()
t
=
setInterval
(()
=>
{
pNode
.
innerHTML
=
''
this
.
showText
()
},
10000
)
// t = setInterval(this.showText, 10000)
},
methods
:
{
showText
()
{
if
(
!
this
.
showQ
)
{
this
.
showQ
=
true
setTimeout
(()
=>
{
this
.
addText
()
this
.
showR
=
true
},
1000
)
}
else
{
this
.
showQ
=
false
this
.
showR
=
false
setTimeout
(()
=>
{
this
.
showText
()
},
1000
)
}
this
.
showQ
=
true
setTimeout
(()
=>
{
this
.
addText
()
this
.
showR
=
true
},
1000
)
},
addText
()
{
const
str
=
'这位先生/女士/老板,一分钱一分货,就像同一款衣服,为什么有上万的,也有几百的,它材质是不一样的,表面上看它可能就是一层塑料,但是它里边的这个结构是非常复杂的,不同的结构,有的膜是五层、有的膜是七层、还有的十几层那都是有区别的,况且我们这个价格是全国统一价,你在官网是能查到的,这对车主来说是最公平合理。'
let
i
=
0
const
timer
=
setInterval
(()
=>
{
this
.
timer
=
setInterval
(()
=>
{
if
(
i
<
str
.
length
-
1
)
{
pNode
.
innerHTML
=
pNode
.
innerHTML
+
str
[
i
]
this
.
pNode
.
innerHTML
=
this
.
pNode
.
innerHTML
+
str
[
i
]
i
=
i
+
1
}
else
{
clearInterval
(
timer
)
clearInterval
(
this
.
timer
)
setTimeout
(()
=>
{
this
.
showQ
=
false
this
.
showR
=
false
this
.
pNode
.
innerHTML
=
''
setTimeout
(()
=>
{
this
.
showText
()
},
1000
)
},
1000
)
}
},
50
)
}
},
destroyed
()
{
clearInterval
(
t
)
beforeDestroy
()
{
this
.
showQ
=
false
this
.
showR
=
false
this
.
pNode
.
innerHTML
=
''
clearInterval
(
this
.
timer
)
}
}
</
script
>
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment