This commit is contained in:
yj 2025-02-20 15:55:11 +08:00
parent 54187034df
commit 5ae26babb1
2 changed files with 66 additions and 18 deletions

View File

@ -28,6 +28,44 @@ Page({
that.setData({ that.setData({
netWorkErrorDialog: true, netWorkErrorDialog: true,
}) })
wx.setStorage({
key: "isConnected",
data: false
})
}
},
})
wx.getStorage({
key: 'isAllLeave',
success(res: any) {
if (res.data) {
Message.success({
context: that,
offset: [20, 32],
duration: 2000,
content: '管理员已结束会议!',
});
wx.setStorage({
key: "isAllLeave",
data: false
})
}
},
})
wx.getStorage({
key: 'isForceExitRoom',
success(res: any) {
if (res.data) {
Message.success({
context: that,
offset: [20, 32],
duration: 2000,
content: '管理员已将你移出会议!',
});
wx.setStorage({
key: "isForceExitRoom",
data: false
})
} }
}, },
}) })
@ -130,6 +168,14 @@ Page({
key: "isConnected", key: "isConnected",
data: false data: false
}) })
wx.setStorage({
key: "isAllLeave",
data: false
})
wx.setStorage({
key: "isForceExitRoom",
data: false
})
this.setData({ this.setData({
netWorkErrorDialog: false netWorkErrorDialog: false
}) })

View File

@ -472,27 +472,29 @@ Page({
break; break;
// 全员离开房间 // 全员离开房间
case 'AllLeave': case 'AllLeave':
this.message('管理员已结束会议!').success() wx.setStorage({
setTimeout(() => { key: "isAllLeave",
wx.disableAlertBeforeUnload({ data: true
complete: () => { })
onStop() wx.disableAlertBeforeUnload({
wx.navigateBack() complete: () => {
} onStop()
}) wx.navigateBack()
}, 1000); }
})
break; break;
// 移出会议 // 移出会议
case 'ForceExitRoom': case 'ForceExitRoom':
this.message('管理员已将你移出会议!').success() wx.setStorage({
setTimeout(() => { key: "isForceExitRoom",
wx.disableAlertBeforeUnload({ data: true
complete: () => { })
onStop() wx.disableAlertBeforeUnload({
wx.navigateBack() complete: () => {
} onStop()
}) wx.navigateBack()
}, 1000); }
})
break; break;
// 更新视图模式 // 更新视图模式
case 'RefreshView': case 'RefreshView':