From b48a5f64fe196bee6f1c7eb0be1b78c9ebec0860 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Mon, 11 Oct 2021 08:44:27 +0800
Subject: [PATCH] 修改完善
---
components/submit/submit.vue | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/components/submit/submit.vue b/components/submit/submit.vue
index 918e8a1..7deab6e 100644
--- a/components/submit/submit.vue
+++ b/components/submit/submit.vue
@@ -3,7 +3,7 @@
<view class="submit">
<view class="submit-chat">
<view class="bt-img">
- <image src="../../static/images/chatroom/voice.png" mode="" @tap="records" />
+ <image :src="audio" mode="" @tap="records" />
</view>
<textarea auto-height="true" class="chat-send btn" :class="{displaynone: isrecord}" @input="inputs"
v-model="msg" @focus="focus" />
@@ -87,6 +87,7 @@
timer: '',
vlength: 0,
pageY: 0,
+ audio: "../../static/start-audio.png"
};
},
mounted() {
@@ -105,12 +106,19 @@
},
// 点击切换音频
records() {
+ if (this.audio == "../../static/start-audio.png") {
+ this.audio = "../../static/start-input.png"
+ } else {
+ this.audio = "../../static/start-audio.png"
+ }
this.isrecord = !this.isrecord
this.isemoji = false
this.ismore = false
+
setTimeout(() => {
this._getElementHeight()
}, 10)
+
},
// 点击弹出表情
emoji() {
@@ -170,10 +178,12 @@
},
// 发送消息
send(msg, type) {
+
let data = {
message: msg,
types: type
}
+
this.$emit('inputs', data)
setTimeout(() => {
this.msg = ''
@@ -225,6 +235,7 @@
clearInterval(this.timer)
recorderManager.stop()
recorderManager.onStop((res) => {
+ console.log(res, 4589)
let data = {
voice: res.tempFilePath,
time: this.vlength
--
Gitblit v1.9.3