|
@@ -57,7 +57,7 @@ export default {
|
|
|
joinUrl() {
|
|
|
|
|
|
let url = this.data.url;
|
|
|
-
|
|
|
+
|
|
|
//隐藏部分
|
|
|
// if (this.data.url && /smobile.html/.test(this.data.url)) {
|
|
|
// const newUrl = this.data.url.replace('smobile.html', 'shop.html')
|
|
@@ -618,17 +618,19 @@ export default {
|
|
|
const roomId = data.roomId
|
|
|
// debugger
|
|
|
if (socketOptions.userId == userId && this.options.roomId == roomId) {
|
|
|
+ this.exitRoom();
|
|
|
wx.showToast({
|
|
|
- title: '您已被踢出房间!',
|
|
|
+ title: '您已被踢出房间!',
|
|
|
icon: 'none',
|
|
|
- complete: () => {}
|
|
|
+ complete: () => {
|
|
|
+ setTimeout(() => {
|
|
|
+ that.socketStop();
|
|
|
+ wx.switchTab({
|
|
|
+ url: '/pages/index/index',
|
|
|
+ })
|
|
|
+ }, 1000)
|
|
|
+ }
|
|
|
})
|
|
|
- setTimeout(() => {
|
|
|
- that.socketStop();
|
|
|
- wx.switchTab({
|
|
|
- url: '/pages/index/index',
|
|
|
- })
|
|
|
- }, 1000)
|
|
|
}
|
|
|
}
|
|
|
});
|
|
@@ -965,6 +967,16 @@ export default {
|
|
|
}
|
|
|
|
|
|
},
|
|
|
+
|
|
|
+ exitRoomApi() {
|
|
|
+ const roomId = this.data.socketOptions.roomId;
|
|
|
+ const role = this.role;
|
|
|
+ util.request(api.exitRoom, {
|
|
|
+ businessId: roomId
|
|
|
+ }, 'POST', 'application/json');
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
async exit() {
|
|
|
// this.stopCall()
|
|
|
getApp().globalData.rtcParams = []
|