BLK品类品牌下方标签点击埋点;
review by ---陈林
Showing
5 changed files
with
34 additions
and
18 deletions
@@ -31,7 +31,7 @@ export default class BLKBrandCell extends React.Component { | @@ -31,7 +31,7 @@ export default class BLKBrandCell extends React.Component { | ||
31 | img = img.replace('{width}', cellWidth*2).replace('{height}', (cellWidth-10)*2).replace('{mode}',2); | 31 | img = img.replace('{width}', cellWidth*2).replace('{height}', (cellWidth-10)*2).replace('{mode}',2); |
32 | let brandName = rowData.get('brand_name'); | 32 | let brandName = rowData.get('brand_name'); |
33 | return ( | 33 | return ( |
34 | - <TouchableOpacity style={styles.cell} onPress={()=>{this.props.onPressBrandItem && this.props.onPressBrandItem(rowData.toJS(),false,rowID);}}> | 34 | + <TouchableOpacity style={styles.cell} onPress={()=>{this.props.onPressBrandItem && this.props.onPressBrandItem(rowData.toJS(),false,rowID,this.props.title);}}> |
35 | <Image style={styles.cellImg} source={{uri:img}} resizeMode={'contain'}/> | 35 | <Image style={styles.cellImg} source={{uri:img}} resizeMode={'contain'}/> |
36 | <Text style={styles.cellTitle}>{brandName}</Text> | 36 | <Text style={styles.cellTitle}>{brandName}</Text> |
37 | </TouchableOpacity> | 37 | </TouchableOpacity> |
@@ -79,7 +79,7 @@ class BrandContainer extends Component { | @@ -79,7 +79,7 @@ class BrandContainer extends Component { | ||
79 | } | 79 | } |
80 | 80 | ||
81 | //原生跳转 | 81 | //原生跳转 |
82 | - _onPressBrandItem(data, fromSearch=false,index){ | 82 | + _onPressBrandItem(data, fromSearch=false,index,capital){ |
83 | //blk品牌跳转需要:如果发现是店铺,全部跳基础店铺。----顺老板。 | 83 | //blk品牌跳转需要:如果发现是店铺,全部跳基础店铺。----顺老板。 |
84 | if (data&&data.type == '2') { | 84 | if (data&&data.type == '2') { |
85 | data.is_red_shop == '0'; | 85 | data.is_red_shop == '0'; |
@@ -121,11 +121,9 @@ class BrandContainer extends Component { | @@ -121,11 +121,9 @@ class BrandContainer extends Component { | ||
121 | GENDER: gender + '', | 121 | GENDER: gender + '', |
122 | FLR_ID:1003, | 122 | FLR_ID:1003, |
123 | I_INDEX:_index+'', | 123 | I_INDEX:_index+'', |
124 | + SORT_TYPE:capital, | ||
125 | + | ||
124 | }; | 126 | }; |
125 | - // 3.GENDER:男士/女士频道唯一id,后台如果有,则取后台,没有时,1-男士,2-女士; | ||
126 | - // 4.FLR_ID:楼层唯一id,从1001开始,依次递增; | ||
127 | - // 5.I_INDEX:内部顺序号,从1开始,依次递增; | ||
128 | - // 6.BRAND_ID:所点击的品牌id; | ||
129 | // console.log("点击了品牌第三楼层:"); | 127 | // console.log("点击了品牌第三楼层:"); |
130 | // console.log(params); | 128 | // console.log(params); |
131 | NativeModules.YH_CommonHelper.logEvent(eventName, params); | 129 | NativeModules.YH_CommonHelper.logEvent(eventName, params); |
@@ -326,6 +324,13 @@ class BrandContainer extends Component { | @@ -326,6 +324,13 @@ class BrandContainer extends Component { | ||
326 | reourceNeedRequest = reourceForLifeStyle.get('hasSuccess'); | 324 | reourceNeedRequest = reourceForLifeStyle.get('hasSuccess'); |
327 | } | 325 | } |
328 | 326 | ||
327 | + // let params = { | ||
328 | + // TAB_ID:"1", | ||
329 | + // GENDER:channelId+"", | ||
330 | + // }; | ||
331 | + // // console.log('点击品牌'); | ||
332 | + // // console.log(params); | ||
333 | + // NativeModules.YH_CommonHelper.logEvent('YB_STROLL_PLUSSTAR_CLASS_CHANNEL_C', params); | ||
329 | if (!brandListNeedRequest) { | 334 | if (!brandListNeedRequest) { |
330 | this.props.actions.getBrandList(channelId); | 335 | this.props.actions.getBrandList(channelId); |
331 | } | 336 | } |
@@ -335,12 +340,6 @@ class BrandContainer extends Component { | @@ -335,12 +340,6 @@ class BrandContainer extends Component { | ||
335 | this.props.actions.setInitialListSize(0); | 340 | this.props.actions.setInitialListSize(0); |
336 | this.props.actions.setBrandSelectedChannel(channelId); | 341 | this.props.actions.setBrandSelectedChannel(channelId); |
337 | 342 | ||
338 | - let params = { | ||
339 | - TAB_ID: 1, | ||
340 | - GENDER:channelId+"" | ||
341 | - }; | ||
342 | - console.log('点击品牌'+params.toString()); | ||
343 | - NativeModules.YH_CommonHelper.logEvent('YB_STROLL_PLUSSTAR_CLASS_CHANNEL_C', params); | ||
344 | } | 343 | } |
345 | 344 | ||
346 | _onPressSearch() { | 345 | _onPressSearch() { |
@@ -77,15 +77,14 @@ class CategoryContainer extends Component { | @@ -77,15 +77,14 @@ class CategoryContainer extends Component { | ||
77 | } | 77 | } |
78 | 78 | ||
79 | _onSelectChannel(channel) { | 79 | _onSelectChannel(channel) { |
80 | + // let params = { | ||
81 | + // TAB_ID:"2", | ||
82 | + // GENDER:channel.id+"", | ||
83 | + // }; | ||
84 | + // NativeModules.YH_CommonHelper.logEvent('YB_STROLL_PLUSSTAR_CLASS_CHANNEL_C', params); | ||
80 | this.props.actions.setCurrentCateId(0); | 85 | this.props.actions.setCurrentCateId(0); |
81 | this.props.actions.setCurrentChannelId(channel.value); | 86 | this.props.actions.setCurrentChannelId(channel.value); |
82 | 87 | ||
83 | - let params = { | ||
84 | - TAB_ID: 2, | ||
85 | - GENDER:channel.id | ||
86 | - }; | ||
87 | - console.log("点击品类:"+params.TAB_ID); | ||
88 | - NativeModules.YH_CommonHelper.logEvent('YB_STROLL_PLUSSTAR_CLASS_CHANNEL_C', params); | ||
89 | } | 88 | } |
90 | 89 | ||
91 | _pressLeftRow(value,rowID) { | 90 | _pressLeftRow(value,rowID) { |
@@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
2 | 2 | ||
3 | import ReactNative from 'react-native'; | 3 | import ReactNative from 'react-native'; |
4 | import {Platform} from 'react-native'; | 4 | import {Platform} from 'react-native'; |
5 | +import {NativeModules}from 'react-native'; | ||
5 | import BrandService from '../../services/BrandService'; | 6 | import BrandService from '../../services/BrandService'; |
6 | import {Record, List, Map} from 'immutable'; | 7 | import {Record, List, Map} from 'immutable'; |
7 | import Pinyin from '../../../common/utils/pinyin'; | 8 | import Pinyin from '../../../common/utils/pinyin'; |
@@ -71,6 +72,11 @@ export function setBrandFilter(filter) { | @@ -71,6 +72,11 @@ export function setBrandFilter(filter) { | ||
71 | } | 72 | } |
72 | 73 | ||
73 | export function setBrandSelectedChannel(channelId) { | 74 | export function setBrandSelectedChannel(channelId) { |
75 | + let params = { | ||
76 | + TAB_ID:"1", | ||
77 | + GENDER:channelId+"", | ||
78 | + }; | ||
79 | + NativeModules.YH_CommonHelper.logEvent('YB_STROLL_PLUSSTAR_CLASS_CHANNEL_C', params); | ||
74 | return { | 80 | return { |
75 | type: SET_BRAND_SELECTED_CHANNEL, | 81 | type: SET_BRAND_SELECTED_CHANNEL, |
76 | payload: channelId | 82 | payload: channelId |
1 | 'use strict'; | 1 | 'use strict'; |
2 | 2 | ||
3 | import ReactNative from 'react-native'; | 3 | import ReactNative from 'react-native'; |
4 | +import {NativeModules}from 'react-native'; | ||
4 | import CategoryService from '../../services/CategoryService'; | 5 | import CategoryService from '../../services/CategoryService'; |
5 | import Immutable, {Map} from 'immutable'; | 6 | import Immutable, {Map} from 'immutable'; |
6 | const { | 7 | const { |
@@ -196,6 +197,17 @@ export function setCurrentCateId(rowID){ | @@ -196,6 +197,17 @@ export function setCurrentCateId(rowID){ | ||
196 | } | 197 | } |
197 | 198 | ||
198 | export function setCurrentChannelId(channelID){ | 199 | export function setCurrentChannelId(channelID){ |
200 | + let channelId = 1; | ||
201 | + if(channelID == "boy"){ | ||
202 | + channelId = 1; | ||
203 | + }else if(channelID == "girl"){ | ||
204 | + channelId = 2; | ||
205 | + } | ||
206 | + let params = { | ||
207 | + TAB_ID:"2", | ||
208 | + GENDER:channelId+"", | ||
209 | + }; | ||
210 | + NativeModules.YH_CommonHelper.logEvent('YB_STROLL_PLUSSTAR_CLASS_CHANNEL_C', params); | ||
199 | return { | 211 | return { |
200 | type: SET_CURRENT_CHANNEL_ID, | 212 | type: SET_CURRENT_CHANNEL_ID, |
201 | payload: channelID | 213 | payload: channelID |
-
Please register or login to post a comment