|
@@ -777,6 +777,8 @@ export default {
|
|
|
// 真正退出房间
|
|
|
async exitRoom() {
|
|
|
const roomId = this.data.socketOptions.roomId;
|
|
|
+ const role = this.role;
|
|
|
+
|
|
|
const result = await util.request(api.exitRoom, {
|
|
|
businessId: roomId
|
|
|
}, 'POST', 'application/json');
|
|
@@ -786,9 +788,17 @@ export default {
|
|
|
})
|
|
|
this.stopCall();
|
|
|
this.socketStop();
|
|
|
- wx.redirectTo({
|
|
|
- url: '/pages/roomManger/roomManger',
|
|
|
- });
|
|
|
+
|
|
|
+ if (role === 'leader') {
|
|
|
+ wx.redirectTo({
|
|
|
+ url: '/pages/roomManger/roomManger',
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ wx.switchTab({
|
|
|
+ url: '/pages/index/index'
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
async exit() {
|
|
|
// this.stopCall()
|