Authored by 于良

品类、品牌初始化选中频道 review by shixiang

... ... @@ -56,24 +56,8 @@ export default function native(platform) {
_renderContainer() {
if (this.props.type == 0) {
if(this.props.channelId=='1'){
store.dispatch(setCurrentChannelId('boy'));
}else if(this.props.channelId=='2'){
store.dispatch(setCurrentChannelId('girl'));
}else if(this.props.channelId=='3'){
store.dispatch(setCurrentChannelId('kids'));
}else if(this.props.channelId=='4'){
store.dispatch(setCurrentChannelId('lifestyle'));
}
return <CategoryContainer />;
} else if (this.props.type == 1) {
if(this.props.channelId){
store.dispatch(setBrandSelectedChannel(this.props.channelId));
}
return <BrandContainer />;
} else if (this.props.type == 2) {
return <InterestContainer />;
... ... @@ -87,6 +71,22 @@ export default function native(platform) {
store.dispatch(setHost(this.props.host));
store.dispatch(setServiceHost(this.props.serviceHost));
if (this.props.type == 0) {
if (this.props.channelId == '1') {
store.dispatch(setCurrentChannelId('boy'));
} else if (this.props.channelId == '2') {
store.dispatch(setCurrentChannelId('girl'));
} else if (this.props.channelId == '3') {
store.dispatch(setCurrentChannelId('kids'));
} else if (this.props.channelId == '4') {
store.dispatch(setCurrentChannelId('lifestyle'));
}
} else if (this.props.type == 1) {
if (this.props.channelId) {
store.dispatch(setBrandSelectedChannel(this.props.channelId));
}
}
return (
<Provider store={store}>
{this._renderContainer()}
... ...
... ... @@ -248,6 +248,7 @@ class BrandContainer extends Component {
// console.log('YB_BRAND_KEYWORD_SEARCH_C')
// console.log(params)
NativeModules.YH_CommonHelper.logEvent('YB_BRAND_KEYWORD_SEARCH_C', params);
NativeModules.YH_CommonHelper.logEvent('YB_CATEGORY_BRAND_LIST_SC', {});
}
_onPressSearchHistoryItem(keyword, androiddata, index, section){
... ...
... ... @@ -193,6 +193,7 @@ function parseInterestList(json) {
let total = json && json.total ? json.total : 0;
let list = json && json.list ? json.list : [];
let logList = [];
list.map((item) => {
let productList = [];
... ... @@ -330,8 +331,8 @@ function dataExposure(eventName, data) {
DATA: data,
};
console.log(eventName)
console.log(params)
// console.log(eventName)
// console.log(params)
ReactNative.NativeModules.YH_CommonHelper.logEvent(eventName, params);
};
... ...