|
@@ -36,6 +36,7 @@ class Index extends Component {
|
|
|
houseSaleStateArr: ['未售', '小定', '已定', '已售', '洪楼售'],
|
|
|
isDtlShow: false,
|
|
|
buildingNumList: [],
|
|
|
+ allData: {},
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -80,13 +81,14 @@ class Index extends Component {
|
|
|
getDtl = () => {
|
|
|
const { curNav, buildingNumList } = this.state
|
|
|
const {eId, name, id} = this.$router.params
|
|
|
- Taro.api.house.apiestatelotterypricelist({
|
|
|
+ Taro.api.house.apiestatelotterypricelist2({
|
|
|
estate_id: eId,
|
|
|
lottery_id: buildingNumList[curNav].id,
|
|
|
building_num: buildingNumList[curNav].title,
|
|
|
}).then(res => {
|
|
|
this.setState({
|
|
|
- roomArr: res || []
|
|
|
+ allData: res || {},
|
|
|
+ roomArr: res.data || []
|
|
|
})
|
|
|
if (this.subChat) {
|
|
|
this.subChat.getData({name, id: eId}, 'pt')
|
|
@@ -120,7 +122,11 @@ class Index extends Component {
|
|
|
renderTop () {
|
|
|
const {eId, id, name} = this.$router.params
|
|
|
const curParams = `eId=${eId}&id=${id}&name=${name}`
|
|
|
- const { curObj, curNav, buildingNumList } = this.state
|
|
|
+ const { allData, curObj, curNav, buildingNumList } = this.state
|
|
|
+ let newTabList = JSON.parse(JSON.stringify(buildingNumList))
|
|
|
+ if (newTabList[curNav] && newTabList[curNav].title) {
|
|
|
+ newTabList[curNav].title = `${newTabList[curNav].title}(${allData.avg_price}/㎡)`
|
|
|
+ }
|
|
|
const nameIcon = require('./img/yfyj/yfyj04.png')
|
|
|
const i1 = require('./img/yfyj/yfyj05.png')
|
|
|
const i2 = require('./img/yfyj/yfyj06.png')
|
|
@@ -162,7 +168,7 @@ class Index extends Component {
|
|
|
<AtTabs
|
|
|
current={curNav}
|
|
|
scroll
|
|
|
- tabList={buildingNumList}
|
|
|
+ tabList={newTabList}
|
|
|
onClick={this.navClick.bind(this)}>
|
|
|
</AtTabs>
|
|
|
</View>
|
|
@@ -207,7 +213,9 @@ class Index extends Component {
|
|
|
}
|
|
|
|
|
|
renderInfo () {
|
|
|
- const { roomArr } = this.state
|
|
|
+ const { roomArr, allData } = this.state
|
|
|
+ const house_type_total = allData.house_type_total || {}
|
|
|
+ const htaArr = house_type_total.house_type_avg || []
|
|
|
let cArr = roomArr || []
|
|
|
const htArr = cArr[0] ? cArr[0].data : []
|
|
|
const htArrIndex = htArr.length
|
|
@@ -225,6 +233,7 @@ class Index extends Component {
|
|
|
</View>
|
|
|
<View className="p1">{item.house_type}</View>
|
|
|
<View className="p2">{item.built}㎡</View>
|
|
|
+ <View className="p2">¥{htaArr[index]}/㎡</View>
|
|
|
{
|
|
|
item.house_rate === '100%'
|
|
|
? ''
|