diff --git a/.gitignore b/.gitignore index 9452dc7..1160cbb 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,7 @@ node_modules /dist /build - +/test # local env files .env.local diff --git a/src/assets/css/live.css b/src/assets/css/live.css new file mode 100644 index 0000000..20d3b80 --- /dev/null +++ b/src/assets/css/live.css @@ -0,0 +1,299 @@ +body { + --bubble_time: 3s; + --bubble_scale: 3s; +} +.bubble { + position: absolute; + width: 80px; + height: 80px; + left: 50%; + left: 50%; + background-repeat: no-repeat; + background-size: 100%; + transform-origin: bottom; +} +.b1 { + background-image: url(../images/liveIcon/bg1.png); +} +.b2 { + background-image: url(../images/liveIcon/bg2.png); +} +.b3 { + background-image: url(../images/liveIcon/bg3.png); +} +.b4 { + background-image: url(../images/liveIcon/bg4.png); +} +.b5 { + background-image: url(../images/liveIcon/bg5.png); +} +.b6 { + background-image: url(../images/liveIcon/bg6.png); +} +.bl1 { + animation: bubble_1 var(--bubble_time) linear 1 forwards, + bubble_big_1 var(--bubble_scale) linear 1 forwards, + bubble_y var(--bubble_time) linear 1 forwards; +} +.bl2 { + animation: bubble_2 var(--bubble_time) linear 1 forwards, + bubble_big_2 var(--bubble_scale) linear 1 forwards, + bubble_y var(--bubble_time) linear 1 forwards; +} +.bl3 { + animation: bubble_3 var(--bubble_time) linear 1 forwards, + bubble_big_1 var(--bubble_scale) linear 1 forwards, + bubble_y var(--bubble_time) linear 1 forwards; +} +.bl4 { + animation: bubble_4 var(--bubble_time) linear 1 forwards, + bubble_big_2 var(--bubble_scale) linear 1 forwards, + bubble_y var(--bubble_time) linear 1 forwards; +} +.bl5 { + animation: bubble_5 var(--bubble_time) linear 1 forwards, + bubble_big_1 var(--bubble_scale) linear 1 forwards, + bubble_y var(--bubble_time) linear 1 forwards; +} +.bl6 { + animation: bubble_6 var(--bubble_time) linear 1 forwards, + bubble_big_3 var(--bubble_scale) linear 1 forwards, + bubble_y var(--bubble_time) linear 1 forwards; +} +.bl7 { + animation: bubble_7 var(--bubble_time) linear 1 forwards, + bubble_big_1 var(--bubble_scale) linear 1 forwards, + bubble_y var(--bubble_time) linear 1 forwards; +} +.bl8 { + animation: bubble_8 var(--bubble_time) linear 1 forwards, + bubble_big_3 var(--bubble_scale) linear 1 forwards, + bubble_y var(--bubble_time) linear 1 forwards; +} +.bl9 { + animation: bubble_9 var(--bubble_time) linear 1 forwards, + bubble_big_2 var(--bubble_scale) linear 1 forwards, + bubble_y var(--bubble_time) linear 1 forwards; +} +.bl10 { + animation: bubble_10 var(--bubble_time) linear 1 forwards, + bubble_big_1 var(--bubble_scale) linear 1 forwards, + bubble_y var(--bubble_time) linear 1 forwards; +} +.bl11 { + animation: bubble_11 var(--bubble_time) linear 1 forwards, + bubble_big_2 var(--bubble_scale) linear 1 forwards, + bubble_y var(--bubble_time) linear 1 forwards; +} +@keyframes bubble_11 { + 0% { + } + 25% { + margin-left: -15px; + } + 50% { + margin-left: -15px; + } + 100% { + margin-left: -20px; + } +} +@keyframes bubble_10 { + 0% { + } + 25% { + margin-left: -20px; + } + 50% { + margin-left: -20px; + } + 100% { + margin-left: -20px; + } +} +@keyframes bubble_9 { + 0% { + } + 25% { + margin-left: 10px; + } + 50% { + margin-left: 10px; + } + 100% { + margin-left: 10px; + } +} +@keyframes bubble_8 { + 0% { + } + 25% { + margin-left: 30px; + } + 50% { + margin-left: 30px; + } + 100% { + margin-left: 30px; + } +} +@keyframes bubble_7 { + 0% { + } + 25% { + margin-left: 6px; + } + 50% { + margin-left: 2px; + } + 75% { + margin-left: 4px; + } + 100% { + margin-left: 6px; + } +} +@keyframes bubble_6 { + 0% { + } + 25% { + margin-left: -6px; + } + 50% { + margin-left: -2px; + } + 75% { + margin-left: -4px; + } + 100% { + margin-left: -6px; + } +} +@keyframes bubble_5 { + 0% { + } + 25% { + margin-left: 10px; + } + 50% { + margin-left: -10px; + } + 75% { + margin-left: -20px; + } + 100% { + margin-left: -40px; + } +} +@keyframes bubble_4 { + 0% { + } + 25% { + margin-left: -10px; + } + 50% { + margin-left: -10px; + } + 75% { + margin-left: 40px; + } + 100% { + margin-left: 20px; + } +} +@keyframes bubble_3 { + 0% { + } + 25% { + margin-left: -40px; + } + 50% { + margin-left: 20px; + } + 75% { + margin-left: 40px; + } + 100% { + margin-left: -20px; + } +} +@keyframes bubble_2 { + 0% { + } + 25% { + margin-left: 40px; + } + 50% { + margin-left: 50px; + } + 75% { + margin-left: 20px; + } + 100% { + margin-left: 10px; + } +} +@keyframes bubble_1 { + 0% { + } + 25% { + margin-left: -16px; + } + 50% { + margin-left: 16px; + } + 75% { + margin-left: -30px; + } + 100% { + margin-left: 30px; + } +} +@keyframes bubble_big_1 { + 0% { + /* transform: scale(0.3); */ + width: 20px; + height: 20px; + } + 100% { + width: 80px; + height: 80px; + } +} +@keyframes bubble_big_2 { + 0% { + /* transform: scale(0.3); */ + width: 15px; + height: 15px; + } + 100% { + /* transform: scale(0.9); */ + width: 60px; + height: 60px; + } +} +@keyframes bubble_big_3 { + 0% { + width: 10px; + height: 10px; + } + 100% { + width: 40px; + height: 40px; + } +} +@keyframes bubble_y { + 0% { + top: -10px; + } + 10% { + top: -40px; + } + 75% { + opacity: 1; + } + 100% { + top: -400px; + opacity: 0; + } +} diff --git a/src/assets/images/empty.png b/src/assets/images/empty.png index 1b300ef..f3f80d0 100644 Binary files a/src/assets/images/empty.png and b/src/assets/images/empty.png differ diff --git a/src/assets/images/empty1.png b/src/assets/images/empty1.png new file mode 100644 index 0000000..1b300ef Binary files /dev/null and b/src/assets/images/empty1.png differ diff --git a/src/assets/images/liveIcon/bg1.png b/src/assets/images/liveIcon/bg1.png new file mode 100644 index 0000000..77d292a Binary files /dev/null and b/src/assets/images/liveIcon/bg1.png differ diff --git a/src/assets/images/liveIcon/bg2.png b/src/assets/images/liveIcon/bg2.png new file mode 100644 index 0000000..7f0ce2b Binary files /dev/null and b/src/assets/images/liveIcon/bg2.png differ diff --git a/src/assets/images/liveIcon/bg3.png b/src/assets/images/liveIcon/bg3.png new file mode 100644 index 0000000..1dc02db Binary files /dev/null and b/src/assets/images/liveIcon/bg3.png differ diff --git a/src/assets/images/liveIcon/bg4.png b/src/assets/images/liveIcon/bg4.png new file mode 100644 index 0000000..436e9c9 Binary files /dev/null and b/src/assets/images/liveIcon/bg4.png differ diff --git a/src/assets/images/liveIcon/bg5.png b/src/assets/images/liveIcon/bg5.png new file mode 100644 index 0000000..e396de3 Binary files /dev/null and b/src/assets/images/liveIcon/bg5.png differ diff --git a/src/assets/images/liveIcon/bg6.png b/src/assets/images/liveIcon/bg6.png new file mode 100644 index 0000000..5038bc6 Binary files /dev/null and b/src/assets/images/liveIcon/bg6.png differ diff --git a/src/assets/images/share3.png b/src/assets/images/share3.png new file mode 100644 index 0000000..2fdd57e Binary files /dev/null and b/src/assets/images/share3.png differ diff --git a/src/hooks/useContinuousClickLive.js b/src/hooks/useContinuousClickLive.js new file mode 100644 index 0000000..529fc67 --- /dev/null +++ b/src/hooks/useContinuousClickLive.js @@ -0,0 +1,22 @@ +export default function useContinuousClickLive() { + const addContinuousClickLive = (boxClass) => { + const b = Math.floor(Math.random() * 6) + 1 + const bl = Math.floor(Math.random() * 11) + 1 // bl1~bl11 + + let d = document.createElement("div") + d.className = `bubble b${b} bl${bl}` + d.dataset.t = String(Date.now()) + const likeBox = document.querySelector(boxClass) + likeBox.appendChild(d) + ;((d) => { + d.addEventListener("animationend", () => { + debugger + if (likeBox.contains(d)) { + likeBox.removeChild(d) + } + }) + })(d) + } + + return addContinuousClickLive +} diff --git a/src/views/VideoPlay/hComponents/ChatFrame.vue b/src/views/VideoPlay/hComponents/ChatFrame.vue index 166f92e..f338c34 100644 --- a/src/views/VideoPlay/hComponents/ChatFrame.vue +++ b/src/views/VideoPlay/hComponents/ChatFrame.vue @@ -20,12 +20,11 @@ detail.advisorBasic && detail.advisorBasic.avatar ? detail.advisorBasic.avatar : defaultPhoto - " - /> + " />
@@ -49,16 +48,14 @@ `li${item.id}`, item.phone === store.state.userInfo.userId ? 'row-reverse' : '', ]" - :key="item.id" - > + :key="item.id">