|
@@ -137,7 +137,7 @@ export default {
|
|
|
this.pauseVideo = false
|
|
|
this.joinUrl()
|
|
|
this.socketSendMessage('changeOnlineStatus', {
|
|
|
- status: true
|
|
|
+ status: 1
|
|
|
})
|
|
|
}
|
|
|
},
|
|
@@ -361,7 +361,7 @@ export default {
|
|
|
isAllowMic: isAllowMic,
|
|
|
roomId: roomId,
|
|
|
sceneNumber: sceneId,
|
|
|
- onlineStatus: true,
|
|
|
+ onlineStatus: 1,
|
|
|
userLimitNum: capacities
|
|
|
}
|
|
|
},
|
|
@@ -420,7 +420,7 @@ export default {
|
|
|
status: noMute ? 0 : 2
|
|
|
})
|
|
|
this.socketSendMessage('changeOnlineStatus', {
|
|
|
- status: true
|
|
|
+ status: 1
|
|
|
})
|
|
|
})
|
|
|
socket.on('reconnect_failed', () => this.setData({
|
|
@@ -721,6 +721,7 @@ export default {
|
|
|
surplus: this.data.peopleCount - data.roomsPerson.length
|
|
|
})
|
|
|
},
|
|
|
+ //deprecated
|
|
|
async newRoom(data) {
|
|
|
if (data.roomId) return;
|
|
|
this.stopCall()
|
|
@@ -773,6 +774,22 @@ export default {
|
|
|
this.readySendCouponCtrl()
|
|
|
}, 300)
|
|
|
},
|
|
|
+ // 真正退出房间
|
|
|
+ async exitRoom() {
|
|
|
+ const roomId = this.data.socketOptions.roomId;
|
|
|
+ const result = await util.request(api.exitRoom, {
|
|
|
+ businessId: roomId
|
|
|
+ }, 'POST', 'application/json');
|
|
|
+
|
|
|
+ this.socketSendMessage('stopCall', {
|
|
|
+ from: 2
|
|
|
+ })
|
|
|
+ this.stopCall();
|
|
|
+ this.socketStop();
|
|
|
+ wx.redirectTo({
|
|
|
+ url: '/pages/roomManger/roomManger',
|
|
|
+ });
|
|
|
+ },
|
|
|
async exit() {
|
|
|
// this.stopCall()
|
|
|
getApp().globalData.rtcParams = []
|
|
@@ -847,6 +864,28 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
+ closeMic(data) {
|
|
|
+
|
|
|
+ getApp().globalData.voiceProps.noMute = false
|
|
|
+ this.socketSendMessage('changeVoiceStatus', {
|
|
|
+ status: 0,
|
|
|
+ user: data.user
|
|
|
+ })
|
|
|
+ getApp().setVoiceProps({
|
|
|
+ noMute: false
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ openMic() {
|
|
|
+ getApp().globalData.voiceProps.noMute = true
|
|
|
+ this.socketSendMessage('changeVoiceStatus', {
|
|
|
+ status: 2,
|
|
|
+ user: data.user
|
|
|
+ })
|
|
|
+ getApp().setVoiceProps({
|
|
|
+ noMute: true
|
|
|
+ })
|
|
|
+ },
|
|
|
callPhone() {
|
|
|
wx.makePhoneCall({
|
|
|
phoneNumber: this.data.contractPhone,
|
|
@@ -1126,32 +1165,6 @@ export default {
|
|
|
getBrand: function (id, code) {
|
|
|
this.getGoodsCount(code, id)
|
|
|
return;
|
|
|
- let that = this;
|
|
|
- util.request(api.SueneCategory, {
|
|
|
- sceneNum: code
|
|
|
- }, 'GET').then(function (res) {
|
|
|
- if (res.code === 0) {
|
|
|
- const comtypes = res.list.map(item => {
|
|
|
- item.width = (item.name.length + (item.num.toString().length / 2) + 2) * 16
|
|
|
- return {
|
|
|
- ...item
|
|
|
- }
|
|
|
- })
|
|
|
-
|
|
|
- that.setData({
|
|
|
- comWidth: comtypes.reduce((a, b) => a + b.width + 10, 0),
|
|
|
- comtypes,
|
|
|
- thumComtypes: (!isIos && comtypes.length > 3) ? comtypes.slice(0, 3) : null,
|
|
|
- currTypeId: comtypes.length > 0 && comtypes[0].category_id
|
|
|
- });
|
|
|
-
|
|
|
- wx.showToast({
|
|
|
- title: 'currTypeId' + that.data.currTypeId.length,
|
|
|
- })
|
|
|
- that.data.currTypeId && that.getGoodsList(id, that.data.currTypeId);
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
},
|
|
|
|
|
|
getGoodsCount(code, id) {
|
|
@@ -1321,7 +1334,7 @@ export default {
|
|
|
|
|
|
onHide() {
|
|
|
this.socketSendMessage('changeOnlineStatus', {
|
|
|
- status: false
|
|
|
+ status: 0
|
|
|
})
|
|
|
|
|
|
this.pauseVideo = true
|