|
@@ -3,6 +3,7 @@ import FormIdCollector from '@components/formIdCollector'
|
3
|
3
|
import './index.scss'
|
4
|
4
|
import ProjectItem from './item'
|
5
|
5
|
import Banner from './banner'
|
|
6
|
+import Newsbanner from './newsbanner'
|
6
|
7
|
import HelpGroupBanner from './swiper'
|
7
|
8
|
// import ActivityItem from '../activity/item'
|
8
|
9
|
import ready from '@utils/ready'
|
|
@@ -53,6 +54,8 @@ export default class Index extends Component {
|
53
|
54
|
|
54
|
55
|
componentWillMount() {
|
55
|
56
|
ready.queue(() => {
|
|
57
|
+
|
|
58
|
+ Taro.hideTabBar()
|
56
|
59
|
this.getLocation()
|
57
|
60
|
|
58
|
61
|
Taro.setNavigationBarTitle({ title: this.props.userInfo.miniApp.name })
|
|
@@ -84,7 +87,7 @@ export default class Index extends Component {
|
84
|
87
|
|
85
|
88
|
if (this.props.curCity.id) {
|
86
|
89
|
ready.queue(() => {
|
87
|
|
- Taro.hideTabBar()
|
|
90
|
+ // Taro.hideTabBar()
|
88
|
91
|
this.loadData()
|
89
|
92
|
})
|
90
|
93
|
}
|
|
@@ -229,9 +232,9 @@ export default class Index extends Component {
|
229
|
232
|
if (curCity.id) {
|
230
|
233
|
payload.cityId = curCity.id
|
231
|
234
|
}
|
232
|
|
- // debugger
|
|
235
|
+
|
233
|
236
|
this.setState({
|
234
|
|
- newsList: []
|
|
237
|
+ newsList: [{}]
|
235
|
238
|
}, () => {
|
236
|
239
|
queryNewsList(payload).then(res => {
|
237
|
240
|
this.setState({
|
|
@@ -241,23 +244,6 @@ export default class Index extends Component {
|
241
|
244
|
})
|
242
|
245
|
}
|
243
|
246
|
|
244
|
|
- // loadActivityList() {
|
245
|
|
- // const { curCity } = this.props
|
246
|
|
- // const payload = {
|
247
|
|
- // pageNumber: 1,
|
248
|
|
- // pageSize: 1
|
249
|
|
- // }
|
250
|
|
- // if (curCity.id) {
|
251
|
|
- // payload.cityId = curCity.id
|
252
|
|
- // }
|
253
|
|
- // queryActivityList(payload).then(res => {
|
254
|
|
- // this.setState({
|
255
|
|
- // activityList: res.list || []
|
256
|
|
- // }, () => {
|
257
|
|
- // console.log(this.state.activityList)
|
258
|
|
- // })
|
259
|
|
- // })
|
260
|
|
- // }
|
261
|
247
|
|
262
|
248
|
loadList() {
|
263
|
249
|
const { keywords } = this.state
|
|
@@ -283,9 +269,7 @@ export default class Index extends Component {
|
283
|
269
|
title: '当前城市暂无楼盘',
|
284
|
270
|
icon: 'none'
|
285
|
271
|
})
|
286
|
|
-
|
287
|
272
|
}
|
288
|
|
-
|
289
|
273
|
Taro.hideLoading()
|
290
|
274
|
this.setState({
|
291
|
275
|
loaded: true
|
|
@@ -643,41 +627,7 @@ export default class Index extends Component {
|
643
|
627
|
}
|
644
|
628
|
|
645
|
629
|
</View>
|
646
|
|
- {
|
647
|
|
- newsList.length &&
|
648
|
|
- <View style="background-color:#fff">
|
649
|
|
- <View className="notice-box">
|
650
|
|
- <View style="display: flex;align-items: center;">
|
651
|
|
- <Image className="notice-icon" src={require('@assets/notice.png')}></Image>
|
652
|
|
- <Swiper
|
653
|
|
- className='notice-swiper'
|
654
|
|
- circular
|
655
|
|
- autoplay
|
656
|
|
- interval="3000"
|
657
|
|
- onChange={this.changeCurrent.bind(this)}
|
658
|
|
- vertical="true"
|
659
|
|
- >
|
660
|
|
- {
|
661
|
|
- newsList.map((list, inx) => {
|
662
|
|
- return (
|
663
|
|
- <SwiperItem key={`news-${inx}`}>
|
664
|
|
- <View className="notice-text" onClick={this.handleNoticeClick.bind(this, list)}>
|
665
|
|
- {list.newsName}
|
666
|
|
- </View>
|
667
|
|
- </SwiperItem>
|
668
|
|
- )
|
669
|
|
- })
|
670
|
|
- }
|
671
|
|
- </Swiper>
|
672
|
|
- </View>
|
673
|
|
- {newsList.length > 1 &&
|
674
|
|
- <View className="notice-more" onClick={this.toNewsList}>
|
675
|
|
- 更多 <Text className="iconfont icon-more"></Text>
|
676
|
|
- </View>
|
677
|
|
- }
|
678
|
|
- </View>
|
679
|
|
- </View>
|
680
|
|
- }
|
|
630
|
+ <Newsbanner cityId={curCity.id} onClick={this.handleNoticeClick} onClickMore={this.toNewsList} />
|
681
|
631
|
|
682
|
632
|
{/* 推荐楼盘 */}
|
683
|
633
|
{this.renderProjectList()}
|