Authored by 张丽霞

店铺模块化埋点

... ... @@ -117,32 +117,11 @@ class BrandStoreContainer extends Component {
}
_onPressCollection(isCollected) {
let param = {
SHOP_ID: this.props.brandStore.shopId,
BRAND_ID: this.props.brandStore.resource.brandBrowse.brandId,
COL_TYPE: 1,
}
if (isCollected) {
this.props.actions.addFavorite();
param = {
SHOP_ID: this.props.brandStore.shopId,
BRAND_ID: this.props.brandStore.resource.brandBrowse.brandId,
COL_TYPE: 1,
TEMPLATE_TYPE:this.props.brandStore.info.shop_template_type,
IS_RED: 0,
}
} else {
this.props.actions.cancelFavorite();
param = {
SHOP_ID: this.props.brandStore.shopId,
BRAND_ID: this.props.brandStore.resource.brandBrowse.brandId,
COL_TYPE: 2,
TEMPLATE_TYPE:this.props.brandStore.info.shop_template_type,
IS_RED: 0,
}
}
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_BRAND_SHOP_COLLECT_C', param);
}
_onPressCoupon(rowData, resourceId, rowID) {
... ... @@ -154,7 +133,6 @@ class BrandStoreContainer extends Component {
let param = {
SHOP_ID: this.props.brandStore.shopId,
BRAND_ID: this.props.brandStore.resource.brandBrowse.brandId,
FLR_ID: resourceId,
FLR_INDEX: 1,
I_INDEX: rowID+1,
... ... @@ -177,7 +155,6 @@ class BrandStoreContainer extends Component {
let param = {
SHOP_ID: this.props.brandStore.shopId,
BRAND_ID: this.props.brandStore.resource.brandBrowse.brandId,
FLR_ID: this.props.brandStore.resource.hotProducts_APP.resourceId,
FLR_INDEX: 6,
I_INDEX: parseInt(rowId)+1,
... ... @@ -206,7 +183,7 @@ class BrandStoreContainer extends Component {
TAB_ID: 0,
TAB_NAME: '首页',
SORT_TYPE: order,
PRD_ID: productSkn,
PRD_SKN: productSkn,
IS_RED: 0,
TEMPLATE_TYPE:this.props.brandStore.info.shop_template_type,
FILTER_VALUE: this.props.brandStore.filterNameFactors.toJS(),
... ... @@ -229,7 +206,7 @@ class BrandStoreContainer extends Component {
SHOP_ID: this.props.brandStore.shopId,
TAB_ID: 1,
TAB_NAME: '上新',
PRD_ID: productSkn,
PRD_SKN: productSkn,
IS_RED: 0,
TEMPLATE_TYPE:this.props.brandStore.info.shop_template_type,
}
... ... @@ -241,7 +218,7 @@ class BrandStoreContainer extends Component {
SHOP_ID: this.props.brandStore.shopId,
TAB_ID: 2,
TAB_NAME: '人气',
PRD_ID: productSkn,
PRD_SKN: productSkn,
IS_RED: 0,
TEMPLATE_TYPE:this.props.brandStore.info.shop_template_type,
}
... ... @@ -255,7 +232,6 @@ class BrandStoreContainer extends Component {
ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
let param = {
SHOP_ID: this.props.brandStore.shopId,
BRAND_ID: this.props.brandStore.resource.brandBrowse.brandId,
FLR_ID: this.props.brandStore.resource.hotProducts_APP.resourceId,
FLR_INDEX: 6,
I_INDEX: 0,
... ... @@ -272,7 +248,6 @@ class BrandStoreContainer extends Component {
ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
let param = {
SHOP_ID: this.props.brandStore.shopId,
BRAND_ID: this.props.brandStore.resource.brandBrowse.brandId,
FLR_ID: this.props.brandStore.resource.brandBrowse.resourceId,
FLR_INDEX: 2,
I_INDEX: rowID+1,
... ... @@ -289,7 +264,6 @@ class BrandStoreContainer extends Component {
ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
let param = {
SHOP_ID: this.props.brandStore.shopId,
BRAND_ID: this.props.brandStore.resource.brandBrowse.brandId,
FLR_ID: resourceId,
FLR_INDEX: 3,
I_INDEX: rowID+1,
... ... @@ -306,7 +280,6 @@ class BrandStoreContainer extends Component {
ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
let param = {
SHOP_ID: this.props.brandStore.shopId,
BRAND_ID: this.props.brandStore.resource.brandBrowse.brandId,
FLR_ID: resourceId,
FLR_INDEX: 4,
I_INDEX: rowID+1,
... ... @@ -323,7 +296,6 @@ class BrandStoreContainer extends Component {
ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
let param = {
SHOP_ID: this.props.brandStore.shopId,
BRAND_ID: this.props.brandStore.resource.brandBrowse.brandId,
FLR_ID: this.props.brandStore.resource.recommend_APP.resourceId,
FLR_INDEX: 5,
I_INDEX: parseInt(rowID)+1,
... ... @@ -357,7 +329,6 @@ class BrandStoreContainer extends Component {
let param = {
SHOP_ID: this.props.brandStore.shopId,
BRAND_ID: this.props.brandStore.resource.brandBrowse.brandId,
TAB_ID: value,
TAB_NAME: name,
TEMPLATE_TYPE: this.props.brandStore.info.shop_template_type,
... ...
... ... @@ -225,7 +225,7 @@ export function getShopInfo() {
SHOP_ID: json.shops_id ? json.shops_id : '0',
}
dispatch(shopDataExposure('YB_SHOW_CLASSICAL_SHOP_INFO', params));
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_BRAND_SHOP_L', {SHOP_ID: brandStore.shopId, TEMPLATE:json.shop_template_type, IS_RED: 0});
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_BRAND_SHOP_L', {SHOP_ID: brandStore.shopId, TEMPLATE_TYPE:json.shop_template_type, IS_RED: 0});
})
.catch(error => {
dispatch(shopInfoFailure(error));
... ... @@ -1051,6 +1051,13 @@ export function addFavorite() {
dispatch(addFavoriteSuccess());
return new BrandStoreService(app.host).addFavorite(shopId, favId, uid)
.then(json => {
let param = {
SHOP_ID: brandStore.shopId,
COL_TYPE: 1,
TEMPLATE_TYPE:brandStore.info.shop_template_type,
IS_RED: 0,
}
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_BRAND_SHOP_COLLECT_C', param);
})
.catch(error => {
dispatch(addFavoriteFailure(error));
... ... @@ -1084,6 +1091,13 @@ export function cancelFavorite() {
.then(uid => {
return new BrandStoreService(app.host).cancelFavorite(shopId, shopId, uid)
.then(json => {
let param = {
SHOP_ID: brandStore.shopId,
COL_TYPE: 2,
TEMPLATE_TYPE:brandStore.info.shop_template_type,
IS_RED: 0,
}
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_BRAND_SHOP_COLLECT_C', param);
})
.catch(error => {
dispatch(cancelFavoriteFailure(error));
... ...
... ... @@ -37,7 +37,7 @@ export default class GoodsGroupList extends React.Component {
_onPressProductRecommend(data, rowID) {
let {resource} = this.props;
let moduleOrder = resource.get('module_order') + 1;
let moduleOrder = parseInt(resource.get('module_order')) + 1;
let moduleType = resource.get('module_type');
this.props.onPressProductRecommend && this.props.onPressProductRecommend(data, rowID,moduleOrder,moduleType)
}
... ...
... ... @@ -112,31 +112,11 @@ class RedPersonBrandContainer extends Component {
_onPressCollection(isCollected) {
let param = {
SHOP_ID: this.props.redBrand.shopId,
COL_TYPE: 1,
}
if (!isCollected) {
this.props.actions.addFavorite();
param = {
SHOP_ID: this.props.redBrand.shopId,
COL_TYPE: 1,
TEMPLATE_TYPE:this.props.redBrand.shopIntro.shop_template_type,
IS_RED: 1,
}
} else {
this.props.actions.cancelFavorite();
param = {
SHOP_ID: this.props.redBrand.shopId,
COL_TYPE: 2,
TEMPLATE_TYPE:this.props.redBrand.shopIntro.shop_template_type,
IS_RED: 1,
}
}
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_BRAND_SHOP_COLLECT_C', param);
}
_onPressLaunchProfile(value){
... ... @@ -182,7 +162,7 @@ class RedPersonBrandContainer extends Component {
SHOP_ID: this.props.redBrand.shopId,
FLR_INDEX: moduleOrder,
FLR_NAME: moduleType,
I_INDEX: rowId + 1,
I_INDEX: parseInt(rowId) + 1,
F_URL: url,
TEMPLATE_TYPE:this.props.redBrand.shopIntro.shop_template_type,
IS_RED: 1,
... ... @@ -210,7 +190,7 @@ class RedPersonBrandContainer extends Component {
SHOP_ID: this.props.redBrand.shopId,
TAB_ID: tabID,
TAB_NAME: tabName,
PRD_ID: productSkn,
PRD_SKN: productSkn,
TEMPLATE_TYPE: this.props.redBrand.shopIntro.shop_template_type,
IS_RED: 1,
SORT_TYPE: 1,
... ...
... ... @@ -583,7 +583,7 @@ export function getIntro() {
return new RedBrandService(app.host).getIntro(shopId)
.then(json => {
dispatch(getIntroSuccess(json));
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_BRAND_SHOP_L', {SHOP_ID: redBrand.shopId, TEMPLATE:json.shop_template_type, IS_RED: 1});
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_BRAND_SHOP_L', {SHOP_ID: redBrand.shopId, TEMPLATE_TYPE:json.shop_template_type, IS_RED: 1});
})
.catch(error => {
dispatch(getIntroFailure(error));
... ... @@ -1017,6 +1017,13 @@ export function addFavorite() {
dispatch(addFavoriteSuccess(true));
return new RedBrandService(app.host).addFavorite(shopId, favId, uid)
.then(json => {
let param = {
SHOP_ID: this.props.redBrand.shopId,
COL_TYPE: 1,
TEMPLATE_TYPE:this.props.redBrand.shopIntro.shop_template_type,
IS_RED: 1,
}
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_BRAND_SHOP_COLLECT_C', param);
})
.catch(error => {
dispatch(addFavoriteFailure(error));
... ... @@ -1050,6 +1057,13 @@ export function cancelFavorite() {
.then(uid => {
return new RedBrandService(app.host).cancelFavorite(shopId, shopId, uid)
.then(json => {
let param = {
SHOP_ID: this.props.redBrand.shopId,
COL_TYPE: 2,
TEMPLATE_TYPE:this.props.redBrand.shopIntro.shop_template_type,
IS_RED: 1,
}
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_BRAND_SHOP_COLLECT_C', param);
})
.catch(error => {
dispatch(cancelFavoriteFailure(error));
... ...