230320a303 il y a 8 mois
Parent
commit
190d2d02a6

+ 2 - 0
.gitignore

@@ -4,3 +4,5 @@ deploy_versions/
 .rn_temp/
 node_modules/
 .DS_Store
+settings.json
+settings

+ 1 - 1
.vscode/settings.json

@@ -1,3 +1,3 @@
 {
-    "stockCode": "sz300394,sz301308,sh512480,sz002460,sh560980"
+    "stockCode": "sh560980,sz159819,sz300803,sz300450,sz300919"
 }

+ 12 - 0
src/api/other.js

@@ -99,4 +99,16 @@ export default {
   apisaleworkverify: params => { // 洪楼分 工作记录 审核
     return request('/api/sale/work/verify', params, 'loading')
   },
+  apiestatehousedynamiclist: params => { // 新房房价动态趋势 列表
+    return request('/api/estate/house/dynamic/list', params, 'loading')
+  },
+  apiestatehousedynamicupdate: params => { // 新房房价动态趋势 更新
+    return request('/api/estate/house/dynamic/update', params, 'loading')
+  },
+  apiestatehousedynamiclog: params => { // 新房房价动态趋势 更新记录
+    return request('/api/estate/house/dynamic/log', params, 'loading')
+  },
+  apiestatehousedynamicdetail: params => { // 新房房价动态趋势 详情
+    return request('/api/estate/house/dynamic/detail', params, 'loading')
+  },
 }

+ 3 - 0
src/app.jsx

@@ -163,6 +163,9 @@ class App extends Component {
           'follow/lineup2',
           'follow/lineupRecord',
           'follow/lineupRecord2',
+          'estateTrend',
+          'estateTrendRecord',
+          'estateTrendUpdate',
         ]
       },
       {

+ 9 - 2
src/pagesMore/center/index.jsx

@@ -201,7 +201,14 @@ class Index extends Component {
           userInfo.is_sale && userInfo.is_sale === '1'
           ?
           <View>
-            <Navigator url="/pagesMore/score/list" className="entry-op">
+            <Navigator url="/pagesRoom/estateTrend" className="entry-op">
+              <Image src={icon6} className="entry-icon"></Image>
+              <View className="entry-text">新房价格动态</View>
+              <View className="entry-right">
+                <Image src={iconSign} className="sign"></Image>
+              </View>
+            </Navigator>
+            {/* <Navigator url="/pagesMore/score/list" className="entry-op">
               <Image src={icon6} className="entry-icon"></Image>
               <View className="entry-text">主动新增洪楼分</View>
               <View className="entry-right">
@@ -214,7 +221,7 @@ class Index extends Component {
               <View className="entry-right">
                 <Image src={iconSign} className="sign"></Image>
               </View>
-            </Navigator>
+            </Navigator> */}
             <Navigator url="/pagesMore/center/uploadRoom2" className="entry-op">
               <Image src={icon4} className="entry-icon"></Image>
               <View className="entry-text">上传房源</View>

+ 7 - 0
src/pagesMore/center/uploadRoom2.jsx

@@ -598,6 +598,12 @@ class Index extends Component {
 
 
 
+  callHandle (phoneNumber) {
+    Taro.makePhoneCall({
+      phoneNumber
+    })
+  }
+
 
 
 
@@ -872,6 +878,7 @@ class Index extends Component {
             keyStr2="请输入"
             bc={this.baseFormChange.bind(this)}
           />
+          <View className="scoped-label-btn" onClick={this.callHandle.bind(this, formObj.owner_phone)}></View>
         </View>
         <View className="l-floor-pos2">
           <LFormGroup

+ 9 - 0
src/pagesMore/center/uploadRoom2.scss

@@ -184,4 +184,13 @@
   color: #fff;
   padding: 10px 30px;
   border-radius: 6px;
+}
+
+.scoped-label-btn {
+  position: absolute;
+  z-index: 999;
+  bottom: 0;
+  left: 0;
+  width: 300px;
+  height: 100px;
 }

+ 258 - 0
src/pagesRoom/estateTrend.jsx

@@ -0,0 +1,258 @@
+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 './estateTrend.scss'
+import { arrToObj } from '@utils'
+
+class Index extends Component {
+  constructor (props) {
+    super(props)
+    this.state = {
+      searchKey: '',
+      page_size: 10,
+      page: 1,
+      isListEnd: false,
+      isListLoading: false,
+      isListEmpty: false,
+      dataList: [],
+      curNav: 1,
+      isDShow: false,
+      curObj: {},
+    }
+  }
+
+  config = {
+    navigationBarTitleText: '新房价格动态',
+  }
+
+  componentWillMount () {
+    Taro.$AHU(this)
+    this.getDataList()
+  }
+
+  componentDidShow () { }
+
+  componentDidHide () { }
+
+
+
+  renderSearch () {
+    const { searchKey } = this.state
+    let placeholderText = '模糊搜索楼盘名称'
+    return (
+      <View>
+        <AtSearchBar
+          fixed={true}
+          value={searchKey}
+          placeholder={placeholderText}
+          onChange={this.onSeachChange.bind(this)}
+          onClear={this.onClearHandle.bind(this)}
+          onActionClick={this.onSelectActionClick.bind(this)}
+        />
+      </View>
+    )
+  }
+  onSeachChange (value) {
+    this.setState({
+      searchKey: value
+    })
+  }
+  onClearHandle () {
+    this.setState({
+      searchKey: '',
+      page: 1
+    }, () => {
+      this.getDataList()
+    })
+  }
+  onSelectActionClick () {
+    this.setState({
+      page: 1,
+    }, () => {
+      this.getDataList()
+    })
+  }
+
+
+
+  getDataList () {
+    let { page_size, page, dataList, isListEmpty, searchKey } = this.state
+    Taro.api.other.apiestatehousedynamiclist({
+      page,
+      page_size,
+      estate_name: searchKey
+    }).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 dictData = Taro.getStorageSync('dictData')
+    const ptObj = arrToObj(dictData.product_type)
+    const { dataList, isListEnd, isListLoading, isListEmpty } = this.state
+    const itemsList = dataList.map((item, index) => {
+      return (
+        <View className="sl-item" key={index}>
+          <View>
+            <View className="sli-time">{item.update_re}</View>
+            <View className="sli-r2" onClick={this.linkUpdate.bind(this, item)}>去更新</View>
+            <View className="p1">
+              <View className="s">{item.house_square}㎡</View>
+              {item.estate_name}[{ptObj[item.product_type]}]
+            </View>
+            <View className="p-one">
+              <View className="po-l">价格区间:</View>
+              <View className="po-r t1">{item.price_min}元-{item.price_max}元
+                <View className="por-more" onClick={this.linkRecord.bind(this, item)}>历史记录</View>
+              </View>
+            </View>
+            <View className="p-one">
+              <View className="po-l">最新动态:</View>
+              <View className="po-r">
+                {
+                  item.dynamic_img
+                  ? <Image src={item.dynamic_img} onClick={this.previewImageHandle.bind(this, item.dynamic_img)} className="img"/>
+                  : ''
+                }
+                {item.dynamic || '未知'}
+                {
+                  item.isMoreShow
+                  ? <View className="por-btn" onClick={this.moreShowHideHandle.bind(this, index)}>收起</View>
+                  : <View className="por-btn" onClick={this.moreShowHideHandle.bind(this, index)}>展开</View>
+                }
+              </View>
+            </View>
+            {
+              item.isMoreShow
+              ?
+              <View className="more">
+                <View className="p-one">
+                  <View className="po-l">现场折扣:</View>
+                  <View className="po-r">{item.scene_discount || '未知'}</View>
+                </View>
+                <View className="p-one">
+                  <View className="po-l">实际折扣:</View>
+                  <View className="po-r">{item.actual_discount || '未知'}</View>
+                </View>
+                <View className="p-one">
+                  <View className="po-l">在售楼栋:</View>
+                  <View className="po-r">{item.on_sale || '未知'}</View>
+                </View>
+                <View className="p-one">
+                  <View className="po-l">待售楼栋:</View>
+                  <View className="po-r">{item.for_sale || '未知'}</View>
+                </View>
+                <View className="p-one">
+                  <View className="po-l">推荐房源:</View>
+                  <View className="po-r">{item.recommend || '未知'}</View>
+                </View>
+              </View>
+              : ''
+            }
+          </View>
+        </View>
+      )
+    })
+    return (
+      <ScrollView
+        className='l-scroll-view'
+        scrollY
+        scrollWithAnimation
+        scrollTop="0"
+        lowerThreshold="30"
+        onScrollToLower={this.onScrollToLower.bind(this)}
+      >
+        <View className="scoped-list">
+          {itemsList}
+        </View>
+        <ListMore isListEnd={isListEnd} isListLoading={isListLoading} isListEmpty={isListEmpty} />
+      </ScrollView>
+    )
+  }
+  
+
+  linkUpdate (item) {
+    const dictData = Taro.getStorageSync('dictData')
+    const ptObj = arrToObj(dictData.product_type)
+    Taro.navigateTo({
+      url: `/pagesRoom/estateTrendUpdate?id=${item.id}&t=${item.house_square}㎡-${item.estate_name}[${ptObj[item.product_type]}]`
+    })
+  }
+  linkRecord (item) {
+    const dictData = Taro.getStorageSync('dictData')
+    const ptObj = arrToObj(dictData.product_type)
+    Taro.navigateTo({
+      url: `/pagesRoom/estateTrendRecord?id=${item.id}&t=${item.house_square}㎡-${item.estate_name}[${ptObj[item.product_type]}]`
+    })
+  }
+  
+  moreShowHideHandle (index) {
+    let { dataList } = this.state
+    dataList[index].isMoreShow = !dataList[index].isMoreShow
+    this.setState({
+      dataList
+    })
+  }
+  previewImageHandle (url) {
+    const imgUrl = url
+    Taro.previewImage({
+      current: imgUrl,
+      urls: [imgUrl]
+    })
+  }
+
+  callHandle (phoneNumber) {
+    Taro.makePhoneCall({
+      phoneNumber
+    })
+  }
+
+  render () {
+    return (
+      <View className="l-box">
+        {this.renderSearch()}
+        {this.renderList()}
+      </View>
+    )
+  }
+}
+
+export default Index

+ 94 - 0
src/pagesRoom/estateTrend.scss

@@ -0,0 +1,94 @@
+@import '@css/mixin.scss';
+.l-box {
+  padding-top: 80px;
+}
+page {
+  height: 100%;
+  background: #f2f2f2;
+  font-size: 28px;
+}
+.l-scroll-view {
+  height: calc(100vh - 80px);
+  // box-sizing: border-box;
+}
+.scoped-list {
+  .sl-item {
+    background: #fff;
+    @include itemBox(20px 20px, 20px 20px 0);
+    position: relative;
+    .sli-time {
+      position: absolute;
+      top: 20px;
+      right: 10px;
+      color: #999;
+      font-size: 24px;
+    }
+    .sli-r2 {
+      position: absolute;
+      top: 60px;
+      right: 10px;
+      background: $greenColor;
+      color: #fff;
+      border-radius: 10px;
+      padding: 10px 16px;
+      font-size: 22px;
+    }
+    .p1 {
+      font-size: 30px;
+      color: #313131;
+      padding-bottom: 10px;
+      .s {
+        display: inline-block;
+        font-weight: bold;
+        color: $mainColor2;
+      }
+    }
+    .p2 {
+      font-size: 28px;
+      color: $dangerColor;
+      font-weight: bold;
+      padding-bottom: 10px;
+    }
+    .p3 {
+      font-size: 24px;
+      color: #999;
+    }
+    .p-one {
+      display: flex;
+      font-size: 26px;
+      padding-bottom: 20px;
+      .po-l {
+        width: 120px;
+        color: #999;
+      }
+      .po-r {
+        flex: 1;
+        color: #313131;
+        &.t1 {
+          color: $dangerColor;
+          font-weight: bold;
+        }
+        .img {
+          display: inline-block;
+          vertical-align: top;
+          width: 50px;
+          height: 50px;
+        }
+        .por-btn {
+          display: inline-block;
+          vertical-align: top;
+          color: $mainColor;
+          font-weight: bold;
+        }
+        .por-more {
+          display: inline-block;
+          vertical-align: top;
+          color: $greenColor;
+          font-weight: bold;
+          font-size: 24px;
+          text-decoration: underline;
+        }
+      }
+    }
+  }
+}

+ 248 - 0
src/pagesRoom/estateTrendRecord.jsx

@@ -0,0 +1,248 @@
+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 './estateTrendRecord.scss'
+import { arrToObj } from '@utils'
+
+class Index extends Component {
+  constructor (props) {
+    super(props)
+    this.state = {
+      searchKey: '',
+      page_size: 10,
+      page: 1,
+      isListEnd: false,
+      isListLoading: false,
+      isListEmpty: false,
+      dataList: [],
+      curNav: 1,
+      isDShow: false,
+      curObj: {},
+    }
+  }
+
+  config = {
+    navigationBarTitleText: '动态趋势记录',
+  }
+
+  componentWillMount () {
+    Taro.$AHU(this)
+    const { t } = this.$router.params
+    Taro.setNavigationBarTitle({
+      title: t
+    })
+    this.getDataList()
+  }
+
+  componentDidShow () { }
+
+  componentDidHide () { }
+
+
+
+  renderSearch () {
+    const { searchKey } = this.state
+    let placeholderText = '模糊搜索楼盘名称'
+    return (
+      <View>
+        <AtSearchBar
+          fixed={true}
+          value={searchKey}
+          placeholder={placeholderText}
+          onChange={this.onSeachChange.bind(this)}
+          onClear={this.onClearHandle.bind(this)}
+          onActionClick={this.onSelectActionClick.bind(this)}
+        />
+      </View>
+    )
+  }
+  onSeachChange (value) {
+    this.setState({
+      searchKey: value
+    })
+  }
+  onClearHandle () {
+    this.setState({
+      searchKey: '',
+      page: 1
+    }, () => {
+      this.getDataList()
+    })
+  }
+  onSelectActionClick () {
+    this.setState({
+      page: 1,
+    }, () => {
+      this.getDataList()
+    })
+  }
+
+
+
+  getDataList () {
+    const { id } = this.$router.params
+    let { page_size, page, dataList, isListEmpty, searchKey } = this.state
+    Taro.api.other.apiestatehousedynamiclog({
+      id,
+      page,
+      page_size,
+    }).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 dictData = Taro.getStorageSync('dictData')
+    const ptObj = arrToObj(dictData.product_type)
+    const { dataList, isListEnd, isListLoading, isListEmpty } = this.state
+    const itemsList = dataList.map((item, index) => {
+      return (
+        <View className="sl-item" key={index}>
+          <View>
+            <View className="p1">[{item.create_by}]{item.create_at}</View>
+            <View className="p-one">
+              <View className="po-l">价格区间:</View>
+              <View className="po-r t1">{item.price_min}元-{item.price_max}元</View>
+            </View>
+            <View className="p-one">
+              <View className="po-l">最新动态:</View>
+              <View className="po-r">
+                {
+                  item.dynamic_img
+                  ? <Image src={item.dynamic_img} onClick={this.previewImageHandle.bind(this, item.dynamic_img)} className="img"/>
+                  : ''
+                }
+                {item.dynamic || '未知'}
+                {
+                  item.isMoreShow
+                  ? <View className="por-btn" onClick={this.moreShowHideHandle.bind(this, index)}>收起</View>
+                  : <View className="por-btn" onClick={this.moreShowHideHandle.bind(this, index)}>展开</View>
+                }
+              </View>
+            </View>
+            {
+              item.isMoreShow
+              ?
+              <View className="more">
+                <View className="p-one">
+                  <View className="po-l">现场折扣:</View>
+                  <View className="po-r">{item.scene_discount || '未知'}</View>
+                </View>
+                <View className="p-one">
+                  <View className="po-l">实际折扣:</View>
+                  <View className="po-r">{item.actual_discount || '未知'}</View>
+                </View>
+                <View className="p-one">
+                  <View className="po-l">在售楼栋:</View>
+                  <View className="po-r">{item.on_sale || '未知'}</View>
+                </View>
+                <View className="p-one">
+                  <View className="po-l">待售楼栋:</View>
+                  <View className="po-r">{item.for_sale || '未知'}</View>
+                </View>
+                <View className="p-one">
+                  <View className="po-l">推荐房源:</View>
+                  <View className="po-r">{item.recommend || '未知'}</View>
+                </View>
+              </View>
+              : ''
+            }
+          </View>
+        </View>
+      )
+    })
+    return (
+      <ScrollView
+        className='l-scroll-view'
+        scrollY
+        scrollWithAnimation
+        scrollTop="0"
+        lowerThreshold="30"
+        onScrollToLower={this.onScrollToLower.bind(this)}
+      >
+        <View className="scoped-list">
+          {itemsList}
+        </View>
+        <ListMore isListEnd={isListEnd} isListLoading={isListLoading} isListEmpty={isListEmpty} />
+      </ScrollView>
+    )
+  }
+  
+
+  linkUpdate (item) {
+    const dictData = Taro.getStorageSync('dictData')
+    const ptObj = arrToObj(dictData.product_type)
+    Taro.navigateTo({
+      url: `/pagesRoom/estateTrendUpdate?id=${item.id}&t=${item.house_square}㎡-${item.estate_name}[${ptObj[item.product_type]}]`
+    })
+  }
+  
+  moreShowHideHandle (index) {
+    let { dataList } = this.state
+    dataList[index].isMoreShow = !dataList[index].isMoreShow
+    this.setState({
+      dataList
+    })
+  }
+  previewImageHandle (url) {
+    const imgUrl = url
+    Taro.previewImage({
+      current: imgUrl,
+      urls: [imgUrl]
+    })
+  }
+
+  callHandle (phoneNumber) {
+    Taro.makePhoneCall({
+      phoneNumber
+    })
+  }
+
+  render () {
+    return (
+      <View className="l-box">
+        {this.renderList()}
+      </View>
+    )
+  }
+}
+
+export default Index

+ 83 - 0
src/pagesRoom/estateTrendRecord.scss

@@ -0,0 +1,83 @@
+@import '@css/mixin.scss';
+page {
+  height: 100%;
+  background: #f2f2f2;
+  font-size: 28px;
+}
+.l-scroll-view {
+  height: calc(100vh);
+  box-sizing: border-box;
+}
+.scoped-list {
+  .sl-item {
+    background: #fff;
+    @include itemBox(20px 20px);
+    position: relative;
+    .sli-time {
+      position: absolute;
+      top: 20px;
+      right: 10px;
+      color: #999;
+      font-size: 24px;
+    }
+    .sli-r2 {
+      position: absolute;
+      top: 60px;
+      right: 10px;
+      background: $infoColor;
+      color: #fff;
+      border-radius: 10px;
+      padding: 10px 16px;
+      font-size: 22px;
+    }
+    .p1 {
+      font-size: 30px;
+      color: #313131;
+      padding-bottom: 10px;
+      .s {
+        display: inline-block;
+        font-weight: bold;
+        color: $mainColor2;
+      }
+    }
+    .p2 {
+      font-size: 28px;
+      color: $dangerColor;
+      font-weight: bold;
+      padding-bottom: 10px;
+    }
+    .p3 {
+      font-size: 24px;
+      color: #999;
+    }
+    .p-one {
+      display: flex;
+      font-size: 26px;
+      padding-bottom: 10px;
+      .po-l {
+        width: 120px;
+        color: #999;
+      }
+      .po-r {
+        flex: 1;
+        color: #313131;
+        &.t1 {
+          color: $dangerColor;
+          font-weight: bold;
+        }
+        .img {
+          display: inline-block;
+          vertical-align: top;
+          width: 50px;
+          height: 50px;
+        }
+        .por-btn {
+          display: inline-block;
+          vertical-align: top;
+          color: $mainColor;
+          font-weight: bold;
+        }
+      }
+    }
+  }
+}

+ 264 - 0
src/pagesRoom/estateTrendUpdate.jsx

@@ -0,0 +1,264 @@
+import Taro, { Component } from '@tarojs/taro'
+import { View } from '@tarojs/components'
+import { AtTextarea }  from 'taro-ui'
+import LFormGroup from '@/c/lform/formGroup'
+const HLKEY = '654mca0l38b489d9'
+const CJ = require('crypto-js')
+import './estateTrendUpdate.scss'
+
+class Index extends Component {
+
+
+  constructor (props) {
+    super(props)
+    this.state = {
+      feedback_count: '',
+      formObj: {},
+      imgArr: [],
+    }
+  }
+  config = {
+    navigationBarTitleText: '更新房价动态',
+  }
+
+  componentWillMount () {
+    Taro.$AHU(this)
+    const { t, id } = this.$router.params
+    Taro.setNavigationBarTitle({
+      title: t
+    })
+    setTimeout(() => {
+      Taro.api.other.apiestatehousedynamicdetail({id}).then(res => {
+        const rObj = res || {}
+        this.setState({
+          formObj: rObj,
+          // imgArr: rObj.dynamic_img ? rObj.dynamic_img.split(',') : [],
+          // feedback_count: rObj.dynamic,
+        })
+      })
+    }, 1000)
+  }
+
+  textareaChange (feedback_count) {
+    this.setState({
+      feedback_count
+    })
+  }
+
+  saveHandle () {
+    const { id } = this.$router.params
+    const { feedback_count, formObj, imgArr } = this.state
+    if (formObj.price_min) {
+      Taro.api.other.apiestatehousedynamicupdate({
+        id,
+        price_min: formObj.price_min,
+        price_max: formObj.price_max,
+        dynamic: feedback_count,
+        dynamic_img: imgArr.join(','),
+        scene_discount: formObj.scene_discount,
+        actual_discount: formObj.actual_discount,
+        on_sale: formObj.on_sale,
+        for_sale: formObj.for_sale,
+        recommend: formObj.recommend,
+      }).then(res => {
+        this.setState({
+          feedback_count: '',
+          formObj: {},
+          imgArr: [],
+        })
+        Taro.$msgConfirm('更新成功', () => {
+          Taro.reLaunch({
+            url: '/pagesRoom/estateTrend'
+          })
+        }, () => {
+          Taro.reLaunch({
+            url: '/pagesRoom/estateTrend'
+          })
+        })
+      })
+    } else {
+      Taro.$msg('起价必填')
+    }
+  }
+
+  baseFormChange (key, val) {
+    let { formObj } = this.state
+    formObj[key] = val
+    this.setState({
+      formObj
+    })
+  }
+
+
+  addImg () {
+    this.uploadComImg((curImg) => {
+      let { imgArr } = this.state
+      imgArr.push(curImg)
+      this.setState({
+        imgArr
+      })
+    })
+  }
+  uploadComImg (bc) {
+    let token = Taro.getStorageSync('APP_token')
+    const that = this
+    Taro.chooseImage({
+      count: 1, // 默认9
+      sizeType: ['original', 'compressed'],
+      sourceType: ['album', 'camera'],
+      success: function (res) {
+        const tempFilePaths = res.tempFilePaths
+        Taro.uploadFile({
+          url: `https://api.honglouplus.com/api/upload/cloud`,
+          filePath: tempFilePaths[0],
+          name: 'upload',
+          formData: {
+            'token': token
+          },
+          success (res){
+            const msg = res.data || ''
+            const key = CJ.enc.Utf8.parse(HLKEY)
+            const bytes = CJ.AES.decrypt(msg, key, {
+              mode: CJ.mode.ECB,
+              padding: CJ.pad.Pkcs7
+            })
+            const originalText = bytes.toString(CJ.enc.Utf8)
+            const cData = JSON.parse(originalText)
+            const curImg = cData.data.url || ''
+            if (bc) bc(curImg)
+          }
+        })
+      }
+    })
+  }
+  delImg (index) {
+    let { imgArr } = this.state
+    imgArr.splice(index, 1)
+    this.setState({
+      imgArr
+    })
+  }
+  previewImageHandle (current, arr) {
+    const { imgArr } = this.state
+    Taro.previewImage({
+      current,
+      urls: imgArr
+    })
+  }
+
+  render () {
+    const { feedback_count, formObj, imgArr, house_cert } = this.state
+    const dictData = Taro.getStorageSync('dictData')
+    const addIcon = require('@img/icon_upload_img.png')
+    const closeIcon = require('@img/icon_g_close.png')
+    const imgItems = imgArr.map((src, index) => {
+      return (
+        <View className="si-op" key={index}>
+          <Image src={src} className="img" onClick={this.previewImageHandle.bind(this, src)} />
+          <Image src={closeIcon} className="i" onClick={this.delImg.bind(this, index)}/>
+        </View>
+      )
+    })
+    return (
+      <View className="l-box">
+        <View className="l-floor-pos2">
+          <LFormGroup
+            val={formObj.price_min}
+            valStr="price_min"
+            keyStr="起价(必填)"
+            keyStr2="请输入起价"
+            typeStr="inputFont"
+            inputFont="元"
+            bc={this.baseFormChange.bind(this)}
+          />
+        </View>
+        <View className="l-floor-pos2">
+          <LFormGroup
+            val={formObj.price_max}
+            valStr="price_max"
+            keyStr="封顶价"
+            keyStr2="请输入封顶价"
+            typeStr="inputFont"
+            inputFont="元"
+            bc={this.baseFormChange.bind(this)}
+          />
+        </View>
+        <View className="scoped-box-w">
+          <View className="scoped-box sbw2">
+            <View className="sb-title">最新动态</View>
+            <AtTextarea
+              value={feedback_count}
+              onChange={this.textareaChange.bind(this)}
+              maxLength={300}
+              height={120}
+              placeholder='请输入最新动态'
+            />
+          </View>
+          <View className="scoped-box sbw1">
+            <View className="sb-title">动态图片
+              {/* <View className="s">(最多1张)</View> */}
+            </View>
+            <View className="scoped-img">
+              {imgItems}
+              {
+                imgArr.length < 1
+                &&
+                <View className="si-op" onClick={this.addImg.bind(this)}>
+                  <Image src={addIcon} className="img"/>
+                </View>
+              }
+            </View>
+          </View>
+        </View>
+        <View className="l-floor-pos2">
+          <LFormGroup
+            val={formObj.scene_discount}
+            valStr="scene_discount"
+            keyStr="现场折扣"
+            bc={this.baseFormChange.bind(this)}
+          />
+        </View>
+        <View className="l-floor-pos2">
+          <LFormGroup
+            val={formObj.actual_discount}
+            valStr="actual_discount"
+            keyStr="实际折扣"
+            bc={this.baseFormChange.bind(this)}
+          />
+        </View>
+        <View className="l-floor-pos2">
+          <LFormGroup
+            val={formObj.on_sale}
+            valStr="on_sale"
+            keyStr="在售楼栋"
+            bc={this.baseFormChange.bind(this)}
+          />
+        </View>
+        <View className="l-floor-pos2">
+          <LFormGroup
+            val={formObj.for_sale}
+            valStr="for_sale"
+            keyStr="待售楼栋"
+            bc={this.baseFormChange.bind(this)}
+          />
+        </View>
+        <View className="l-floor-pos2">
+          <LFormGroup
+            val={formObj.recommend}
+            valStr="recommend"
+            keyStr="推荐房源"
+            bc={this.baseFormChange.bind(this)}
+          />
+        </View>
+        
+        <View className="l-floor-footer t2">
+          <View className="lff-flex">
+            <View className="lff-btn full" onClick={this.saveHandle.bind(this)}>提交</View>
+          </View>
+        </View>
+      </View>
+    )
+  }
+}
+
+export default Index

+ 57 - 0
src/pagesRoom/estateTrendUpdate.scss

@@ -0,0 +1,57 @@
+@import '@css/mixin.scss';
+.scoped-box-w {
+  display: flex;
+  .sbw1 {
+    width: 260px;
+  }
+  .sbw2 {
+    width: 430px;
+  }
+}
+.scoped-box {
+  padding: 20px 20px 0;
+  .sb-title {
+    font-size: 30px;
+    color: #333;
+    padding-bottom: 20px;
+    font-weight: bold;
+    padding-left: 10px;
+    .s {
+      display: inline-block;
+      font-size: 24px;
+      color: #999;
+      font-weight: normal;
+    }
+  }
+}
+.at-textarea {
+  border: 1PX solid #f2f2f2;
+}
+.at-textarea__textarea {
+  font-size: 28px;
+  color: #333;
+}
+
+.scoped-img {
+  .si-op {
+    display: inline-block;
+    vertical-align: middle;
+    width: 200px;
+    height: 200px;
+    // margin-right: 30px;
+    // margin-bottom: 30px;
+    position: relative;
+    border: 1PX solid #f2f2f2;
+    .img {
+      width: 200px;
+      height: 200px;
+    }
+    .i {
+      position: absolute;
+      top: -20px;
+      right: -20px;
+      width: 40px;
+      height: 40px;
+    }
+  }
+}