Authored by 张丽霞

店铺和红人店铺埋点,review by redding

... ... @@ -89,8 +89,6 @@ class BrandStoreContainer extends Component {
this.props.actions.getShopResources();
this.props.actions.getFavoriteState();
// this.props.actions.setShowSimilarGuider(true);
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_BRAND_SHOP_L', {SHOP_ID: this.props.brandStore.shopId, BRAND_ID: this.props.brandStore.resource.brandBrowse.brandId});
}
componentWillUnmount() {
... ... @@ -120,17 +118,19 @@ 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,
}
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();
... ... @@ -138,9 +138,10 @@ class BrandStoreContainer extends Component {
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);
}
... ... @@ -325,6 +326,8 @@ class BrandStoreContainer extends Component {
BRAND_ID: this.props.brandStore.resource.brandBrowse.brandId,
TAB_ID: value,
TAB_NAME: name,
TEMPLATE_TYPE: this.props.brandStore.info.shop_template_type,
IS_RED: 0,
}
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_BRAND_SHOP_TAB_C', param);
this.props.actions.setSimilarIndex(-1);
... ...
... ... @@ -225,6 +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});
})
.catch(error => {
dispatch(shopInfoFailure(error));
... ...
... ... @@ -93,11 +93,31 @@ 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){
... ... @@ -106,6 +126,20 @@ class RedPersonBrandContainer extends Component {
_onPressStoreFilter(value) {
this.props.actions.setFilter(value);
let name = '首页';
if (value == 1) {
name = '新品';
}else if (value == 2) {
name = '全部商品';
}
let param = {
SHOP_ID: this.props.redBrand.shopId,
TAB_ID: value,
TAB_NAME: name,
TEMPLATE_TYPE: this.props.redBrand.shopIntro.shop_template_type,
IS_RED: 1,
}
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_BRAND_SHOP_TAB_C', param);
}
_onPressLink(url) {
... ...
... ... @@ -583,6 +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});
})
.catch(error => {
dispatch(getIntroFailure(error));
... ...