Authored by zhuangjiajia

BLK品类品牌下方标签点击埋点;

review by ---陈林
... ... @@ -31,7 +31,7 @@ export default class BLKBrandCell extends React.Component {
img = img.replace('{width}', cellWidth*2).replace('{height}', (cellWidth-10)*2).replace('{mode}',2);
let brandName = rowData.get('brand_name');
return (
<TouchableOpacity style={styles.cell} onPress={()=>{this.props.onPressBrandItem && this.props.onPressBrandItem(rowData.toJS(),false,rowID);}}>
<TouchableOpacity style={styles.cell} onPress={()=>{this.props.onPressBrandItem && this.props.onPressBrandItem(rowData.toJS(),false,rowID,this.props.title);}}>
<Image style={styles.cellImg} source={{uri:img}} resizeMode={'contain'}/>
<Text style={styles.cellTitle}>{brandName}</Text>
</TouchableOpacity>
... ...
... ... @@ -79,7 +79,7 @@ class BrandContainer extends Component {
}
//原生跳转
_onPressBrandItem(data, fromSearch=false,index){
_onPressBrandItem(data, fromSearch=false,index,capital){
//blk品牌跳转需要:如果发现是店铺,全部跳基础店铺。----顺老板。
if (data&&data.type == '2') {
data.is_red_shop == '0';
... ... @@ -121,11 +121,9 @@ class BrandContainer extends Component {
GENDER: gender + '',
FLR_ID:1003,
I_INDEX:_index+'',
SORT_TYPE:capital,
};
// 3.GENDER:男士/女士频道唯一id,后台如果有,则取后台,没有时,1-男士,2-女士;
// 4.FLR_ID:楼层唯一id,从1001开始,依次递增;
// 5.I_INDEX:内部顺序号,从1开始,依次递增;
// 6.BRAND_ID:所点击的品牌id;
// console.log("点击了品牌第三楼层:");
// console.log(params);
NativeModules.YH_CommonHelper.logEvent(eventName, params);
... ... @@ -326,6 +324,13 @@ class BrandContainer extends Component {
reourceNeedRequest = reourceForLifeStyle.get('hasSuccess');
}
// let params = {
// TAB_ID:"1",
// GENDER:channelId+"",
// };
// // console.log('点击品牌');
// // console.log(params);
// NativeModules.YH_CommonHelper.logEvent('YB_STROLL_PLUSSTAR_CLASS_CHANNEL_C', params);
if (!brandListNeedRequest) {
this.props.actions.getBrandList(channelId);
}
... ... @@ -335,12 +340,6 @@ class BrandContainer extends Component {
this.props.actions.setInitialListSize(0);
this.props.actions.setBrandSelectedChannel(channelId);
let params = {
TAB_ID: 1,
GENDER:channelId+""
};
console.log('点击品牌'+params.toString());
NativeModules.YH_CommonHelper.logEvent('YB_STROLL_PLUSSTAR_CLASS_CHANNEL_C', params);
}
_onPressSearch() {
... ...
... ... @@ -77,15 +77,14 @@ class CategoryContainer extends Component {
}
_onSelectChannel(channel) {
// let params = {
// TAB_ID:"2",
// GENDER:channel.id+"",
// };
// NativeModules.YH_CommonHelper.logEvent('YB_STROLL_PLUSSTAR_CLASS_CHANNEL_C', params);
this.props.actions.setCurrentCateId(0);
this.props.actions.setCurrentChannelId(channel.value);
let params = {
TAB_ID: 2,
GENDER:channel.id
};
console.log("点击品类:"+params.TAB_ID);
NativeModules.YH_CommonHelper.logEvent('YB_STROLL_PLUSSTAR_CLASS_CHANNEL_C', params);
}
_pressLeftRow(value,rowID) {
... ...
... ... @@ -2,6 +2,7 @@
import ReactNative from 'react-native';
import {Platform} from 'react-native';
import {NativeModules}from 'react-native';
import BrandService from '../../services/BrandService';
import {Record, List, Map} from 'immutable';
import Pinyin from '../../../common/utils/pinyin';
... ... @@ -71,6 +72,11 @@ export function setBrandFilter(filter) {
}
export function setBrandSelectedChannel(channelId) {
let params = {
TAB_ID:"1",
GENDER:channelId+"",
};
NativeModules.YH_CommonHelper.logEvent('YB_STROLL_PLUSSTAR_CLASS_CHANNEL_C', params);
return {
type: SET_BRAND_SELECTED_CHANNEL,
payload: channelId
... ...
'use strict';
import ReactNative from 'react-native';
import {NativeModules}from 'react-native';
import CategoryService from '../../services/CategoryService';
import Immutable, {Map} from 'immutable';
const {
... ... @@ -196,6 +197,17 @@ export function setCurrentCateId(rowID){
}
export function setCurrentChannelId(channelID){
let channelId = 1;
if(channelID == "boy"){
channelId = 1;
}else if(channelID == "girl"){
channelId = 2;
}
let params = {
TAB_ID:"2",
GENDER:channelId+"",
};
NativeModules.YH_CommonHelper.logEvent('YB_STROLL_PLUSSTAR_CLASS_CHANNEL_C', params);
return {
type: SET_CURRENT_CHANNEL_ID,
payload: channelID
... ...