Commit 0d75b7e2 by 李嘉林

用户进入效果

parent 3f97a81c
...@@ -40,7 +40,7 @@ export default { ...@@ -40,7 +40,7 @@ export default {
border-radius: 10px; border-radius: 10px;
padding: 8px; padding: 8px;
margin-bottom: 10px; margin-bottom: 10px;
animation:toLeft 5s linear; animation:toLeft 6s linear;
opacity: 0; opacity: 0;
span{ span{
font-size: 14px; font-size: 14px;
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
<div class="livedControls"> <div class="livedControls">
<!-- 公告层 --> <!-- 公告层 -->
<livedAnnouncement></livedAnnouncement> <livedAnnouncement></livedAnnouncement>
<!-- 用户进入通知 -->
<div class="userComing userComingAni" v-if="userComing"><span>xxx</span><span>来了</span></div>
<!-- 评论层 --> <!-- 评论层 -->
<livedIsMsg></livedIsMsg> <livedIsMsg></livedIsMsg>
<!-- 带货商品层 --> <!-- 带货商品层 -->
...@@ -40,12 +42,13 @@ export default { ...@@ -40,12 +42,13 @@ export default {
likeNum: 9997, //点赞数 likeNum: 9997, //点赞数
imgList: [], imgList: [],
iconList: [ iconList: [
"https://img3.imgtn.bdimg.com/it/u=3743111107,1940472030&fm=11&gp=0.jpg", "//img3.imgtn.bdimg.com/it/u=3743111107,1940472030&fm=11&gp=0.jpg",
"https://img0.imgtn.bdimg.com/it/u=216605226,3652567530&fm=11&gp=0.jpg", "//img0.imgtn.bdimg.com/it/u=216605226,3652567530&fm=11&gp=0.jpg",
"https://img3.imgtn.bdimg.com/it/u=3743111107,1940472030&fm=11&gp=0.jpg", "//img3.imgtn.bdimg.com/it/u=3743111107,1940472030&fm=11&gp=0.jpg",
"https://img2.imgtn.bdimg.com/it/u=1354268575,1268995723&fm=26&gp=0.jpg" "//img2.imgtn.bdimg.com/it/u=1354268575,1268995723&fm=26&gp=0.jpg"
], ],
num: 0 num: 0,
userComing:false,
}; };
}, },
components: { components: {
...@@ -62,6 +65,7 @@ export default { ...@@ -62,6 +65,7 @@ export default {
mounted() { mounted() {
setInterval(() => { setInterval(() => {
this.getAdd(); this.getAdd();
this.userComing=!this.userComing;
}, 5000); }, 5000);
}, },
methods: { methods: {
...@@ -108,6 +112,38 @@ export default { ...@@ -108,6 +112,38 @@ export default {
bottom: 10px; bottom: 10px;
left: 0; left: 0;
width: 100vw; width: 100vw;
.userComing{
margin-bottom: 10px;
background: rgba(#000, 0.4);
color: #fff;
font-size: 16px;
height: 26px;
line-height: 26px;
border-radius: 26px;
padding: 0 8px;
display: inline-block;
}
.userComingAni{
animation: userComingAni 5s linear;
}
@keyframes userComingAni {
0%{
transform: translateX(150vw);
opacity: 0.3;
}
30%{
transform: translateX(12px);
opacity: 1;
}
80%{
transform: translateX(12px);
opacity: 1;
}
100%{
transform: translateX(-150vw);
opacity: 0;
}
}
.control { .control {
height: 40px; height: 40px;
align-items: center; align-items: center;
......
...@@ -35,31 +35,31 @@ export default { ...@@ -35,31 +35,31 @@ export default {
isEC: true, isEC: true,
id: 1, id: 1,
img: img:
"https://img3.imgtn.bdimg.com/it/u=3743111107,1940472030&fm=11&gp=0.jpg" "//img3.imgtn.bdimg.com/it/u=3743111107,1940472030&fm=11&gp=0.jpg"
}, },
{ {
isEC: true, isEC: true,
id: 2, id: 2,
img: img:
"https://img0.imgtn.bdimg.com/it/u=216605226,3652567530&fm=11&gp=0.jpg" "//img0.imgtn.bdimg.com/it/u=216605226,3652567530&fm=11&gp=0.jpg"
}, },
{ {
isEC: false, isEC: false,
id: 3, id: 3,
img: img:
"https://img0.imgtn.bdimg.com/it/u=216605226,3652567530&fm=11&gp=0.jpg" "//img0.imgtn.bdimg.com/it/u=216605226,3652567530&fm=11&gp=0.jpg"
}, },
{ {
isEC: false, isEC: false,
id: 4, id: 4,
img: img:
"https://img0.imgtn.bdimg.com/it/u=216605226,3652567530&fm=11&gp=0.jpg" "//img0.imgtn.bdimg.com/it/u=216605226,3652567530&fm=11&gp=0.jpg"
}, },
{ {
isEC: false, isEC: false,
id: 5, id: 5,
img: img:
"https://img0.imgtn.bdimg.com/it/u=216605226,3652567530&fm=11&gp=0.jpg" "//img0.imgtn.bdimg.com/it/u=216605226,3652567530&fm=11&gp=0.jpg"
} }
], ],
// 讲解中浮动商品 // 讲解中浮动商品
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment