Authored by hongyong.zhao

埋点修改

... ... @@ -26,8 +26,10 @@ export default class RecommendCell extends Component {
}
_renderRow(rowData, sectionID, rowID) {
let yh_exposureData = rowData && rowData.get('yh_exposureData') ? rowData.get('yh_exposureData').toJS() : {}
return (
<BrandCell index={rowID} data={rowData} onPressShop={this.props.onPressShop}/>
<BrandCell yh_exposureData={yh_exposureData} index={rowID} data={rowData} onPressShop={this.props.onPressShop}/>
)
}
... ... @@ -40,6 +42,7 @@ export default class RecommendCell extends Component {
<Text style={styles.headerText}>推荐品牌</Text>
</View>
<ListView
yh_viewVisible = {true}
initialListSize={100}
contentContainerStyle={styles.contentContainer}
dataSource={this.dataSource.cloneWithRows(data.toArray())}
... ...
... ... @@ -95,7 +95,7 @@ class NewArrivalContainer extends Component {
let data = item.data[0];
let tabName = data.tab_name;
let queryList = data.query;
data && self.props.actions.storeCurrentTabValue(0,tabName,queryList);
data && self.props.actions.storeCurrentTabValue(0,tabName,queryList, item.template_id);
}
})
});
... ... @@ -266,7 +266,7 @@ class NewArrivalContainer extends Component {
paramsDic = res;
})
InteractionManager.runAfterInteractions(() => {
this.props.actions.getProductList(paramsDic);
this.props.actions.getProductList(paramsDic, this.state.tabFloorId);
});
}
... ... @@ -338,21 +338,24 @@ class NewArrivalContainer extends Component {
return;
}
let { selectedTabIndex, selectedTabName } = this.props.newArrival;
let { contentCode } = this.props.app;
let yh_exposeData = product && product.get('yh_exposureData') ? product.get('yh_exposureData').toJS(): {
F_ID: this.state.tabFloorId,
F_URL: url,
PRD_SKN: productSkn,
TAB_ID: selectedTabIndex,
TAB_NAME: selectedTabName,
CODE: contentCode,}
let url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":"${productSkn}","from_page_name":"${Platform.OS === 'ios'?'iFP_NewArrival':'aFP_NewArrival'}"}}`;
ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
let param = {
F_ID: this.state.tabFloorId,
F_URL: url,
PRD_SKN: productSkn,
TAB_ID: selectedTabIndex,
TAB_NAME: selectedTabName,
CODE: contentCode,
}
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_NEW_ARRIVAL_FLR_C', param);
ReactNative.NativeModules.YH_CommonHelper.logEvent('YB_NEW_ARRIVAL_FLR_C', yh_exposeData);
}
... ...
... ... @@ -296,7 +296,7 @@ export function getProductList(paramsDic, template_id) {
return new NewArrivalService(app.host).fetchProductList(channel, order, page, pageSize, allFilterFactors, paramsDic)
.then(json => {
let payload = exposeProductListData(json, order, channel, pageSize, tabId, tabName, prdFloorId, prdFloorName, prdFloorIndex, template_id);
let payload = exposeProductListData(json, order, channel, pageSize, tabId, tabName, prdFloorId, prdFloorName, prdFloorIndex, app.contentCode);
payload.endReached = payload.currentPage == payload.pageCount;
if (payload.currentPage > 1) {
... ... @@ -330,7 +330,7 @@ function reShuffleJumpList(jumplist, pageindex, pagesize) {
}
}
function exposeProductListData(json, order, channel, pageSize, tabId, tabName, prdFloorId, prdFloorName, prdFloorIndex, template_id) {
function exposeProductListData(json, order, channel, pageSize, tabId, tabName, prdFloorId, prdFloorName, prdFloorIndex, contentcode) {
let res = json;
try {
let list = json ? json.product_list : [];
... ... @@ -358,12 +358,13 @@ function exposeProductListData(json, order, channel, pageSize, tabId, tabName, p
PRD_CHANNEL: prdChannel,
RECALL_TYPE: recallType,
PRD_TYPE: prdType,
CODE: template_id ? template_id: '',
CODE: contentcode,
F_NAME: prdFloorName,
F_INDEX: prdFloorIndex,
F_ID:prdFloorId,
exposureEnd: 1,
};
}
res.product_list = list;
res.search_resource_list = json.search_resource_list.length> 0 ? json.search_resource_list : []
... ...