...
|
...
|
@@ -9,6 +9,7 @@ const { |
|
|
|
|
|
SET_PLATFORM,
|
|
|
SET_IS_NEED_SHOW_XSRZ,
|
|
|
SET_IS_MINEVIEW_APPEARED,
|
|
|
|
|
|
MINECENTER_PRODUCT_REQUEST,
|
|
|
MINECENTER_PRODUCT_SUCCESS,
|
...
|
...
|
@@ -102,6 +103,13 @@ export function setIsNeedShowXsrz(json) { |
|
|
}
|
|
|
}
|
|
|
|
|
|
export function setIsMineViewAppeared(json) {
|
|
|
return {
|
|
|
type: SET_IS_MINEVIEW_APPEARED,
|
|
|
payload: json,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
export function productListForMineCenterRequest() {
|
|
|
return {
|
|
|
type: MINECENTER_PRODUCT_REQUEST,
|
...
|
...
|
@@ -336,7 +344,7 @@ export function getProductListForMineCenter() { |
|
|
} finally {
|
|
|
}
|
|
|
dispatch(productListForMineCenterSuccess(res));
|
|
|
dispatch(reportFavoriteData(res));
|
|
|
dispatch(reportFavoriteDataJudgeViewAppear(res));
|
|
|
})
|
|
|
.catch(error => {
|
|
|
dispatch(productListForMineCenterFailure());
|
...
|
...
|
@@ -388,7 +396,26 @@ function exposePruductListData(json,channel) { |
|
|
return res;
|
|
|
}
|
|
|
|
|
|
function reportFavoriteData(payload) {
|
|
|
/** 判断界面是否在前台显示再上报 */
|
|
|
export function reportFavoriteDataJudgeViewAppear(payload) {
|
|
|
return (dispatch, getState) => {
|
|
|
let {app, mine} = getState();
|
|
|
let isMineViewAppeared = mine.isMineViewAppeared;
|
|
|
if (isMineViewAppeared) {
|
|
|
dispatch(reportFavoriteData(payload));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/** 不判断界面是否在前台显示,直接上报 */
|
|
|
export function reportFavoriteDataNotJudgeViewAppear(payload) {
|
|
|
return (dispatch, getState) => {
|
|
|
dispatch(reportFavoriteData(payload));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/** 上报猜你喜欢埋点数据 */
|
|
|
export function reportFavoriteData(payload) {
|
|
|
return (dispatch, getState) => {
|
|
|
try {
|
|
|
let productList = payload.product_list;
|
...
|
...
|
@@ -396,7 +423,6 @@ function reportFavoriteData(payload) { |
|
|
let total = payload.page_size;
|
|
|
|
|
|
let rec_pos = '100004';
|
|
|
|
|
|
let productIDS = ''
|
|
|
if (productList.length > 0) {
|
|
|
let product = productList[0];
|
...
|
...
|
@@ -413,7 +439,7 @@ function reportFavoriteData(payload) { |
|
|
'PRD_NUM': total,
|
|
|
'REC_POSE': rec_pos,
|
|
|
'ACTION_ID': 0,
|
|
|
'REC_ID': rec_id?rec_id:''
|
|
|
'REC_ID': rec_id ? rec_id : ''
|
|
|
};
|
|
|
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_CHOOSE_FOR_YOU', param);
|
|
|
|
...
|
...
|
|