Commit 1e93dd2f by qlintonger xeno

通话数据问题准备修复+1

parent 3781da94
...@@ -99,12 +99,17 @@ export class AgoraHandle { ...@@ -99,12 +99,17 @@ export class AgoraHandle {
break; break;
} }
handleCommonCall(msgData, toID, fromID) handleCommonCall(msgData, toID, fromID)
if (!chatChannelState.value.currentChatters.includes(toID)) { toID.split(',').forEach(function(a) {
chatChannelState.value.currentChatters.push(toID) if (!chatChannelState.value.currentChatters.includes(a)) {
chatChannelState.value.currentChatters.push(a)
} }
if (!chatChannelState.value.currentChatters.includes(fromID)) { })
chatChannelState.value.currentChatters.push(fromID) fromID.split(',').forEach(function(a) {
if (!chatChannelState.value.currentChatters.includes(a)) {
chatChannelState.value.currentChatters.push(a)
} }
})
chatChannelState.value.channelInitiator = toID; chatChannelState.value.channelInitiator = toID;
chatChannelState.value.currentState = CallState.callOut chatChannelState.value.currentState = CallState.callOut
break break
...@@ -116,9 +121,11 @@ export class AgoraHandle { ...@@ -116,9 +121,11 @@ export class AgoraHandle {
break; break;
} }
handleCommonCall(msgData) handleCommonCall(msgData)
if (!chatChannelState.value.currentChatters.includes(fromID)) { fromID.split(',').forEach(function(a) {
chatChannelState.value.currentChatters.push(fromID) if (!chatChannelState.value.currentChatters.includes(a)) {
chatChannelState.value.currentChatters.push(a)
} }
})
chatChannelState.value.channelInitiator = fromID chatChannelState.value.channelInitiator = fromID
toID.split(',') toID.split(',')
.forEach(function (id) { .forEach(function (id) {
...@@ -375,7 +382,7 @@ export class AgoraHandle { ...@@ -375,7 +382,7 @@ export class AgoraHandle {
} }
forceUpdateOnlineUsers() { forceUpdateOnlineUsers() {
this.agoraApp.sendWSFromCall('0', 'GetCompanyUserList'); this.AnyRemote.sendWSFromCall('0', 'GetCompanyUserList');
} }
async joinChatRoom() { async joinChatRoom() {
......
...@@ -28,10 +28,15 @@ import { storeToRefs } from 'pinia' ...@@ -28,10 +28,15 @@ import { storeToRefs } from 'pinia'
import { CallState } from 'AnyR/constants/chatChannelRelated' import { CallState } from 'AnyR/constants/chatChannelRelated'
import { useAnyR } from 'AnyR/index' import { useAnyR } from 'AnyR/index'
import useUserStore from '@/store/user' import useUserStore from '@/store/user'
import {onMounted} from 'vue'
const userStore = useUserStore() const userStore = useUserStore()
const AnyR = useAnyR() const AnyR = useAnyR()
onMounted(function() {
AnyR?.agora.forceUpdateOnlineUsers();
})
const sendCallRequest = function (id: any) { const sendCallRequest = function (id: any) {
if (AnyR.agora) { if (AnyR.agora) {
AnyR.agora.sendCallRequest(id) AnyR.agora.sendCallRequest(id)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment