Prechádzať zdrojové kódy

feat:提交代码

jinx 4 rokov pred
rodič
commit
b1ded72f90

+ 0 - 1
pages/index/index.js

@@ -123,7 +123,6 @@ Router({
       hasData: true
     });
     this.getRoomList()
-
     app.onPullDownRefresh()
   },
   onReachBottom: function () {

+ 1 - 1
pages/index/index.wxml

@@ -54,7 +54,7 @@
 		<view class="middleList" wx:for="{{middleTabList}}" wx:for-item="i" wx:if="{{middleType==i.type && middleList[i.type].length>0 }}">
 			<view class="middleList_item" bindtap="middle_gotoWV" data-id="{{j.id}}" wx:for="{{middleList[i.type]}}" wx:for-item="j">
 				<view class="middleList_cover">
-					<image mode="heightFix" src="{{j.appListPicUrl}}"></image>
+					<image mode="scaleToFill" src="{{j.appListPicUrl}}"></image>
 				</view>
 				<text class="middleList_title">{{j.name}}</text>
 				{{item.type}}

+ 7 - 3
pages/searchRoom/searchRoom.js

@@ -34,6 +34,9 @@ Page({
   },
   search() {
     if (this.data.fetcherData.name != '') {
+      wx.showLoading({
+        title: '加载中...',
+      });
       // console.log(this.data.searchKey)
       this.setData({
         isSearch: true
@@ -67,15 +70,16 @@ Page({
     }
 
     util.request(api.BrandList, this.data.fetcherData).then((res) => {
-      console.log(res)
+      wx.hideLoading()
       if (res.errno === 0) {
+
         if (this.data.fetcherData.type == '21') {
-        
+
           this.setData({
             storeList: res.data.data,
           })
         } else {
-        
+
           this.setData({
             roomList: res.data.data,
           })

+ 10 - 4
pages/sence/sence.js

@@ -25,6 +25,9 @@ Page({
   },
   search() {
     if (this.data.fetcherData.name != '') {
+      wx.showLoading({
+        title: '加载中...',
+      });
       // console.log(this.data.searchKey)
       this.searchRoomList()
     } else {
@@ -60,8 +63,12 @@ Page({
 
   },
   searchRoomList() {
+    this.setData({
+      'fetcherData.page': 1,
+      'fetcherData.size': 100,
+    })
     util.request(api.BrandList, this.data.fetcherData).then((res) => {
-      console.log(res)
+      wx.hideLoading()
       if (res.errno === 0) {
         this.setData({
           roomList: res.data.data,
@@ -95,6 +102,7 @@ Page({
         title: 'VR场景直播间'
       })
     }
+    this.getRoomList()
 
   },
 
@@ -108,9 +116,7 @@ Page({
   /**
    * 生命周期函数--监听页面显示
    */
-  onShow: function () {
-    this.getRoomList()
-  },
+  onShow: function () {},
 
   /**
    * 生命周期函数--监听页面隐藏

+ 1 - 1
pages/sence/sence.wxml

@@ -1,6 +1,6 @@
 <view>
   <lip-sync />
-  <auth bindlogin="onShow" />
+  <auth bindlogin="getRoomList" />
   <view class="storeContent">
     <view class="storeSearch">
       <image src="../../static/images/icon/search@2x.png"></image>