|
@@ -1,9 +1,11 @@
|
1
|
|
-import Taro from '@tarojs/taro'
|
|
1
|
+import Taro, { useDidShow } from '@tarojs/taro'
|
2
|
2
|
import { React, useState, useEffect, useRef, useMemo } from 'react'
|
3
|
3
|
import iconsearch from '@/assets/icons/housemantj/search.png'
|
4
|
4
|
import locationimg from '@/assets/icons/housemantj/location.png'
|
5
|
5
|
import Tip from '@/components/tip'
|
6
|
6
|
import List from '@/components/List';
|
|
7
|
+import NoData from '@/components/NoData'
|
|
8
|
+import Waterfall from '@/components/MasonryLayout/Waterfall';
|
7
|
9
|
import MasonryLayout from '@/components/MasonryLayout';
|
8
|
10
|
import { getIndexType, getResourceList } from '@/services/home'
|
9
|
11
|
import { random } from '@/utils'
|
|
@@ -11,7 +13,7 @@ import Card from '../components/Card'
|
11
|
13
|
import './less/Recommend.less'
|
12
|
14
|
import { OfficialAccount } from '@tarojs/components'
|
13
|
15
|
|
14
|
|
-const listStyle = { height: 'calc(100% - 145px)' }
|
|
16
|
+const listStyle = { height: '100%' }
|
15
|
17
|
|
16
|
18
|
export default (props) => {
|
17
|
19
|
const { router, person, location } = props
|
|
@@ -76,7 +78,7 @@ export default (props) => {
|
76
|
78
|
// })
|
77
|
79
|
|
78
|
80
|
return (
|
79
|
|
- <>
|
|
81
|
+ <view style={{ height: '100%', overflow: 'hidden', display: 'flex', flexDirection: 'column' }}>
|
80
|
82
|
<OfficialAccount>s21</OfficialAccount>
|
81
|
83
|
<view className='search' onClick={onSearch} >
|
82
|
84
|
<input className='searchInput' disabled />
|
|
@@ -103,24 +105,24 @@ export default (props) => {
|
103
|
105
|
</mp-tabs>
|
104
|
106
|
</scroll-view>
|
105
|
107
|
</view>
|
106
|
|
-
|
107
|
|
- <List
|
108
|
|
- ref={listRef}
|
109
|
|
- style={listStyle}
|
110
|
|
- request={getResourceList}
|
111
|
|
- params={queryParams}
|
112
|
|
- refresherEnabled={false}
|
113
|
|
- onDataChange={handleDataChange}
|
114
|
|
- >
|
115
|
|
- <view style={{ padding: '30rpx 15rpx' }}>
|
116
|
|
- <MasonryLayout
|
117
|
|
- itemKey='resourceNo'
|
118
|
|
- listData={listData}
|
119
|
|
- render={(item) => <Card item={item} />}
|
120
|
|
- />
|
121
|
|
- </view>
|
122
|
|
- </List>
|
123
|
|
-
|
124
|
|
- </>
|
|
108
|
+ <view className={listClass} style={{ flex: '1', overflow: 'hidden' }}>
|
|
109
|
+ <List
|
|
110
|
+ ref={listRef}
|
|
111
|
+ style={listStyle}
|
|
112
|
+ request={getResourceList}
|
|
113
|
+ params={queryParams}
|
|
114
|
+ refresherEnabled={false}
|
|
115
|
+ onDataChange={handleDataChange}
|
|
116
|
+ >
|
|
117
|
+ <view style={{ padding: '30rpx 15rpx' }}>
|
|
118
|
+ <MasonryLayout
|
|
119
|
+ itemKey='resourceNo'
|
|
120
|
+ listData={listData}
|
|
121
|
+ render={(item, callback) => <Card item={item} onImageLoad={callback} />}
|
|
122
|
+ />
|
|
123
|
+ </view>
|
|
124
|
+ </List>
|
|
125
|
+ </view>
|
|
126
|
+ </view>
|
125
|
127
|
)
|
126
|
128
|
}
|