jinx 4 лет назад
Родитель
Сommit
ffc0a2278a
4 измененных файлов с 25 добавлено и 6 удалено
  1. 1 1
      app.js
  2. 1 1
      component/storeItem/storeItem.wxss
  3. 22 3
      pages/searchRoom/searchRoom.js
  4. 1 1
      pages/searchRoom/searchRoom.wxml

+ 1 - 1
app.js

@@ -94,7 +94,7 @@ App({
         this.onGetSysInfo()
     },
     globalData: {
-        city:  wx.getStorageSync('city') ||'珠海',
+        city:  wx.getStorageSync('city') ||'全国',
         voiceProps,
         loginProps,
         userInfo: {

+ 1 - 1
component/storeItem/storeItem.wxss

@@ -28,7 +28,7 @@
   display: -webkit-box;
   -webkit-line-clamp: 2;
   -webkit-box-orient: vertical;
-  height: 88rpx;
+  /* height: 88rpx; */
 }
 
 .storeView {

+ 22 - 3
pages/searchRoom/searchRoom.js

@@ -20,7 +20,15 @@ Page({
       page: 1,
       size: 100,
       name: ''
-    }
+    },
+    typeName: {
+      0: '新房',
+      1: '二手房',
+      2: '公寓',
+      3: '民宿',
+      4: '社区'
+    },
+
   },
   gotoWV: function (event) {
     let id = event.detail
@@ -96,7 +104,7 @@ Page({
         }
       }).catch(err => {
         this.setData({
-          loading: false1
+          loading: false
         })
       });
     }
@@ -108,8 +116,19 @@ Page({
   onLoad: function (options) {
     getApp().checkNetStatu();
     this.setData({
-      'fetcherData.type': options.type || 21
+      'fetcherData.type': options.type || 21,
     })
+    if (this.data.typeName[options.type]) {
+      this.setData({
+        isSearch: true
+      })
+      this.getRoomList()
+      wx.setNavigationBarTitle({
+        title: this.data.typeName[options.type] 
+      })
+    }
+
+
   },
 
   /**

+ 1 - 1
pages/searchRoom/searchRoom.wxml

@@ -2,7 +2,7 @@
   <view class="storeContent">
     <view class="storeSearch">
       <image src="../../static/images/icon/search@2x.png"></image>
-      <input focus="true" bindinput="inputChange" type="text" placeholder="请输入VR场景名称"
+      <input focus="true" bindinput="inputChange" value="{{fetcherData.name}}" type="text" placeholder="请输入VR场景名称"
         placeholder-class="placeholderStyle" />
     </view>
     <view class="searchBtn" bindtap="search">搜索</view>