Authored by 李犇

首页猜你喜欢,增加android版的预加载;达到滚动底部时,android直接请求网络数据;猜你喜欢拖拽4页——review by 于良

... ... @@ -766,6 +766,8 @@ export default class Home extends Component {
}}
renderFooter={this._renderFooter}
onScroll={this._onScroll}
scrollRenderAheadDistance={2000}
onEndReachedThreshold={2000}
/>
}
... ...
... ... @@ -220,9 +220,14 @@ class HomeContainer extends Component {
}
onEndReached() {
InteractionManager.runAfterInteractions(() => {
if (Platform === 'ios') {
InteractionManager.runAfterInteractions(() => {
this.props.actions.fetchHomeFavoriteList();
});
}
else {
this.props.actions.fetchHomeFavoriteList();
});
}
}
jumpWithUrl(jumpUrl, imageUrl, index, floorData, floorIndex) {
... ...
... ... @@ -321,7 +321,7 @@ export function fetchBoyGirlFavoriteList() {
}
//商品列表最多分四页
payload.endReached = (payload.list.length == 0)||((payload.currentPage > 4) || (payload.currentPage == payload.pageCount));
payload.endReached = (payload.list.length == 0)||((payload.currentPage > 3) || (payload.currentPage == payload.pageCount));
dispatch(fetchFavoriteSuccess(payload, channelStr));
... ...
... ... @@ -2,6 +2,10 @@
import Request from '../../common/services/NativeRequest';
import {
Platform,
} from 'react-native'
export default class HomeService {
constructor (host) {
... ... @@ -51,7 +55,7 @@ export default class HomeService {
url: '',
body: {
method: 'app.search.newLast7day',
limit: 50,
limit: (Platform.OS === 'ios') ? 50:20,
page,
yh_channel: channel,
gender,
... ...