Authored by chenl

修复了生日特惠埋点问题。review by zhuangjiajia。

... ... @@ -84,9 +84,9 @@ class FastExpressContainer extends Component {
I_INDEX: parseInt(rowId) + 1 + '',
PRD_ID: productId,
REC_ID: rec_id,
};
};
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_GOODS_LIST_DT', params);
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_GOODS_LIST_DT', params);
}
catch(error) {}
}
... ...
... ... @@ -85,32 +85,36 @@ export function getBirthProductFailure(error) {
}
}
function dataExposure(payload, rec_id) {
function dataExposure(payload, rec_id){
return (dispatch, getState) => {
return(dispatch, getState)=>{
try {
let productIds = "";
let productCount = 0;
//product list数据
let productList = payload.list;
let total = productList ? productList.length : 0;
let productIdList = "";
productList.map((item,i)=>{
if(i > 0){
productIdList += ","+item.product_id;
}else{
productIdList = item.product_id;
}
}
);
if(productList && productList.length > 0){
productCount = productList.length;
productList.map((item, i) => {
if(i > 0)
productIds = productIds + "," + item.product_id;
else
productIds = item.product_id;
});
}
let params = {
TYPE_ID:8,
TOTAL:total,
PRD_LIST:productIdList,
REC_ID:rec_id
TYPE_ID: 8,
TOTAL: productCount,
PRD_LIST: productIds,
REC_ID: rec_id,
};
ReactNative.NativeModules.YH_CommunityHelper.logEvent("YB_GOODS_LIST",params);
}catch (error){}
}
}
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_GOODS_LIST', params);
}
catch(error) {
}
};
}
\ No newline at end of file
... ...
... ... @@ -128,30 +128,37 @@ export function getFastProductFailure(error) {
}
}
function dataExpose(payload, rec_id) {
return(dispatch,getState)=>{
function dataExposure(payload, rec_id){
return (dispatch, getState) => {
try {
let productIds = "";
let productCount = 0;
//product list数据
let productList = payload.list;
let total = productList ? productList.length : 0;
let productIdList = "";
productList.map((item,i)=>{
if(i > 0){
productIdList += ","+item.product_id;
}else{
productIdList = item.product_id;
}
}
);
if(productList && productList.length > 0){
productCount = productList.length;
productList.map((item, i) => {
if(i > 0)
productIds = productIds + "," + item.product_id;
else
productIds = item.product_id;
});
}
let params = {
TYPE_ID:7,
TOTAL:total,
PRD_LIST:productIdList,
REC_ID:rec_id
}
ReactNative.NativeModules.YH_CommunityHelper.logEvent("YB_GOODS_LIST",params);
}catch (error){}
}
TYPE_ID: 7,
TOTAL: productCount,
PRD_LIST: productIds,
REC_ID: rec_id,
};
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_GOODS_LIST', params);
}
catch(error) {
}
};
}
\ No newline at end of file
... ...