From 5dd014eda15ef241f3a4384ff78e3054106e19ef Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 03 Dec 2021 08:51:31 +0800
Subject: [PATCH] 部分修改
---
components/submit/submit.vue | 18 ++++++++----------
pages/groupChat/chating.vue | 29 ++++++++++++++++-------------
pages/videoCall/videoCall.nvue | 2 +-
3 files changed, 25 insertions(+), 24 deletions(-)
diff --git a/components/submit/submit.vue b/components/submit/submit.vue
index 4591c0e..3e9d6fd 100644
--- a/components/submit/submit.vue
+++ b/components/submit/submit.vue
@@ -76,7 +76,7 @@
const recorderManager = uni.getRecorderManager()
export default {
- props: ['names','callname'],
+ props: ['names', 'callname'],
data() {
return {
isrecord: false,
@@ -91,7 +91,6 @@
};
},
mounted() {
- console.log(this.callname,1111)
},
components: {
emoji,
@@ -114,11 +113,11 @@
this.isrecord = !this.isrecord
this.isemoji = false
this.ismore = false
-
+
setTimeout(() => {
this._getElementHeight()
}, 10)
-
+
},
// 点击弹出表情
emoji() {
@@ -183,7 +182,7 @@
message: msg,
types: type
}
-
+
this.$emit('inputs', data)
setTimeout(() => {
this.msg = ''
@@ -273,10 +272,9 @@
openAudio(val) { //Mains
// console.log(this.names)
// var socketOpen = false;
-
-
uni.navigateTo({
- url: '../videoCall/videoCall?state=' + val + '&type=audio'
+ url: '../videoCall/videoCall?state=' + val + '&type=audio' + '&myname=' + this.names[0] +
+ '&toname=' + this.names[1] + '&callname=' + this.callname
});
},
//接收音频
@@ -307,8 +305,8 @@
// // }
// }
var url = '../videoCall/videoCall?state=' + val + '&type=video' + '&myname=' + this.names[0] +
- '&toname=' + this.names[1] + '&callname=' + this.callname
- console.log(url)
+ '&toname=' + this.names[1] + '&callname=' + this.callname
+ console.log(url)
uni.navigateTo({
url: url
});
diff --git a/pages/groupChat/chating.vue b/pages/groupChat/chating.vue
index 81a7a44..1e29c82 100644
--- a/pages/groupChat/chating.vue
+++ b/pages/groupChat/chating.vue
@@ -3,12 +3,12 @@
<!-- 头部 -->
<u-navbar style="position: relative;" :is-fixed="false" :border-bottom="true" :is-back="true" :title="recName"
- back-icon-color="#fff" :background="{ background: '#0BB9C8' }" title-color="#fff">
+ back-icon-color="#fff" :background="{ background: '#0BB9C8' }" :placeholder="true" title-color="#fff">
- <view slot='right'>
+ <!-- <view slot='right'>
<u-icon @click="chatMessageDetail" class="set-icon" name="more-dot-fill" color="#fff" size="28">
</u-icon>
- </view>
+ </view> -->
</u-navbar>
@@ -36,7 +36,7 @@
</view>
<!-- voice -->
<view class="message" v-if="item.messageType == 2">
- <view class="msg-text voice" :style="{width:item.postMessage.time * 4 + 50 + 'px'}"
+ <view class="msg-text voice" :style="{width:item.postMessage.time * 4 + 60 + 'px'}"
@tap="playVoice(item.postMessage)">
<image src="../../static/images/chatroom/sound.png" mode="" class="voice-img" />
@@ -66,7 +66,7 @@
</view>
<!-- voice -->
<view class="message" v-if="item.messageType == 2">
- <view class="msg-text voice" :style="{width:item.postMessage.time * 4 + 50 + 'px'}"
+ <view class="msg-text voice" :style="{width:item.postMessage.time * 4 + 60 + 'px'}"
@tap="playVoice(item.postMessage)">
{{ item.postMessage.time }}"
<image src="@/static/images/chatroom/sound.png" mode="" class="voice-img" />
@@ -137,14 +137,17 @@
this._getMsg(this.nowpage)
// this.nextPage()
var data = option.data
+
+ option.data = option.data + `"}`
if (this.isJSON(option.data) == true) {
data = JSON.parse(option.data)
}
+
+ console.log(data)
-
- console.log(data, 55555555555555555555555)
this.name = ['wo', option.chatID];
+
if (typeof data.recipientName == "undefined") {
this.callName = data.realName;
} else {
@@ -157,7 +160,6 @@
let that = this;
uni.getSystemInfo({
success(e) {
- // console.log(e);
let {
windowWidth,
windowHeight,
@@ -174,6 +176,12 @@
.exec();
}
});
+ },
+
+ onUnload() {
+ var innerAudioContext = this.innerAudioContext = uni.createInnerAudioContext()
+
+ innerAudioContext.destroy()
},
methods: {
@@ -347,7 +355,6 @@
},
// 音频播放
playVoice(e) {
- console.log(e, 'ok')
var innerAudioContext = this.innerAudioContext = uni.createInnerAudioContext()
// innerAudioContext.autoplay = false
@@ -361,9 +368,6 @@
},
// 接收输入内容
inputs(e) {
-
- console.log(e, 999)
-
var that = this;
this.isanimation = true
let len = this.msgs.length - 1
@@ -404,7 +408,6 @@
},
success: (res) => {
- console.log(res, 89898)
}
});
diff --git a/pages/videoCall/videoCall.nvue b/pages/videoCall/videoCall.nvue
index cf7e038..b64008f 100644
--- a/pages/videoCall/videoCall.nvue
+++ b/pages/videoCall/videoCall.nvue
@@ -227,6 +227,7 @@
onLoad(option) {
var that = this;
+ console.log(option)
that.toName = option.toname;
that.callname = option.callname;
console.log(option)
@@ -262,7 +263,6 @@
type: 'video'
},
success(res) {
- console.log(res, 789)
// if(res.data.res == 0){
// }
--
Gitblit v1.9.3