...
|
...
|
@@ -201,6 +201,19 @@ function reportHomeData(payload) { |
|
|
}
|
|
|
}
|
|
|
|
|
|
function reportFavoriteData(payload) {
|
|
|
return (dispatch) => {
|
|
|
try {
|
|
|
let reportData = floorParser.parseReportProductList(payload);
|
|
|
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_SHOW_MAIN_RECOMMEND', {'DATA': reportData});
|
|
|
} catch (e) {
|
|
|
__DEV__ && console.error(e);
|
|
|
} finally {
|
|
|
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
export function fetchHomeFavoriteList() {
|
|
|
return (dispatch, getState) => {
|
|
|
let {app, home} = getState();
|
...
|
...
|
@@ -239,7 +252,7 @@ export function fetchBoyGirlFavoriteList() { |
|
|
return new HomeService(app.host).fetchHomeFavoriteData(channel, contentCode, gender, fromPage, page)
|
|
|
.then(json =>{
|
|
|
let payload = floorParser.parseBoyGirlFavorite(json);
|
|
|
|
|
|
dispatch(reportFavoriteData(payload));
|
|
|
if (payload.currentPage > 1) {
|
|
|
let oldList = currentChannelData.favorite.get('list').toJS();
|
|
|
let newList = [...oldList, ...payload.list];
|
...
|
...
|
@@ -306,6 +319,7 @@ export function fetchKidsFavoriteList() { |
|
|
return new HomeService(app.host).fetchHomeKidFavoriteData(fromPage, page)
|
|
|
.then(json =>{
|
|
|
let payload = floorParser.parseKidsFavorite(json);
|
|
|
dispatch(reportFavoriteData(payload));
|
|
|
if (payload.currentPage > 1) {
|
|
|
let oldList = kid.favorite.get('list').toJS();
|
|
|
let newList = [...oldList, ...payload.list];
|
...
|
...
|
|