|
@@ -256,6 +256,22 @@ class Index extends Component {
|
|
|
|
|
|
renderInfo () {
|
|
|
const { curId, curObj, token } = this.state
|
|
|
+ const deliverTime = curObj.deliver_time
|
|
|
+ let tagDefine1 = ''
|
|
|
+ if (deliverTime && curObj.estate_tag !== '二手') {
|
|
|
+ const d = new Date()
|
|
|
+ const year = d.getFullYear()
|
|
|
+ const month = d.getMonth() + 1
|
|
|
+ const curDS = +new Date(`${year}-${month > 9 ? month : '0'+month}`)
|
|
|
+ const estateDS = +new Date(deliverTime)
|
|
|
+ if (curDS >= estateDS) {
|
|
|
+ tagDefine1 = '现房'
|
|
|
+ } else {
|
|
|
+ if ( curDS+(30 * 24 * 60 * 60 * 1000 * 6.5) > estateDS ) {
|
|
|
+ tagDefine1 = '准现房'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
const iconPos = require('@img/i_g_pos.png')
|
|
|
const iconHeart = require('@img/i_g_heart.png')
|
|
|
const iconHeartGif = require('@img/i_g_warn.gif')
|
|
@@ -271,6 +287,12 @@ class Index extends Component {
|
|
|
<View className="di-title">{curObj.estate_name}</View>
|
|
|
<View className="di-sign">
|
|
|
<View className="l">¥{curObj.price_range || 'loading'}/㎡</View>
|
|
|
+ {
|
|
|
+ tagDefine1
|
|
|
+ ?
|
|
|
+ <View className="s c2">{tagDefine1}</View>
|
|
|
+ : ''
|
|
|
+ }
|
|
|
{
|
|
|
curObj.estate_tag === '售罄'
|
|
|
? <View className="s t4">{curObj.estate_tag}</View>
|