230320a303 1 سال پیش
والد
کامیت
c53a102153

+ 1 - 0
src/app.jsx

@@ -139,6 +139,7 @@ class App extends Component {
         pages: [
           'estate',
           'list',
+          'listMy',
           'listed',
           'rentlist',
           'rentdtl',

+ 13 - 0
src/app.scss

@@ -123,4 +123,17 @@ pendant {
   border-radius: 0;
   box-shadow: none;
   display: inline-block;
+}
+
+.g-fixed-top-left {
+  position: fixed;
+  top: 50px;
+  left: 20px;
+  width: 64px;
+  height: 64px;
+  z-index: 9999999;
+  .img {
+    width: 64px;
+    height: 64px;
+  }
 }

+ 15 - 0
src/assets/css/house-list.scss

@@ -108,6 +108,21 @@
       width: 220px;
       height: 146px;
     }
+    .f-t {
+      position: absolute;
+      bottom: 0;
+      left: 0;
+      width: 100%;
+      height: 40px;
+      line-height: 40px;
+      overflow: hidden;
+      // background-color: rgba(54,154,247, 0.7);
+      background-color: rgba(139,148,177, 0.7);
+      color: #fff;
+      font-weight: bold;
+      font-size: 24px;
+      text-align: center;
+    }
   }
   .lhl-info {
     width: 400px;

BIN
src/assets/img/icon_sign_left.png


BIN
src/assets/img/images/icon_my_room.png


BIN
src/pages/index/img/1.png


BIN
src/pages/index/img/2.png


BIN
src/pages/index/img/3.png


BIN
src/pages/index/img/4.png


BIN
src/pages/index/img/5.png


BIN
src/pages/index/img/6.png


BIN
src/pages/index/img/toper_bg2.jpg


+ 61 - 4
src/pages/index/index.jsx

@@ -251,6 +251,57 @@ class Index extends Component {
     )
   }
 
+
+
+  renderTheme () {
+    const bg1 = require('./img/1.png')
+    const bg2 = require('./img/2.png')
+    const bg3 = require('./img/3.png')
+    const bg4 = require('./img/4.png')
+    const bg5 = require('./img/5.png')
+    const bg6 = require('./img/6.png')
+    return (
+      <View className="house-theme">
+        <View className="ht-wrap">
+          <Navigator url={'/pagesHouse/list?type=在售,待售,尾盘,售罄&name=新房'} className="ht-item">
+            <View className="ht-p1">新房</View>
+            <View className="ht-p2">产权清晰</View>
+            <View className="ht-p2">简单交易</View>
+            <Image className="ht-bg" src={bg5} />
+          </Navigator>
+        </View>
+        <View className="ht-wrap">
+          <Navigator url={'/pagesHouse/list?type=二手&name=二手房'} className="ht-item">
+            <View className="ht-p1">二手房</View>
+            <View className="ht-p2">现房现卖</View>
+            <View className="ht-p2">所见即所得</View>
+            <Image className="ht-bg" src={bg6} />
+          </Navigator>
+        </View>
+        <View className="ht-wrap">
+          <Navigator url={'/pagesRoom/list'} className="ht-item">
+            <View className="ht-p1">优质房源</View>
+            <View className="ht-p2">买房卖房</View>
+            <View className="ht-p2">楼市必看好房</View>
+            <Image className="ht-bg" src={bg3} />
+          </Navigator>
+        </View>
+        <View className="ht-wrap">
+          <Navigator url={'/pagesRoom/rentlist'} className="ht-item">
+            <View className="ht-p1">出租信息</View>
+            <View className="ht-p2">房东直租</View>
+            <View className="ht-p2">省时省心省力</View>
+            <Image className="ht-bg" src={bg4} />
+          </Navigator>
+        </View>
+      </View>
+    )
+  }
+
+
+
+
+
   getRandomArr (oldArr, num) {
     let tempArr = [...oldArr]
     let newArr = []
@@ -790,7 +841,7 @@ class Index extends Component {
     const { scrollTop, curScrollObj } = this.state
     // // const bargainBg = require('./img/bg_bargain.gif')
     // const { isFirstOpen } = this.state
-    const bg = require('./img/toper_bg.jpg')
+    const bg = require('./img/toper_bg2.jpg')
     const { weatherObj } = this.state
     const isFullGray = Taro.$isFullGray
     return (
@@ -815,11 +866,17 @@ class Index extends Component {
                 <View className="w2">{weatherObj.temperature}℃-{weatherObj.direct}({weatherObj.power})</View>
               </View>
             }
-            {this.renderBanner()}
+            {/* {this.renderBanner()} */}
           </View>
           {/* {this.renderHouseList()} */}
-          {this.renderMainEntry()}
-          <hlSign />
+
+          {/* 
+            {this.renderMainEntry()}
+            <hlSign />
+          */}
+
+          {/* { this.renderTheme() } */}
+
           {this.renderTopNav()}
           {/* {this.renderLine()} */}
           {this.renderHotRecommend()}

+ 76 - 2
src/pages/index/index.scss

@@ -329,14 +329,14 @@ page {
 
 .scoped-header {
   width: 750px;
-  height: 430px;
+  height: 270px;
   position: relative;
   .img {
     position: absolute;
     top: 0;
     left: 0;
     width: 100%;
-    height: 420px;
+    height: 270px;
   }
   .bg2 {
     position: absolute;
@@ -583,3 +583,77 @@ page {
     height: 100px;
   }
 }
+
+
+
+
+
+
+.house-theme {
+  display: flex;
+  flex-wrap: wrap;
+  padding-top: 20px;
+  padding-left: 20px;
+  background-color: #fff;
+  .ht-wrap {
+    width: 50%;
+    &:nth-child(1) {
+      .ht-item {
+        background: #fff1f1;
+      }
+    }
+    &:nth-child(2) {
+      .ht-item {
+        background: #f3eeff
+        ;
+      }
+    }
+    // &:nth-child(3) {
+    //   .ht-item {
+    //     background: #f3f2ff;
+    //   }
+    // }
+    // &:nth-child(4) {
+    //   .ht-item {
+    //     background: #eef7f3;
+    //   }
+    // }
+    &:nth-child(3) {
+      .ht-item {
+        background: #eef6fb;
+      }
+    }
+    &:nth-child(4) {
+      .ht-item {
+        background: #fdf2e4;
+      }
+    }
+  }
+  .ht-item {
+    position: relative;
+    background: #f2f2f2;
+    margin-right: 20px;
+    margin-bottom: 20px;
+    border-radius: 10px;
+    padding: 20px;
+    
+  }
+  .ht-p1 {
+    font-size: 30px;
+    color: #333;
+    font-weight: bold;
+    padding-bottom: 6px;
+  }
+  .ht-p2 {
+    font-size: 26px;
+    color: #999;
+    padding-bottom: 4px;
+  }
+  .ht-bg {
+    width: 274px;
+    height: 110px;
+    position: absolute;
+    right: 0;
+    bottom: 0;
+  }
+}

+ 2 - 2
src/pagesHouse/index.jsx

@@ -981,12 +981,12 @@ class Index extends Component {
           onScroll={this.onScroll.bind(this)}
           lowerThreshold="60"
           onScrollToLower={this.onScrollToLower.bind(this)}>
-          <View className="scoped-box">
+          {/* <View className="scoped-box">
             <View className="sb-title">主题找房</View>
             <View className="sb-content">
               {this.renderTheme()}
             </View>
-          </View>
+          </View> */}
           <hlSign />
           <View className="scoped-box">
             <View className="sb-title">全部楼盘</View>

+ 1 - 1
src/pagesMore/center/uploadRoom2.jsx

@@ -842,7 +842,7 @@ class Index extends Component {
             id 
             ?
             <View style="padding-top: 10px;" className="lff-flex">
-              <View className="lff-btn full t4" onClick={this.saleedHandle.bind(this)}>洪楼已成交</View>
+              <View className="lff-btn full t4" onClick={this.saleedHandle.bind(this)}>标记已成交</View>
             </View>
             : ''
           }

+ 94 - 14
src/pagesRoom/dtl.jsx

@@ -53,7 +53,9 @@ class Index extends Component {
   }
 
   config = {
-    navigationBarTitleText: '房源详情',
+    // navigationBarTitleText: '房源详情',
+    navigationStyle: 'custom',
+    navigationBarTextStyle: 'white',
   }
 
   componentWillMount () {
@@ -73,31 +75,80 @@ class Index extends Component {
   getDtl = () => {
     const { curId } = this.state
     Taro.api.room.apieshousedetail({id: curId}).then(res => {
-      Taro.setNavigationBarTitle({
-        title: res.title || '房源详情'
-      })
+      // Taro.setNavigationBarTitle({
+      //   title: res.title || '房源详情'
+      // })
       this.setState({
         curObj: res || {}
       }, () =>{
         if (this.subRooms) this.subRooms.getData(res.es_house_list || [])
         if (this.subAround) this.subAround.getData(res.estate_id)
-        if (res.sale_user.sale_phone === '18907904022') {
+
+
+        const {referrer} = this.$router.params
+        if (referrer) {
           Taro.api.room.apisalelist({
             show_status: 1,
-            page_size: 99
+            referrer
           }).then(res => {
             const list = res.list || []
-            const arrIndex = Math.floor(Math.random() * list.length)
-            this.setState({
-              saleUserObj: list[arrIndex],
-            })
-            Taro.setStorageSync('APP_cur_sale', {curObj: list[arrIndex]})
+            if (list.length > 0) {
+              this.setState({
+                saleUserObj: list[0]
+              })
+            } else {
+              
+
+              if (res.sale_user.sale_phone === '18907904022') {
+                Taro.api.room.apisalelist({
+                  show_status: 1,
+                  page_size: 99
+                }).then(res => {
+                  const list = res.list || []
+                  const arrIndex = Math.floor(Math.random() * list.length)
+                  this.setState({
+                    saleUserObj: list[arrIndex],
+                  })
+                  Taro.setStorageSync('APP_cur_sale', {curObj: list[arrIndex]})
+                })
+              } else {          
+                this.setState({
+                  saleUserObj: res.sale_user
+                })
+              }
+
+
+            }
           })
         } else {
-          this.setState({
-            saleUserObj: res.sale_user
-          })
+          
+
+          if (res.sale_user.sale_phone === '18907904022') {
+            Taro.api.room.apisalelist({
+              show_status: 1,
+              page_size: 99
+            }).then(res => {
+              const list = res.list || []
+              const arrIndex = Math.floor(Math.random() * list.length)
+              this.setState({
+                saleUserObj: list[arrIndex],
+              })
+              Taro.setStorageSync('APP_cur_sale', {curObj: list[arrIndex]})
+            })
+          } else {          
+            this.setState({
+              saleUserObj: res.sale_user
+            })
+          }
+
+
+
         }
+
+
+
+
+
       })
     })
   }
@@ -779,11 +830,40 @@ class Index extends Component {
     )
   }
 
+  renderFixedTopLift () {
+    const iconSignLeft = require('@img/icon_sign_left.png')
+    return (
+      <View className="g-fixed-top-left" onClick={this.goBackPrev.bind(this)}>
+        <Image className="img" src={iconSignLeft} />
+      </View>
+    )
+  }
+  goBackPrev () {
+    // 获取当前页面栈
+    const pages = Taro.getCurrentPages()
+    
+    // 判断是否有上一页
+    const hasPreviousPage = pages.length > 1
+    
+    if (hasPreviousPage) {
+      // 如果有上一页,使用 navigateBack 返回至上一页
+      Taro.navigateBack({
+        delta: 1,
+      })
+    } else {
+      // 若无上一页,可以导航至指定的其它页面或首页
+      Taro.navigateTo({
+        url: '/pages/index/index',
+      })
+    }
+  }
+
 
   render () {
     const { curObj } = this.state
     return (
       <View className="l-box has-footer">
+        {this.renderFixedTopLift()}
         {this.renderHeader()}
         {this.renderMain()}
         {this.renderImg()}

+ 25 - 0
src/pagesRoom/list.jsx

@@ -587,6 +587,11 @@ class Index extends Component {
         if (FH === 1) FHstr = '一楼'
         if (FH === H) FHstr = '顶楼'
       }
+      let houseTypeStr = '未知户型'
+      if (item.house_type) {
+        let arr = item.house_type.split('-')
+        houseTypeStr = `${arr[0]}室${arr[1]}厅${arr[2]}卫`
+      }
       const cTagStr = item.custom_tag || ''
       const tagViews = cTagStr.split(',').map((tag, tagIndex) => {
         return (
@@ -605,6 +610,7 @@ class Index extends Component {
               : ''
             }
             <Image src={item.pri_image + '_xs'} className="img" />
+            <View className="f-t">{houseTypeStr} | {parseInt(item.area)}㎡</View>
           </View>
           <View className="lhl-info">
             <View className="lhl-p1">{item.title}</View>
@@ -653,12 +659,31 @@ class Index extends Component {
     // }
   }
 
+  linkMyRoom () {
+    Taro.reLaunch({
+      url: '/pagesRoom/listMy'
+    })
+  }
+  renderGoMy () {
+    const icon = require('@img/images/icon_my_room.png')
+    return (
+      <Image className="g-go-home" src={icon} onClick={this.linkMyRoom.bind(this)}/>
+    )
+  }
+
+
   render () {
     const { estateIdCur, isEstateShow } = this.state
     const { estate_id } = this.$router.params
     const estateMoreOptions = {skey: 'estate_name', api: `room.apiestatehouselist`, opKey: 'estate_name', opVal: 'estate_id'}
+    const appUserInfo = Taro.getStorageSync('APP_userInfo')
+    let isSale = false
+    if (appUserInfo.is_sale == 1) {
+      isSale = true
+    }
     return (
       <View className="l-box">
+        { isSale ? this.renderGoMy() : '' }
         {this.renderSearch()}
         {this.renderTop()}
         {this.renderList()}

+ 684 - 0
src/pagesRoom/listMy.jsx

@@ -0,0 +1,684 @@
+import Taro, { Component } from '@tarojs/taro'
+import { View, Image, Text, Navigator } from '@tarojs/components'
+
+import { AtSearchBar } from 'taro-ui'
+import ListMore from '@/c/pageDataList/listMore'
+import MultiSelect from '@/c/lform/MultiSelect'
+import './listMy.scss'
+import { arrToObj } from '@utils'
+
+class Index extends Component {
+
+  onShareAppMessage() {
+    return {
+      title: '来看看南昌的这些优质房源',
+    }
+  }
+  onShareTimeline () {
+    return {
+      title: '洪楼Plus,专注南昌本地房地产市场,让买房,更省心!',
+    }
+  }
+
+  constructor (props) {
+    super(props)
+    const { estate_id } = this.$router.params
+    let estateIdCur = []
+    if (estate_id) estateIdCur = [estate_id]
+    this.state = {
+      searchKey: '',
+      page_size: 10,
+      page: 1,
+      isListEnd: false,
+      isListLoading: false,
+      isListEmpty: false,
+      dataList: [],
+      curNav: 1,
+      isDShow: false,
+      curObj: {},
+      searchIndex: -1,
+      searchText1: '',
+      searchText5: '',
+      searchText3: '',
+      searchText4: '',
+      searchText5: '',
+      curPos: 'area_type',
+      curAreaType: [],
+      curProductTypeName: [],
+      curHouseTypeRange: [],
+      houseAreaCur: [],
+      productTypeCur: [],
+      isEstateShow: false,
+      estateIdCur,
+    }
+  }
+
+  config = {
+    navigationBarTitleText: '优质房源',
+  }
+
+  componentWillMount () {
+    Taro.$AHU(this)
+    const { estate_id } = this.$router.params
+    if (estate_id) {
+      this.getDataList()
+    }
+    
+
+    // 把文件删除后再写进,防止超过最大范围而无法写入
+    const fsm = wx.getFileSystemManager();  //文件管理器
+    fsm.readdir({  // 获取文件列表
+      dirPath: Taro.env.USER_DATA_PATH,// 当时写入的文件夹
+      success(res){
+        res.files.forEach((el) => { // 遍历文件列表里的数据
+          // 删除存储的垃圾数据
+          fsm.unlink({
+            filePath: `${Taro.env.USER_DATA_PATH}/${el}`, // 这里注意。文件夹也要加上,如果直接文件名的话会无法找到这个文件
+            fail(e){
+              console.log('readdir文件删除失败:',e)
+            }
+          });
+        })
+      }
+    })
+
+    
+  }
+
+  componentDidShow () { }
+
+  componentDidHide () { }
+
+  renderSearch () {
+    const { searchKey } = this.state
+    return (
+      <AtSearchBar
+        value={searchKey}
+        fixed={true}
+        placeholder="请输入房源关键字"
+        onChange={this.onSeachChange.bind(this)}
+        onActionClick={this.onSelectActionClick.bind(this)}
+        onClear={this.onClearHandle.bind(this)}
+      />
+    )
+  }
+  onSeachChange (value) {
+    this.setState({
+      searchKey: value
+    })
+  }
+  onClearHandle () {
+    this.setState({
+      searchKey: '',
+      page: 1
+    }, () => {
+      this.getDataList()
+    })
+  }
+  onSelectActionClick () {
+    this.setState({
+      page: 1,
+    }, () => {
+      this.getDataList()
+    })
+  }
+
+  searchIndex1Render () {
+    const { curPos, curAreaType } = this.state
+    const dictData = Taro.getStorageSync('dictData')
+    const areaTypeViews = dictData.area_type.map(item =>{
+      let curClassName = "op"
+      curAreaType.forEach(curVal =>{
+        if (curVal === item.val) {
+          curClassName = "op cur"
+        }
+      })
+      return (
+        <View className={curClassName} key={item.val} onClick={this.areaTypeHandle.bind(this, item)}>{item.key}</View>
+      )
+    })
+    let areaTypeAllClassName = curAreaType.length === 0 ? 'op cur' : 'op'
+    return (
+      <View className="stc-wrap">
+        {/* <View className="stc-item">
+          <View className={curPos === 'area_type' ? 'stc-op cur' : 'stc-op'}  onClick={this.posHandle.bind(this, 'area_type')}>区域</View>
+        </View> */}
+        {
+          curPos === 'area_type'
+          &&
+          <View className="stc-pane">
+            <View className={areaTypeAllClassName} onClick={this.areaTypeHandle.bind(this, 'all')}>不限</View>
+            {areaTypeViews}
+          </View>
+        }
+      </View>
+    )
+  }
+  posHandle (str) {
+    this.setState({
+      curPos: str,
+      curAreaType: [],
+    })
+  }
+  areaTypeHandle (curOp) {
+    if (curOp === 'all') {
+      this.setState({
+        curAreaType: []
+      })
+    } else {
+      let { curAreaType } = this.state
+      let ed = false
+      let curI = 0
+      curAreaType.forEach((item, index) => {
+        if (curOp.val === item) {
+          ed = true
+          curI = index
+        }
+      })
+      if (ed) {
+        curAreaType.splice(curI, 1)
+      } else {
+        curAreaType.push(curOp.val)
+      }
+      this.setState({
+        curAreaType
+      })
+    }
+  }
+
+
+
+  searchIndex3Render () {
+    const { curHouseTypeRange } = this.state
+    const dictData = Taro.getStorageSync('dictData')
+    const edIcon = require('@img/images/icon_g_ed.png')
+    const rangeViews = dictData.house_type.map(item =>{
+      let curClassName = "stc-op"
+      curHouseTypeRange.forEach(curVal =>{
+        if (curVal === item.val) {
+          curClassName = "stc-op cur"
+        }
+      })
+      return (
+        <View className={curClassName} key={item.val} onClick={this.houseTypeRangeHandle.bind(this, item)}>{item.key}
+          <Image className="img" src={edIcon} />
+        </View>
+      )
+    })
+    let allClassName = curHouseTypeRange.length === 0 ? 'stc-op cur' : 'stc-op'
+    return (
+      <View className="stc-wrap">
+        <View className="stc-item">
+          <View className={allClassName} onClick={this.houseTypeRangeHandle.bind(this, 'all')}>不限</View>
+          {rangeViews}
+        </View>
+      </View>
+    )
+  }
+  houseTypeRangeHandle (curOp) {
+    if (curOp === 'all') {
+      this.setState({
+        curHouseTypeRange: []
+      })
+    } else {
+      let { curHouseTypeRange } = this.state
+      let ed = false
+      let curI = 0
+      curHouseTypeRange.forEach((item, index) => {
+        if (curOp.val === item) {
+          ed = true
+          curI = index
+        }
+      })
+      if (ed) {
+        curHouseTypeRange.splice(curI, 1)
+      } else {
+        curHouseTypeRange.push(curOp.val)
+      }
+      this.setState({
+        curHouseTypeRange
+      })
+    }
+  }
+
+
+  searchIndex4Render () {
+    const dictData = Taro.getStorageSync('dictData')
+    // 房屋面积
+    const { houseAreaCur } = this.state
+    const house_area = dictData.house_area || []
+    const houseAreaViews = house_area.map(item =>{
+      let curClassName = "mp-op"
+      houseAreaCur.forEach(curVal =>{
+        if (curVal === item.val) {
+          curClassName = "mp-op cur"
+        }
+      })
+      return (
+        <View className={curClassName} key={item.val} onClick={this.comSelectHandle.bind(this, item, 'houseAreaCur')}>{item.key}</View>
+      )
+    })
+    const houseAreaAllClassName = houseAreaCur.length === 0 ? 'mp-op cur' : 'mp-op'
+    // 产品类型
+    const { productTypeCur } = this.state
+    const product_type = dictData.product_type || []
+    const productTypeViews = product_type.map(item =>{
+      let curClassName = "mp-op"
+      productTypeCur.forEach(curVal =>{
+        if (curVal === item.val) {
+          curClassName = "mp-op cur"
+        }
+      })
+      return (
+        <View className={curClassName} key={item.val} onClick={this.comSelectHandle.bind(this, item, 'productTypeCur')}>{item.key}</View>
+      )
+    })
+    const productTypeAllClassName = productTypeCur.length === 0 ? 'mp-op cur' : 'mp-op'
+    return (
+      <View className="more-pane">
+        <View className="mp-item">
+          <View className="mp-title">房源面积</View>
+          <View className="mp-content">
+            <View className={houseAreaAllClassName} onClick={this.comSelectHandle.bind(this, 'all', 'houseAreaCur')}>不限</View>
+            {houseAreaViews}
+          </View>
+        </View>
+        <View className="mp-item">
+          <View className="mp-title">产品类型</View>
+          <View className="mp-content">
+            <View className={productTypeAllClassName} onClick={this.comSelectHandle.bind(this, 'all', 'productTypeCur')}>不限</View>
+            {productTypeViews}
+          </View>
+        </View>
+      </View>
+    )
+  }
+  comSelectHandle (curOp, str) {
+    if (curOp === 'all') {
+      this.setState({
+        [str]: []
+      })
+    } else {
+      const state = this.state
+      let curStr = state[str]
+      let ed = false
+      let curI = 0
+      curStr.forEach((item, index) => {
+        if (curOp.val === item) {
+          ed = true
+          curI = index
+        }
+      })
+      if (ed) {
+        curStr.splice(curI, 1)
+      } else {
+        curStr.push(curOp.val)
+      }
+      this.setState({
+        [str]: curStr
+      })
+    }
+  }
+
+
+  renderTop () {
+    const { searchIndex, searchText1, searchText5, searchText3, searchText4 } = this.state
+    const { estate_name } = this.$router.params
+    return (
+      <View className="l-search-top t2">
+        <View className="st-nav">
+          {
+            estate_name
+            ?
+            <View className="stn-op col-3 cur">
+              <View className="stn-label t2">{estate_name}</View>
+            </View>
+            :
+            <View className={(searchIndex === 5 || searchText5) ? 'stn-op col-4 cur' : 'stn-op col-4'} onClick={this.searchNavHandle.bind(this, 5)}>
+              <View className="stn-label">{searchText5 || '楼盘'}</View>
+              <View className="stn-sign"></View>
+            </View>
+          }
+          <View className={(searchIndex === 1 || searchText1) ? 'stn-op col-4 cur' : 'stn-op col-4'} onClick={this.searchNavHandle.bind(this, 1)}>
+            <View className="stn-label">{searchText1 || '区域'}</View>
+            <View className="stn-sign"></View>
+          </View>
+          <View className={(searchIndex === 3 || searchText3) ? 'stn-op col-4 cur' : 'stn-op col-4'} onClick={this.searchNavHandle.bind(this, 3)}>
+            <View className="stn-label">{searchText3 || '户型'}</View>
+            <View className="stn-sign"></View>
+          </View>
+          <View className={(searchIndex === 4 || searchText4) ? 'stn-op col-4 cur' : 'stn-op col-4'} onClick={this.searchNavHandle.bind(this, 4)}>
+            <View className="stn-label">{searchText4 || '更多'}</View>
+            <View className="stn-sign"></View>
+          </View>
+        </View>
+        <View className={searchIndex > 0 ? searchIndex === 4 ? 'st-content show more' : 'st-content show' : 'st-content'}>
+          {
+            searchIndex === 1
+            &&
+            this.searchIndex1Render()
+          }
+          {
+            searchIndex === 3
+            &&
+            this.searchIndex3Render()
+          }
+          {
+            searchIndex === 4
+            &&
+            this.searchIndex4Render()
+          }
+          <View className="l-floor-footer t2">
+            <View className="lff-flex">
+              <View className="lff-btn t3" onClick={this.resetHandle.bind(this)} >重置</View>
+              <View className="lff-btn" onClick={this.saveHandle.bind(this)}>搜索</View>
+            </View>
+          </View>
+        </View>
+      </View>
+    )
+  }
+  searchNavHandle (index) {
+    if (index === 5) {
+      this.openMSPopup()
+      return
+    }
+    let { searchIndex } = this.state
+    searchIndex = index === searchIndex ? -1 : index
+    this.setState({
+      searchIndex
+    })
+  }
+  resetHandle () {
+    const { searchIndex } = this.state
+    if (searchIndex === 1) {
+      this.setState({
+        searchText1: '',
+        curPos: 'area_type',
+      })
+    }
+    if (searchIndex === 3) {
+      this.setState({
+        searchText3: '',
+        curHouseTypeRange: [],
+      })
+    }
+    if (searchIndex === 4) {
+      this.setState({
+        searchText4: '',
+        houseAreaCur: [],
+        productTypeCur: [],
+      })
+    }
+  }
+  saveHandle () {
+    const dictData = Taro.getStorageSync('dictData')
+    const {
+      searchIndex,
+      curAreaType,
+      curHouseTypeRange,
+      houseAreaCur,
+      productTypeCur,
+    } = this.state
+    if (searchIndex === 1) {
+      let tagArr = []
+      curAreaType.forEach(v => {
+        tagArr.push(arrToObj(dictData.area_type)[v])
+      })
+      if (tagArr) {
+        this.setState({
+          searchText1: tagArr.join(',')
+        })
+      }
+    }
+    if (searchIndex === 3) {
+      let tagArr = []
+      curHouseTypeRange.forEach(v => {
+        tagArr.push(arrToObj(dictData.house_type)[v])
+      })
+      if (tagArr) {
+        this.setState({
+          searchText3: tagArr.join(',')
+        })
+      }
+    }
+    if (searchIndex === 4) {
+      let tagArr = []
+      houseAreaCur.forEach(v => {
+        tagArr.push(arrToObj(dictData.house_area)[v])
+      })
+      productTypeCur.forEach(v => {
+        tagArr.push(arrToObj(dictData.product_type)[v])
+      })
+      if (tagArr) {
+        this.setState({
+          searchText4: tagArr.join(',')
+        })
+      }
+    }
+    this.setState({
+      page: 1,
+      searchIndex: -1,
+    }, () => {
+      this.getDataList()
+    })
+  }
+
+
+
+
+
+  openMSPopup (e) {
+    this.setState({
+      isEstateShow: true,
+      searchIndex: -1,
+    })
+  }
+  dealMSPopup (curVal, curCheckedArr) {
+    this.closeMSPopup()
+    if (curVal && curCheckedArr) {
+      const nameArr = curCheckedArr.map(item =>{
+        return item.estate_name
+      })
+      this.setState({
+        estateIdCur: curVal,
+        searchText5: nameArr.join(','),
+        page: 1,
+      }, () => {
+        this.getDataList()
+      })
+    } else {
+      this.setState({
+        estateIdCur: [],
+        searchText5: '',
+      })
+    }
+  }
+  closeMSPopup () {
+    this.setState({
+      isEstateShow: false,
+    })
+  }
+
+
+
+
+
+
+
+  getDataList () {
+    let { page_size, page, dataList, isListEmpty } = this.state
+    const { searchKey } = this.state
+    const {
+      curAreaType,
+      curHouseTypeRange,
+      houseAreaCur,
+      productTypeCur,
+      estateIdCur,
+    } = this.state
+    let apiStr = 'apieshouselist'
+    let params = {
+      oneself: 1,
+      page,
+      page_size,
+      title: searchKey,
+      area_type: curAreaType.join(','),
+      house_type: curHouseTypeRange.join(','),
+      house_area: houseAreaCur.join(','),
+      product_type: productTypeCur.join(','),
+      estate_id: estateIdCur.join(','),
+    }
+    Taro.api.room[apiStr](params).then(res => {
+      const curData = res.list || []
+      let isListEnd = false
+      if (curData.length > 0) {
+        if (page === 1) {
+          dataList = curData
+        } else {
+          dataList = dataList.concat(curData)
+        }
+        if (curData.length === page_size && res.total !== curData.length) {
+          isListEnd = false
+        } else {
+          isListEnd = true
+        }
+      }
+      if (curData.length === 0 && page === 1) {
+        isListEmpty = true
+        dataList = []
+      } else {
+        isListEmpty = false
+      }
+      this.setState({
+        dataList,
+        isListEnd,
+        isListEmpty,
+        isListLoading: false
+      })
+    })
+  }
+  onScrollToLower (e) {
+    let { isListEnd, isListLoading, page } = this.state
+    if (!isListEnd && !isListLoading) {
+      page++
+      this.setState({
+        page,
+        isListLoading: true
+      }, () => {
+        this.getDataList()
+      })
+    }
+  }
+
+  renderList () {
+    const { dataList, isListEnd, isListLoading, isListEmpty } = this.state
+    const hpV = require('@img/icon_hp_v.png')
+    const itemsList = dataList.map((item, index) => {
+      let FHstr = '未知楼层'
+      if (item.floor) {
+        const FH = Number(item.floor) || 1
+        const H = Number(item.storeys) || 1
+        if (FH > H * 0.6666) {
+          FHstr = '中高层'
+        } else if (FH > H * 0.33333) {
+          FHstr = '中楼层'
+        } else {
+          FHstr = '中低层'
+        }
+        if (FH === 1) FHstr = '一楼'
+        if (FH === H) FHstr = '顶楼'
+      }
+      let houseTypeStr = '未知户型'
+      if (item.house_type) {
+        let arr = item.house_type.split('-')
+        houseTypeStr = `${arr[0]}室${arr[1]}厅${arr[2]}卫`
+      }
+      const cTagStr = item.custom_tag || ''
+      const tagViews = cTagStr.split(',').map((tag, tagIndex) => {
+        return (
+          <View className="s" key={tagIndex}>{tag}</View>
+        )
+      })
+      return (
+        <View className="lhl-item col-1" key={index} onClick={this.linkHandle.bind(this, item)}>
+          <View className="lhl-img">
+            {
+              item.video
+              ?
+              <View className="vr-icon">
+                <Image src={hpV} className="i i1" />
+              </View>
+              : ''
+            }
+            <Image src={item.pri_image + '_xs'} className="img" />
+            <View className="f-t">{houseTypeStr} | {parseInt(item.area)}㎡</View>
+          </View>
+          <View className="lhl-info">
+            <View className="lhl-p1">{item.title}</View>
+            <View className="lhl-p2">{item.price}万
+              <View className="sub">单价:{parseInt(item.price * 10000 / item.area)}元/平</View>
+            </View>
+            <View className="lhl-p3">{FHstr}-{item.estate_name}</View>
+            <View className="lhl-sign">
+              {tagViews}
+            </View>
+          </View>
+        </View>
+      )
+    })
+    return (
+      <ScrollView
+        className='l-scroll-view'
+        scrollY
+        scrollWithAnimation
+        scrollTop="0"
+        lowerThreshold="30"
+        onScrollToLower={this.onScrollToLower.bind(this)}
+      >
+        <View className="l-house-list">
+          {itemsList}
+        </View>
+        <ListMore isListEnd={isListEnd} isListLoading={isListLoading} isListEmpty={isListEmpty} />
+      </ScrollView>
+    )
+  }
+
+
+  linkHandle (item) {
+    Taro.navigateTo({
+      url: `/pagesRoom/dtl?id=${item.id}`
+    })
+    // const appUserInfo = Taro.getStorageSync('APP_userInfo')
+    // if (appUserInfo.is_sale == 1) {
+    //   Taro.navigateTo({
+    //     url: `/pagesMore/center/uploadRoom2?id=${item.id}`
+    //   })
+    // } else {
+    //   Taro.navigateTo({
+    //     url: `/pagesRoom/dtl?id=${item.id}`
+    //   })
+    // }
+  }
+
+  render () {
+    const { estateIdCur, isEstateShow } = this.state
+    const { estate_id } = this.$router.params
+    const estateMoreOptions = {skey: 'estate_name', api: `room.apiestatehouselist`, opKey: 'estate_name', opVal: 'estate_id'}
+    return (
+      <View className="l-box">
+        {this.renderSearch()}
+        {this.renderTop()}
+        {this.renderList()}
+        {
+          estate_id
+          ?
+          ''
+          :
+          <MultiSelect val={estateIdCur} moreOptions={estateMoreOptions} isShow={isEstateShow} initUpdate="no" bc={this.dealMSPopup.bind(this)} close={this.closeMSPopup.bind(this)}/>
+        }
+      </View>
+    )
+  }
+}
+
+export default Index

+ 31 - 0
src/pagesRoom/listMy.scss

@@ -0,0 +1,31 @@
+@import '@css/mixin.scss';
+@import '@css/house-list.scss';
+@import '@css/search-top.scss';
+.l-box {
+  padding-top: calc(84px + 90px);
+}
+.l-scroll-view {
+  height: calc(100vh - 84px - 90px);
+  box-sizing: border-box;
+}
+.scoped-fixed {
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  z-index: 99;
+  background-color: #fff;
+}
+
+
+.lhl-info {
+  width: 300px;
+}
+
+
+.l-house-list .lhl-img {
+  height: 170rpx;
+  .img {
+    height: 170rpx;
+  }
+}