浏览代码

转回shop.html

gemercheung 3 年之前
父节点
当前提交
8ccab38f80
共有 1 个文件被更改,包括 17 次插入14 次删除
  1. 17 14
      socket.js

+ 17 - 14
socket.js

@@ -55,7 +55,9 @@ let urlToJson = (url = window.location.href) => { // 箭头函数默认传值为
 export default {
 
   joinUrl() {
-    const url = true ? this.data.url.replace('shop.html', 'test-shop.html') : this.data.url;
+    // 去除test-shop,转回shop
+    // const url = true ? this.data.url.replace('shop.html', 'test-shop.html') : this.data.url;
+  const url =  this.data.url;
 
     let options = {
       API_BASE_URL: api.API_BASE_URL,
@@ -366,6 +368,7 @@ export default {
       sceneNumber: sceneId,
       onlineStatus: 1,
       assistantId: assistantId,
+      oid: userInfo.weixin_openid,
       userLimitNum: capacities || 50
     }
   },
@@ -498,19 +501,19 @@ export default {
         options.roomId = Number(data.roomId)
       }
     })
-    // 有MIC通知,主要是其他用户禁MIC
-    socket.on('beHasMic', (data) => {
-      const socketOptions = this.data.socketOptions
-      if (data.user) {
-        const isOther = (socketOptions.role !== 'leader' && (Number(socketOptions.userId) !== Number(data.user.userId)));
-        if (isOther) {
-          this.closeMic();
-          // wx.showToast({
-          //   title: '关mic' + isOther
-          // })
-        }
-      }
-    })
+    // 有MIC通知,主要是其他用户禁MIC 移到中间层处理。
+    // socket.on('beHasMic', (data) => {
+    //   const socketOptions = this.data.socketOptions
+    //   if (data.user) {
+    //     const isOther = (socketOptions.role !== 'leader' && (Number(socketOptions.userId) !== Number(data.user.userId)));
+    //     if (isOther) {
+    //       this.closeMic();
+    //       // wx.showToast({
+    //       //   title: '关mic' + isOther
+    //       // })
+    //     }
+    //   }
+    // })
 
     socket.on("beKicked", data => {
       const that = this