Procházet zdrojové kódy

Merge branch 'feature/v4socket' of http://192.168.0.115:3000/bill/mini-shop into feature/v4socket

tangning před 3 roky
rodič
revize
1131c8ee53

+ 24 - 18
pages/roomManger/roomManger.js

@@ -14,7 +14,7 @@ Page({
     isSearch: false,
     state: true,
     canShow: false,
-    maxPage:false,
+    maxPage: false,
     fetcherData: {
       type: 32,
       address: '',
@@ -29,7 +29,9 @@ Page({
       data
     } = await util.request(api.UserInfo)
     console.log('UserInfo', data)
-    let { canShow } = data
+    let {
+      canShow
+    } = data
     wx.setStorageSync('userinfoDetail', data)
     this.setData({
       canShow: canShow == 1 ? false : true,
@@ -40,18 +42,15 @@ Page({
     })
   },
   async handleDelete(e) {
-    const businessId = e.target.dataset&&e.target.dataset.id
-    if (this.data.fetcherData.state == 102) {
-
-    }else{
-      
-    }
-
+    const businessId = e.target.dataset && e.target.dataset.id
     const {
-      data,code
-    } = await util.request(api.deleteRoom,{businessId},'POST', 'application/json')
-    if(code !== 200) return
-    let roomList = this.data.roomList.filter(ele => ele.businessId !==businessId )
+      data,
+      code
+    } = await util.request(api.deleteRoom, {
+      businessId
+    }, 'POST', 'application/json')
+    if (code !== 200) return
+    let roomList = this.data.roomList.filter(ele => ele.businessId !== businessId)
     this.setData({
       roomList: roomList,
     })
@@ -126,11 +125,13 @@ Page({
           // debugger
           if (res.code === 200) {
             if (res.data.data.length != 0) {
-              let { totalPages } = res.data
+              let {
+                totalPages
+              } = res.data
               this.setData({
                 roomList: this.data.roomList.concat(res.data.data),
                 'fetcherData.page': this.data.fetcherData.page + 1,
-                maxPage:totalPages == this.data.fetcherData.page,
+                maxPage: totalPages == this.data.fetcherData.page,
               })
 
             } else {
@@ -142,7 +143,7 @@ Page({
           this.setData({
             loading: false
           })
-          console.log('roomList', this.data.roomList,this.data.fetcherData.page);
+          console.log('roomList', this.data.roomList, this.data.fetcherData.page);
 
         } catch (error) {
           this.setData({
@@ -247,7 +248,7 @@ Page({
    * 生命周期函数--监听页面初次渲染完成
    */
   onReady: function () {
-  
+
   },
 
   /**
@@ -275,7 +276,12 @@ Page({
    * 页面相关事件处理函数--监听用户下拉动作
    */
   onPullDownRefresh: function () {
-
+    this.setData({
+      'fetcherData.page': 1,
+      "roomList":[],
+    }, () => {
+      this.getRoomList()
+    })
   },
 
   /**

+ 1 - 1
pages/roomManger/roomManger.json

@@ -1,6 +1,6 @@
 {
   "navigationBarTitleText": "我的房间",
-  "enablePullDownRefresh": false,
+  "enablePullDownRefresh": true,
   "usingComponents": {
     "partyItem": "../../component/partyItem/partyItem",
     "swider-left": "../../component/slider-left/index"

+ 1 - 1
pages/webview/index.js

@@ -20,7 +20,7 @@ Page({
     temp: '',
     live_base_url: 'rtmp://120.24.85.77:1935/hls',
     peopleCount: 5,
-    surplus: 5,
+    surplus: 0,
     type: '',
     shareStatus: 0
     // url: 'https://www.4dkankan.com/showProPC.html?m=vroMUXdx&origin=4Dplaza&sid=1046051&room_id=1596785144930&user_id=44'

+ 2 - 2
socket.js

@@ -362,7 +362,7 @@ export default {
       roomId: roomId,
       sceneNumber: sceneId,
       onlineStatus: 1,
-      userLimitNum: capacities
+      userLimitNum: capacities || 50
     }
   },
 
@@ -874,7 +874,7 @@ export default {
       noMute: true
     })
   },
-  
+
   openMic() {
     getApp().globalData.voiceProps.noMute = false
     this.socketSendMessage('changeVoiceStatus', {

binární
static/images/add@2x.png