Authored by 于良

更新品牌埋点 review by 草莓

... ... @@ -104,12 +104,23 @@ class BrandContainer extends Component {
}
let brandId = data.shop_id ? data.shop_id : '';
// 0-girl 1-boy 2-child 3-lifestyle
let gender = 0;
if (this.props.brand.selectedChannelId == 1) {
gender = 1;
} else if (this.props.brand.selectedChannelId == 2) {
gender = 0;
} else if (this.props.brand.selectedChannelId == 3) {
gender = 2;
} else if (this.props.brand.selectedChannelId == 4) {
gender = 3;
}
if (!brandId) {
brandId = data.id ? data.id : '';
}
params = {
BR_ID: brandId,
GDER: this.props.brand.selectedChannelId + '',
GDER: gender + '',
};
// console.log(eventName)
// console.log(params)
... ... @@ -120,10 +131,22 @@ class BrandContainer extends Component {
_onPressSlideItem(url, index=0) {
ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
// 0-girl 1-boy 2-child 3-lifestyle
let gender = 0;
if (this.props.brand.selectedChannelId == 1) {
gender = 1;
} else if (this.props.brand.selectedChannelId == 2) {
gender = 0;
} else if (this.props.brand.selectedChannelId == 3) {
gender = 2;
} else if (this.props.brand.selectedChannelId == 4) {
gender = 3;
}
let params = {
BAN_NUM: parseInt(index) + 1 + '',
TOURL: url,
GDER: this.props.brand.selectedChannelId + '',
GDER: gender + '',
};
NativeModules.YH_CommonHelper.logEvent('YB_CATEGORY_BRAND_LIST_BAN', params);
... ... @@ -134,12 +157,22 @@ class BrandContainer extends Component {
ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
let brandId = brandId = data.id ? data.id : '';
// 0-girl 1-boy 2-child 3-lifestyle
let gender = 0;
if (this.props.brand.selectedChannelId == 1) {
gender = 1;
} else if (this.props.brand.selectedChannelId == 2) {
gender = 0;
} else if (this.props.brand.selectedChannelId == 3) {
gender = 2;
} else if (this.props.brand.selectedChannelId == 4) {
gender = 3;
}
let params = {
BAN_NUM: parseInt(index) + 1 + '',
BR_ID: brandId,
GDER: this.props.brand.selectedChannelId + '',
GDER: gender + '',
};
NativeModules.YH_CommonHelper.logEvent('YB_CATEGORY_BRAND_LIST_BR', params);
}
... ...