|
|
@@ -40,7 +40,7 @@
|
|
|
<text class="video_view_txt" style="margin: 0 0 0 30rpx;">开启</text>
|
|
|
</view> -->
|
|
|
|
|
|
- <image @click="offVideo()" style="width: 50px; height: 50px; margin: 0 0 0 330rpx;"
|
|
|
+ <image @click="offVideo(false,true)" style="width: 50px; height: 50px; margin: 0 0 0 330rpx;"
|
|
|
src="../../static/image/10.png" mode=""></image>
|
|
|
</view>
|
|
|
|
|
|
@@ -81,7 +81,8 @@
|
|
|
import ZegoRemoteView from '@/zego-express-video-uniapp/zego-view/ZegoRemoteView';
|
|
|
|
|
|
import {
|
|
|
- assign, forEach
|
|
|
+ assign,
|
|
|
+ forEach
|
|
|
} from 'lodash-es';
|
|
|
export default {
|
|
|
data() {
|
|
|
@@ -109,7 +110,8 @@
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState({
|
|
|
- isVideoCallRefused: state => state.isVideoCallRefused
|
|
|
+ isVideoCallRefused: state => state.isVideoCallRefused,
|
|
|
+ currentReceiveUserID: state => state.currentReceiveUserID
|
|
|
})
|
|
|
},
|
|
|
components: {
|
|
|
@@ -242,7 +244,7 @@
|
|
|
|
|
|
// 房间用户变化通知
|
|
|
this.engine.on("roomUserUpdate", (roomID, updateType, userList) => {
|
|
|
- console.log(updateType,ZegoUpdateType.Delete,'roomUserUpdate')
|
|
|
+ console.log(updateType, ZegoUpdateType.Delete, 'roomUserUpdate')
|
|
|
console.log(userList)
|
|
|
console.log("有其他用户进出房间");
|
|
|
if (updateType == ZegoUpdateType.Add) {
|
|
|
@@ -435,7 +437,7 @@
|
|
|
},
|
|
|
|
|
|
// 挂断退出
|
|
|
- async offVideo(isRefused = false) {
|
|
|
+ async offVideo(isRefused = false, isNotice = true) {
|
|
|
console.warn('进入了啊offVideo', this.engine)
|
|
|
this.updateIsRefusedCall(false);
|
|
|
this.updateTalkingStatus(false);
|
|
|
@@ -480,6 +482,23 @@
|
|
|
},
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+ if (isNotice) {
|
|
|
+ console.log(this.videoObj, 'is notice')
|
|
|
+ const socketData = {
|
|
|
+ action: 'reject_video', // 动作标识,必填
|
|
|
+ recv_user_id: that.currentReceiveUserID, // 接收人用户id, 非必填
|
|
|
+ data: {},
|
|
|
+ }
|
|
|
+
|
|
|
+ API.socketTask.send({
|
|
|
+ data: JSON.stringify(socketData),
|
|
|
+ async success(res) {
|
|
|
+ console.log('reject_video 消息发送成功 reject_video')
|
|
|
+ },
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
this.handleBack()
|
|
|
}, 1500)
|
|
|
// uni.redirectTo({
|
|
|
@@ -497,7 +516,7 @@
|
|
|
|
|
|
handleBack() {
|
|
|
const pages = getCurrentPages();
|
|
|
- if(pages.length<3){
|
|
|
+ if (pages.length < 3) {
|
|
|
uni.switchTab({
|
|
|
url: '/pages/response/index',
|
|
|
success(res) {
|
|
|
@@ -510,7 +529,7 @@
|
|
|
console.warn('返回上一页执行完成,当前页面:视频通话页面 ')
|
|
|
}
|
|
|
})
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
uni.navigateBack({
|
|
|
delta: 1
|
|
|
})
|
|
|
@@ -519,7 +538,7 @@
|
|
|
},
|
|
|
|
|
|
async onLoad(optinos) {
|
|
|
-
|
|
|
+
|
|
|
if (this.isVideoCallRefused) {
|
|
|
that.$refs.uToast.show({
|
|
|
type: 'default',
|