...
|
...
|
@@ -14,7 +14,7 @@ const { |
|
|
FETCH_BANNER_FAILURE,
|
|
|
} = require('../../constants/actionTypes').default;
|
|
|
|
|
|
export function getProductList() {
|
|
|
export function getProductList(reload = false) {
|
|
|
return (dispatch, getState) => {
|
|
|
let {app, list} = getState();
|
|
|
let {products} = list;
|
...
|
...
|
@@ -30,7 +30,7 @@ export function getProductList() { |
|
|
let payload = parseProductList(json);
|
|
|
payload.endReached = payload.currentPage == payload.pageCount;
|
|
|
|
|
|
if (payload.currentPage > 1) {
|
|
|
if (payload.currentPage > 1 && !reload) {
|
|
|
let oldList = products.list.toJS();
|
|
|
let list = [...oldList, ...payload.list];
|
|
|
payload.list = list;
|
...
|
...
|
@@ -45,7 +45,7 @@ export function getProductList() { |
|
|
let channel = app.channel;
|
|
|
let gender = '';
|
|
|
let uid = 0;
|
|
|
let page = products.currentPage + 1;
|
|
|
let page = reload? 1: products.currentPage + 1;
|
|
|
let pageSize = products.pageSize;
|
|
|
|
|
|
Promise.all([
|
...
|
...
|
|