...
|
...
|
@@ -330,6 +330,7 @@ export function getProductListForMineCenter() { |
|
|
return new MineService(app.host).fetchMineCenterProductList()
|
|
|
.then(json => {
|
|
|
dispatch(productListForMineCenterSuccess(json));
|
|
|
dispatch(reportFavoriteData(json));
|
|
|
})
|
|
|
.catch(error => {
|
|
|
dispatch(productListForMineCenterFailure());
|
...
|
...
|
@@ -337,6 +338,43 @@ export function getProductListForMineCenter() { |
|
|
}
|
|
|
}
|
|
|
|
|
|
function reportFavoriteData(payload) {
|
|
|
return (dispatch, getState) => {
|
|
|
try {
|
|
|
let productList = payload.product_list;
|
|
|
let rec_id = payload.rec_id;
|
|
|
let total = payload.page_size;
|
|
|
|
|
|
let rec_pos = '100004';
|
|
|
|
|
|
let productIDS = ''
|
|
|
if (productList.length > 0) {
|
|
|
let product = productList[0];
|
|
|
let product_id = product.product_id ? product.product_id : '';
|
|
|
productIDS = productIDS + product_id;
|
|
|
}
|
|
|
for (var i = 1; i < productList.length; i++) {
|
|
|
let product = productList[i]
|
|
|
let product_id = product.product_id ? product.product_id : '';
|
|
|
productIDS = productIDS + ',' + product_id;
|
|
|
}
|
|
|
let param = {
|
|
|
'PRD_ID': productIDS,
|
|
|
'PRD_NUM': total,
|
|
|
'REC_POSE': rec_pos,
|
|
|
'ACTION_ID': 0,
|
|
|
'REC_ID': rec_id?rec_id:''
|
|
|
};
|
|
|
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_CHOOSE_FOR_YOU', param);
|
|
|
|
|
|
} catch (e) {
|
|
|
__DEV__ && console.error(e);
|
|
|
} finally {
|
|
|
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
export function getMineUserInfo() {
|
|
|
return (dispatch, getState) => {
|
|
|
let {app, mine} = getState();
|
...
|
...
|
|