Authored by 盖剑秋

Log event for good goods recommend like action.

@@ -46,6 +46,12 @@ export function onPressPraise() { @@ -46,6 +46,12 @@ export function onPressPraise() {
46 let likeCount = json.total; 46 let likeCount = json.total;
47 dispatch(likeSuccess({likeStatus, likeCount})); 47 dispatch(likeSuccess({likeStatus, likeCount}));
48 NativeModules.YH_CommonHelper.goodGoodsRecommendDetailPraiseStatusChanged({likeStatus, likeCount}); 48 NativeModules.YH_CommonHelper.goodGoodsRecommendDetailPraiseStatusChanged({likeStatus, likeCount});
  49 + let param = {
  50 + PRD_SKN: product_skn,
  51 + LIKE_TYPE: forLike? 1: 2,
  52 + POS_ID: 102,
  53 + }
  54 + NativeModules.YH_CommonHelper.logEvent('YB_GOOD_GDS_LIKE_C', param);
49 }).catch(error => { 55 }).catch(error => {
50 dispatch(likeSuccess({likeStatus: detail.get('is_praised'), likeCount: detail.get('total_praised')})); 56 dispatch(likeSuccess({likeStatus: detail.get('is_praised'), likeCount: detail.get('total_praised')}));
51 }); 57 });
@@ -63,6 +63,12 @@ export function like(index) { @@ -63,6 +63,12 @@ export function like(index) {
63 let likeCount = json.total; 63 let likeCount = json.total;
64 let newProduct = currentProduct.set('is_praised', likeStatus).set('total_praised', likeCount); 64 let newProduct = currentProduct.set('is_praised', likeStatus).set('total_praised', likeCount);
65 dispatch(likeSuccess(newProduct, index)); 65 dispatch(likeSuccess(newProduct, index));
  66 + let param = {
  67 + PRD_SKN: product_skn,
  68 + LIKE_TYPE: forLike? 1: 2,
  69 + POS_ID: 101,
  70 + }
  71 + NativeModules.YH_CommonHelper.logEvent('YB_GOOD_GDS_LIKE_C', param);
66 }).catch(error => { 72 }).catch(error => {
67 dispatch(likeSuccess(currentProduct, index)); 73 dispatch(likeSuccess(currentProduct, index));
68 }); 74 });