增加楼层数据曝光。review by sunkai。
Showing
4 changed files
with
47 additions
and
10 deletions
@@ -64,7 +64,7 @@ export default class ActivityProductFloor extends Component { | @@ -64,7 +64,7 @@ export default class ActivityProductFloor extends Component { | ||
64 | let imgUrl = SlicedImage.getSlicedUrl(rowData.get('default_images'),cellWidth,120,2); | 64 | let imgUrl = SlicedImage.getSlicedUrl(rowData.get('default_images'),cellWidth,120,2); |
65 | return ( | 65 | return ( |
66 | <TouchableOpacity | 66 | <TouchableOpacity |
67 | - activeOpacity={1} | 67 | + activeOpacity={1} yh_exposureData={rowData.get('yh_exposureData')} |
68 | onPress={()=>{ | 68 | onPress={()=>{ |
69 | this.props.onPressVipProduct && this.props.onPressVipProduct(rowData, imgUrl, index+rowID) | 69 | this.props.onPressVipProduct && this.props.onPressVipProduct(rowData, imgUrl, index+rowID) |
70 | }} | 70 | }} |
@@ -101,7 +101,8 @@ export default class ActivityProductFloor extends Component { | @@ -101,7 +101,8 @@ export default class ActivityProductFloor extends Component { | ||
101 | let floorH = cellH + 40 + bannerHeight; | 101 | let floorH = cellH + 40 + bannerHeight; |
102 | return ( | 102 | return ( |
103 | <View style={{backgroundColor: 'white',width:width,height:floorH}}> | 103 | <View style={{backgroundColor: 'white',width:width,height:floorH}}> |
104 | - <HeadTitleCell title={title} moreUrl={moreUrl} onPressTitleMore={this.props.onPressTitleMore}/> | 104 | + <HeadTitleCell title={title} moreUrl={moreUrl} |
105 | + onPressTitleMore={this.props.onPressTitleMore} yh_exposureData={data.get('title').get('yh_exposureData')}/> | ||
105 | <ImageSlider | 106 | <ImageSlider |
106 | resource={bannerData} | 107 | resource={bannerData} |
107 | sliderWidth={width} | 108 | sliderWidth={width} |
@@ -38,7 +38,8 @@ export default class HotCategoryIndividualization extends Component { | @@ -38,7 +38,8 @@ export default class HotCategoryIndividualization extends Component { | ||
38 | let containerHeight = listHeight + 40; | 38 | let containerHeight = listHeight + 40; |
39 | return ( | 39 | return ( |
40 | <View style={[styles.container, {height: containerHeight}]}> | 40 | <View style={[styles.container, {height: containerHeight}]}> |
41 | - <HeadTitleCell title={title.get('title')} moreUrl={title.get('more_url')} onPressTitleMore={this.props.onPressTitleMore}/> | 41 | + <HeadTitleCell title={title.get('title')} moreUrl={title.get('more_url')} |
42 | + onPressTitleMore={this.props.onPressTitleMore} yh_exposureData={title.get('yh_exposureData')}/> | ||
42 | <View style={[styles.list, {height: listHeight}]}> | 43 | <View style={[styles.list, {height: listHeight}]}> |
43 | {data.map((item, i) => { | 44 | {data.map((item, i) => { |
44 | let url = YH_Image.getSlicedUrl(item.get('src'), imageWidth, imageHeight, 2); | 45 | let url = YH_Image.getSlicedUrl(item.get('src'), imageWidth, imageHeight, 2); |
@@ -47,6 +48,7 @@ export default class HotCategoryIndividualization extends Component { | @@ -47,6 +48,7 @@ export default class HotCategoryIndividualization extends Component { | ||
47 | key={i} | 48 | key={i} |
48 | style={styles.cellContainer} | 49 | style={styles.cellContainer} |
49 | activeOpacity={1} | 50 | activeOpacity={1} |
51 | + yh_exposureData={item.get('yh_exposureData')} | ||
50 | onPress={() => { | 52 | onPress={() => { |
51 | this.props.onPressVipBannerItem && this.props.onPressVipBannerItem(item.get('url'), url, i + 1); | 53 | this.props.onPressVipBannerItem && this.props.onPressVipBannerItem(item.get('url'), url, i + 1); |
52 | }}> | 54 | }}> |
@@ -45,7 +45,7 @@ export default class VipUserFloor extends Component { | @@ -45,7 +45,7 @@ export default class VipUserFloor extends Component { | ||
45 | let productSkn = rowData.get('product_skn'); | 45 | let productSkn = rowData.get('product_skn'); |
46 | let imgUrl = SlicedImage.getSlicedUrl(rowData.get('default_images'),cellWidth,120,2); | 46 | let imgUrl = SlicedImage.getSlicedUrl(rowData.get('default_images'),cellWidth,120,2); |
47 | return ( | 47 | return ( |
48 | - <TouchableOpacity style={styles.row} | 48 | + <TouchableOpacity style={styles.row} yh_exposureData={rowData.get('yh_exposureData')} |
49 | onPress={()=>this.props.onPressVipProduct && this.props.onPressVipProduct(rowData, imgUrl, index + rowID)}> | 49 | onPress={()=>this.props.onPressVipProduct && this.props.onPressVipProduct(rowData, imgUrl, index + rowID)}> |
50 | <YH_Image style={styles.image} | 50 | <YH_Image style={styles.image} |
51 | url={imgUrl} | 51 | url={imgUrl} |
@@ -69,7 +69,8 @@ export default class VipUserFloor extends Component { | @@ -69,7 +69,8 @@ export default class VipUserFloor extends Component { | ||
69 | let productData = data.get('list'); | 69 | let productData = data.get('list'); |
70 | return ( | 70 | return ( |
71 | <View style={styles.container}> | 71 | <View style={styles.container}> |
72 | - <HeadTitleCell title={title} moreUrl={moreUrl}/> | 72 | + <HeadTitleCell title={title} moreUrl={moreUrl} |
73 | + onPressTitleMore={this.props.onPressTitleMore} yh_exposureData={data.get('title').get('yh_exposureData')}/> | ||
73 | <ImageSlider | 74 | <ImageSlider |
74 | resource={bannerData} | 75 | resource={bannerData} |
75 | sliderWidth={width} | 76 | sliderWidth={width} |
@@ -1119,19 +1119,52 @@ function homeFloorAutoReportData(list,channel) { | @@ -1119,19 +1119,52 @@ function homeFloorAutoReportData(list,channel) { | ||
1119 | } | 1119 | } |
1120 | break; | 1120 | break; |
1121 | } | 1121 | } |
1122 | - case 'vipUse': { | 1122 | + case 'vipUse': |
1123 | + case 'activityProductFloor': | ||
1124 | + case 'new_user_floor': { | ||
1125 | + //more添加曝光数据 | ||
1126 | + let title = floorData.title ? floorData.title : {}; | ||
1127 | + let titleParam = autoReportData(channlStr,floorName,floorID,floorIndex,"0",title.more_url); | ||
1128 | + title.yh_exposureData = titleParam; | ||
1123 | 1129 | ||
1124 | - break; | 1130 | + //banner添加曝光数据 |
1131 | + let banner = floorData.banner_image ? floorData.banner_image : []; | ||
1132 | + let bannerLength = banner.length ? banner.length : 0; | ||
1133 | + for (var j = 0; j < bannerLength; j++) { | ||
1134 | + let bannerItem = banner[j]; | ||
1135 | + let inFloorIndex = parseInt(j) + 1 + ''; | ||
1136 | + let actionUrl = bannerItem.url; | ||
1137 | + let param = autoReportData(channlStr,floorName,floorID,floorIndex,inFloorIndex,actionUrl); | ||
1138 | + bannerItem.yh_exposureData = param; | ||
1125 | } | 1139 | } |
1126 | - case 'activityProductFloor': { | ||
1127 | 1140 | ||
1141 | + //list添加曝光数据 | ||
1142 | + let itemList = floorData.list ? floorData.list : []; | ||
1143 | + for (var j = 0; j < itemList.length; j++) { | ||
1144 | + let imageItem = itemList[j]; | ||
1145 | + let inFloorIndex = parseInt(j) + 1 + bannerLength + ''; | ||
1146 | + let skn = imageItem.product_skn; | ||
1147 | + let param = autoReportData(channlStr,floorName,floorID,floorIndex,inFloorIndex,"",skn); | ||
1148 | + imageItem.yh_exposureData = param; | ||
1149 | + } | ||
1128 | break; | 1150 | break; |
1129 | } | 1151 | } |
1130 | case 'hot_category_individualization': { | 1152 | case 'hot_category_individualization': { |
1153 | + //more添加曝光数据 | ||
1154 | + let title = floorData.title ? floorData.title : {}; | ||
1155 | + let moreUrl = title.more_url ? title.more_url : ""; | ||
1156 | + let titleParam = autoReportData(channlStr,floorName,floorID,floorIndex,"0",moreUrl); | ||
1157 | + title.yh_exposureData = titleParam ? titleParam : ""; | ||
1131 | 1158 | ||
1132 | - break; | 1159 | + //list添加曝光数据 |
1160 | + let itemList = floorData.list ? floorData.list : []; | ||
1161 | + for (let j = 0; j < itemList.length; j++) { | ||
1162 | + let imageItem = itemList[j]; | ||
1163 | + let inFloorIndex = parseInt(j) + 1 + ''; | ||
1164 | + let actionUrl = imageItem.url; | ||
1165 | + let param = autoReportData(channlStr,floorName,floorID,floorIndex,inFloorIndex,actionUrl); | ||
1166 | + imageItem.yh_exposureData = param; | ||
1133 | } | 1167 | } |
1134 | - case 'new_user_floor': { | ||
1135 | break; | 1168 | break; |
1136 | } | 1169 | } |
1137 | } | 1170 | } |
-
Please register or login to post a comment