From 7ba434aeca61c3af2bdd072abdbf3b130a58384b Mon Sep 17 00:00:00 2001 From: zyronon Date: Wed, 3 Nov 2021 23:52:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=80=9A=E8=AF=9D=E5=BC=B9?= =?UTF-8?q?=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/img/icon/message/video-white.png | Bin 438 -> 0 bytes src/components/Call.vue | 78 ++++++++++++-------- src/components/Comment.vue | 5 +- src/pages/message/chat/Chat.vue | 11 ++- 4 files changed, 57 insertions(+), 37 deletions(-) delete mode 100644 src/assets/img/icon/message/video-white.png diff --git a/src/assets/img/icon/message/video-white.png b/src/assets/img/icon/message/video-white.png deleted file mode 100644 index 4b43a5d23be0d5f55ff856ea54f899a2b588d290..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 438 zcmV;n0ZIOeP)Sx;wSI}UOAh) zn`;yHad1$o3JinML@QGNY0nTImFUM_>qe1?DB)wNmxx`z(id>8i4H$-~i}JJK1&s+kL<}u$VGj1wy)Nm#}Rq z0QP`WU^p@U0jvV$7yvIof0NfGNl&)JMQwWo(y2a{)OhMK0Yb?i2dn_o>1GtW9d{)VOTbz214#%)p(9ypkSJ~_%{v9<(eIpp gK^`yi=>A9G6ZxSC@RO6(&j0`b07*qoM6N<$f
+ @click="isSmall = false"> 呼叫中
+ :style="isSmall ? callFloatStyle : {zIndex:10}" + :class="isSmall?'small':''" + v-if="isShowAudioCall">
- +
等待对方接听...
- + + 摄像头
-
- +
+ + 免提
- +
@@ -56,13 +62,14 @@ export default { data() { return { mitt: inject('mitt'), - call: { - callFloatTransitionTime: 300, - callFloatLeft: 15, - callFloatTop: 100, - isSmall: false, - isShowAudioCall: false, - }, + callFloatTransitionTime: 300, + callFloatLeft: 15, + callFloatTop: 100, + isOpenCamera: false, + isOpenAudio: true, + isExpand: true, + isSmall: false, + isShowAudioCall: false, height: 0, width: 0, } @@ -70,36 +77,43 @@ export default { computed: { callFloatStyle() { return { - 'transition-duration': this.call.callFloatTransitionTime + 'ms', - left: this.call.callFloatLeft + 'px', - top: this.call.callFloatTop + 'px', + 'transition-duration': this.callFloatTransitionTime + 'ms', + left: this.callFloatLeft + 'px', + top: this.callFloatTop + 'px', + } + } + }, + watch: { + isShowAudioCall(newVal) { + if (!newVal) { + this.isOpenCamera = false + this.isOpenAudio = true } } }, - watch: {}, created() { }, methods: { touchmove(e) { - this.call.callFloatTransitionTime = 0 - this.call.callFloatLeft = e.touches[0].pageX - 35 - this.call.callFloatTop = e.touches[0].pageY - 40 + this.callFloatTransitionTime = 0 + this.callFloatLeft = e.touches[0].pageX - 35 + this.callFloatTop = e.touches[0].pageY - 40 }, touchend(e) { - this.call.callFloatTransitionTime = 300 - if (this.call.callFloatLeft < this.width / 2) { - this.call.callFloatLeft = 15 + this.callFloatTransitionTime = 300 + if (this.callFloatLeft < this.width / 2) { + this.callFloatLeft = 15 } else { - this.call.callFloatLeft = this.width - 15 - 70 + this.callFloatLeft = this.width - 15 - 70 } }, }, mounted() { this.mitt.on('showAudioCall', () => { - if (this.call.isShowAudioCall) { - this.call.isSmall = false + if (this.isShowAudioCall) { + this.isSmall = false } else { - this.call.isShowAudioCall = true + this.isShowAudioCall = true } }) this.height = document.body.clientHeight diff --git a/src/components/Comment.vue b/src/components/Comment.vue index 253f63c..e442729 100644 --- a/src/components/Comment.vue +++ b/src/components/Comment.vue @@ -32,9 +32,9 @@
- - + {{ $likeNum(item.loveNum) }}
@@ -478,6 +478,7 @@ export default { } span { + font-size: 1rem; transform: translateY(-.5rem); } } diff --git a/src/pages/message/chat/Chat.vue b/src/pages/message/chat/Chat.vue index 76d4fa6..51e577f 100644 --- a/src/pages/message/chat/Chat.vue +++ b/src/pages/message/chat/Chat.vue @@ -8,8 +8,10 @@ zzzz
- + +
@@ -449,7 +451,6 @@ export default { } }, ], - typing: false, loading: false, opening: false, @@ -585,6 +586,10 @@ export default { background: @second-btn-color; } } + + .right{ + display: flex; + } } .message-wrapper {