|
@@ -23,6 +23,8 @@ export default withLayout(() => {
|
23
|
23
|
const [ProjectList, setProjectList] = useState([])
|
24
|
24
|
const [IsPull, setPull] = useState(false)
|
25
|
25
|
const [PullTimer, setPullTimer] = useState(null)
|
|
26
|
+ const [ShowHotRecommend, setShowHotRecommend] = useState(false)
|
|
27
|
+ const [ShowLive, setShowLive] = useState(false)
|
26
|
28
|
|
27
|
29
|
useEffect(() => {
|
28
|
30
|
if (city.curCity.name) {
|
|
@@ -47,6 +49,14 @@ export default withLayout(() => {
|
47
|
49
|
setPull(true)
|
48
|
50
|
}
|
49
|
51
|
|
|
52
|
+ const HotRecommendChange = (e) => {
|
|
53
|
+ setShowHotRecommend(e)
|
|
54
|
+ }
|
|
55
|
+
|
|
56
|
+ const LiveChange = (e) => {
|
|
57
|
+ setShowLive(e)
|
|
58
|
+ }
|
|
59
|
+
|
50
|
60
|
useEffect(() => { // 下拉刷新触发
|
51
|
61
|
if (IsPull) {
|
52
|
62
|
clearTimeout(PullTimer)
|
|
@@ -82,15 +92,15 @@ export default withLayout(() => {
|
82
|
92
|
</view>
|
83
|
93
|
|
84
|
94
|
{/* 热门推荐 */}
|
85
|
|
- <view className='HotRecommend'>
|
|
95
|
+ <view className='HotRecommend' style={{display: ShowHotRecommend ? 'block' : 'none'}}>
|
86
|
96
|
<ColumnTitle Name='热门推荐' Icon='icon-shoucang'></ColumnTitle>
|
87
|
|
- <HotRecommend></HotRecommend>
|
|
97
|
+ <HotRecommend change={HotRecommendChange}></HotRecommend>
|
88
|
98
|
</view>
|
89
|
99
|
|
90
|
100
|
{/* 直播购房 */}
|
91
|
|
- <view className='LiveSale'>
|
|
101
|
+ <view className='LiveSale' style={{display: ShowLive ? 'block' : 'none'}}>
|
92
|
102
|
<ColumnTitle Name='直播购房' Icon='icon-yinpin' ShowMore ToMore={() => { Taro.switchTab({ url: `/pages/video/index` }) }}></ColumnTitle>
|
93
|
|
- <LiveSale></LiveSale>
|
|
103
|
+ <LiveSale change={LiveChange}></LiveSale>
|
94
|
104
|
</view>
|
95
|
105
|
|
96
|
106
|
{/* 全部项目 */}
|