Authored by 孙凯

修改 品牌 数据埋点 review by hongmo

... ... @@ -81,10 +81,22 @@ class BrandContainer extends Component {
this.props.actions.searchHistory();
this.props.actions.hotKeyword();
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 = {
CAT_NUM: parseInt(selectedChannelId) + '',
GENR: gender + '',
};
NativeModules.YH_CommonHelper.logEvent('YB_CATEGORY_BRAND_LIST_SG', params);
NativeModules.YH_CommonHelper.logEvent('YB_CATEGORY_BRAND_LIST_CH', params);
}
... ... @@ -103,7 +115,7 @@ class BrandContainer extends Component {
if (this.props.brand.brandFliter == 1 || this.props.brand.brandFliter == 2) {
eventName = 'YB_CATEGORY_BRAND_LIST_IMAGE';
} else {
eventName = 'YB_CATEGORY_BRAND_LIST_TEXT';
eventName = 'YB_CATEGORY_BRAND_LIST_TEXT';
}
if (fromSearch) {
... ... @@ -186,8 +198,20 @@ class BrandContainer extends Component {
_onPressFilter(value) {
this.props.actions.setBrandFilter(value);
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 = {
CAT_NUM: parseInt(value) + 1 + '',
GENR: gender + '',
};
NativeModules.YH_CommonHelper.logEvent('YB_CATEGORY_BRAND_LIST_SG', params);
... ... @@ -209,19 +233,24 @@ class BrandContainer extends Component {
reourceForLifeStyle,
} = this.props.brand;
let gender = 0;
let channelId = channel.id;
let brandListNeedRequest;
let reourceNeedRequest;
if (channelId == 1) {
gender = 1;
brandListNeedRequest = brandListForBoy.get('hasSuccess');
reourceNeedRequest = reourceForBoy.get('hasSuccess');
}else if (channelId == 2) {
gender = 0;
brandListNeedRequest = brandListForGirl.get('hasSuccess');
reourceNeedRequest = reourceForGirl.get('hasSuccess');
}else if (channelId == 3) {
gender = 2;
brandListNeedRequest = brandListForKid.get('hasSuccess');
reourceNeedRequest = reourceForKid.get('hasSuccess');
}else if (channelId == 4) {
gender = 3;
brandListNeedRequest = brandListForLifeStyle.get('hasSuccess');
reourceNeedRequest = reourceForLifeStyle.get('hasSuccess');
}
... ... @@ -237,8 +266,8 @@ class BrandContainer extends Component {
let params = {
CAT_NUM: channelId + '',
GENR: gender + '',
};
NativeModules.YH_CommonHelper.logEvent('YB_CATEGORY_BRAND_LIST_CH', params);
}
... ...