Commit ad9e8127 by qlintonger xeno

Merge remote-tracking branch 'origin/master'

parents d16b3c3b 94ffd49f
...@@ -54,9 +54,7 @@ const useContactsStore = defineStore('contacts', { ...@@ -54,9 +54,7 @@ const useContactsStore = defineStore('contacts', {
} }
}, },
persist: { persist: false
storage: sessionStorage // 存储的类型,默认localStorage
}
}) })
export default useContactsStore export default useContactsStore
...@@ -21,10 +21,11 @@ import contactsListChoose from './contactsListChoose.vue' ...@@ -21,10 +21,11 @@ import contactsListChoose from './contactsListChoose.vue'
import { cloneDeep } from 'lodash' import { cloneDeep } from 'lodash'
import { videoGroup } from '@/constants/common/user' import { videoGroup } from '@/constants/common/user'
import useUserStore from '@/store/user' import useUserStore from '@/store/user'
import {useAnyR} from "AnyR/index"; import { useAnyR } from 'AnyR/index'
import { CallState } from 'AnyR/constants/chatChannelRelated'
const userStore = useUserStore() const userStore = useUserStore()
const anyR = useAnyR(); const anyR = useAnyR()
//选中的联系人数组id //选中的联系人数组id
const chooseUserIds = ref([]) const chooseUserIds = ref([])
const showModel = ref(false) const showModel = ref(false)
...@@ -44,7 +45,7 @@ const getUserListGroup = computed(() => { ...@@ -44,7 +45,7 @@ const getUserListGroup = computed(() => {
result[groupName] = [] result[groupName] = []
} }
//在线人员 //在线人员
if (getOnlineContacts.value.find((_item) => _item.id == item.id) && userStore.user_info.id !== item.id) { if (getOnlineContacts.value.find((_item) => _item.id == item.id) && userStore.user_info.id !== item.id && item.callState == CallState.idle && item.hasCamera == 1 && item.hasMike == 1) {
result[groupName].push(item) result[groupName].push(item)
} }
return result return result
...@@ -52,9 +53,9 @@ const getUserListGroup = computed(() => { ...@@ -52,9 +53,9 @@ const getUserListGroup = computed(() => {
}) })
//多人呼叫 //多人呼叫
const multiCall = () => { const multiCall = () => {
console.log(chooseUserIds.value); console.log(chooseUserIds.value)
anyR?.agora.sendCallRequest(chooseUserIds.value.join(',')); anyR?.agora.sendCallRequest(chooseUserIds.value.join(','))
showModel.value = false; showModel.value = false
} }
defineExpose({ defineExpose({
open open
......
...@@ -7,6 +7,12 @@ ...@@ -7,6 +7,12 @@
<global-icon icon="mic" :size="12" color="rgb(var(--success-6))"></global-icon> <global-icon icon="mic" :size="12" color="rgb(var(--success-6))"></global-icon>
</div> </div>
</div> </div>
<!-- <div class="absolute top-0 left-0 right-0 bottom-0 flex-center flex-col">
<div class="text-base text-theme-text1">呼叫中...</div>
<a-button shape="circle" status="danger" type="primary" @click="hangupCall">
<global-icon :size="20" color="var(--color-bg-white)" icon="phone-hangup"></global-icon>
</a-button>
</div> -->
</div> </div>
<div class="flex justify-center w-full"> <div class="flex justify-center w-full">
<div v-if="!isUserHost" class="w-[120px] h-[72px] item" @click="hangupCall"> <div v-if="!isUserHost" class="w-[120px] h-[72px] item" @click="hangupCall">
...@@ -53,18 +59,18 @@ import { isUserHost } from 'AnyR/states/chatChannelStates' ...@@ -53,18 +59,18 @@ import { isUserHost } from 'AnyR/states/chatChannelStates'
import { ref } from 'vue' import { ref } from 'vue'
import { isCurrentUserMuted } from 'AnyR/states/chatChannelStates' import { isCurrentUserMuted } from 'AnyR/states/chatChannelStates'
import { screenShareMetaData } from 'AnyR/states/chatChannelStates' import { screenShareMetaData } from 'AnyR/states/chatChannelStates'
import {onMounted, onUpdated} from "vue"; import { onMounted, onUpdated } from 'vue'
const ps = defineProps<{ const ps = defineProps<{
id: any id: any
}>() }>()
onMounted(function () { onMounted(function () {
AnyR?.agora.forceReplay(ps.id) AnyR?.agora.forceReplay(ps.id)
}) })
onUpdated(function () { onUpdated(function () {
AnyR?.agora.forceReplay(ps.id) AnyR?.agora.forceReplay(ps.id)
}) })
const isVoiceChatOnly = ref(false) const isVoiceChatOnly = ref(false)
......
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