mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-17 19:23:26 +00:00
no message
This commit is contained in:
parent
35e55b8677
commit
e2cec420fa
@ -374,22 +374,25 @@ export default {
|
||||
})
|
||||
}
|
||||
// 会议事件
|
||||
window.__onMeetingEvent = ({act, uuid, meetingid, status}) => {
|
||||
switch (act) {
|
||||
window.__onMeetingEvent = (event) => {
|
||||
if (!$A.isJson(event)) {
|
||||
return;
|
||||
}
|
||||
switch (event.act) {
|
||||
// 获取用户信息
|
||||
case "getInfo":
|
||||
const isTourist = (uuid + '').indexOf('88888') !== -1;
|
||||
const isTourist = (event.uuid + '').indexOf('88888') !== -1;
|
||||
this.$store.dispatch("call", {
|
||||
url: isTourist ? 'users/meeting/tourist' : 'users/basic',
|
||||
data: {
|
||||
userid: isTourist ? uuid : (uuid + '').substring(6),
|
||||
tourist_id: uuid,
|
||||
userid: isTourist ? event.uuid : (event.uuid + '').substring(6),
|
||||
tourist_id: event.uuid,
|
||||
}
|
||||
}).then(({data}) => {
|
||||
$A.eeuiAppSendMessage({
|
||||
action: 'updateMeetingInfo',
|
||||
infos: {
|
||||
uuid: uuid,
|
||||
uuid: event.uuid,
|
||||
avatar: isTourist ? data?.userimg : data[0]?.userimg,
|
||||
username: isTourist ? data?.nickname : data[0]?.nickname,
|
||||
}
|
||||
@ -406,7 +409,7 @@ export default {
|
||||
case "invent":
|
||||
this.$store.dispatch("showMeetingWindow", {
|
||||
type: "invitation",
|
||||
meetingid: meetingid
|
||||
meetingid: event.meetingid
|
||||
})
|
||||
break;
|
||||
// 结束会议
|
||||
@ -418,18 +421,24 @@ export default {
|
||||
break;
|
||||
// 状态
|
||||
case "status":
|
||||
this.$store.state.appMeetingShow = status
|
||||
this.$store.state.appMeetingShow = event.status
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
// 键盘状态
|
||||
window.__onKeyboardStatus = (data) => {
|
||||
const message = $A.jsonParse(decodeURIComponent(data));
|
||||
this.$store.state.keyboardType = message.keyboardType;
|
||||
this.$store.state.keyboardHeight = message.keyboardHeight;
|
||||
this.$store.state.safeAreaBottom = message.safeAreaBottom;
|
||||
window.__onKeyboardStatus = (event) => {
|
||||
if (!$A.isJson(event)) {
|
||||
// 兼容旧版本
|
||||
event = $A.jsonParse(decodeURIComponent(event));
|
||||
}
|
||||
if (!$A.isJson(event)) {
|
||||
return;
|
||||
}
|
||||
this.$store.state.keyboardType = event.keyboardType;
|
||||
this.$store.state.keyboardHeight = event.keyboardHeight;
|
||||
this.$store.state.safeAreaBottom = event.safeAreaBottom;
|
||||
}
|
||||
// 通知权限
|
||||
window.__onNotificationPermissionStatus = (ret) => {
|
||||
|
||||
@ -205,14 +205,12 @@ export default {
|
||||
// 创建会议
|
||||
case 'add':
|
||||
this.addShow = data.show;
|
||||
this.loadIng = 0;
|
||||
break;
|
||||
|
||||
// 加入会议(直接加入)
|
||||
case 'join':
|
||||
case 'direct':
|
||||
this.addShow = data.show;
|
||||
this.loadIng = 0;
|
||||
this.addData.type = 'join';
|
||||
if (data.meetingNickname) {
|
||||
this.addData.username = data.meetingNickname;
|
||||
@ -246,7 +244,6 @@ export default {
|
||||
// 加入失败
|
||||
case 'error':
|
||||
this.addShow = data.show;
|
||||
this.loadIng = 0;
|
||||
this.invitationShow = data.show;
|
||||
this.invitationLoad = false;
|
||||
$A.modalError('加入会议失败');
|
||||
@ -352,6 +349,8 @@ export default {
|
||||
delete data.msgs;
|
||||
// App 直接使用新窗口打开会议
|
||||
if ($A.isEEUiApp) {
|
||||
loader(true);
|
||||
setTimeout(_ => loader(false), 1200)
|
||||
$A.eeuiAppSendMessage({
|
||||
action: 'startMeeting',
|
||||
meetingParams: {
|
||||
@ -524,6 +523,7 @@ export default {
|
||||
|
||||
async join(options) {
|
||||
this.loadIng++;
|
||||
try {
|
||||
// 音频采集设备状态变化回调
|
||||
AgoraRTC.onMicrophoneChanged = async (changedDevice) => {
|
||||
// When plugging in a device, switch to a device that is newly plugged in.
|
||||
@ -580,12 +580,14 @@ export default {
|
||||
console.error(error)
|
||||
$A.modalError("会议组件加载失败!");
|
||||
}
|
||||
} catch (e) { }
|
||||
this.addShow = false;
|
||||
this.loadIng--;
|
||||
},
|
||||
|
||||
async leave() {
|
||||
this.loadIng++;
|
||||
try {
|
||||
// 删除本地用户和播放器视图。
|
||||
['audioTrack', 'videoTrack'].some(trackName => {
|
||||
this.localUser[trackName]?.stop();
|
||||
@ -600,7 +602,7 @@ export default {
|
||||
this.remoteUsers = [];
|
||||
// 离开频道
|
||||
await this.agoraClient.leave();
|
||||
//
|
||||
} catch (e) { }
|
||||
this.meetingShow = false;
|
||||
this.loadIng--;
|
||||
},
|
||||
|
||||
@ -1 +1 @@
|
||||
Subproject commit 5e3467b177f757e93d3b9ed9067d79a05ae31ff3
|
||||
Subproject commit aa9a81ddbf6dc2a1a35b244e63da6a284299c65a
|
||||
Loading…
x
Reference in New Issue
Block a user