Authored by 孙凯

大数据曝光review by hongmo

... ... @@ -168,10 +168,10 @@ export default class BrandStore extends Component {
/>
);
} else if (sectionID == 'brandReource') {
let pageName = 'iFP_BrandStore';
let pageName = 'iFP_StoreBase';
if (Platform.OS === 'android') {
pageName = 'aFP_BrandStore';
pageName = 'aFP_StoreBase';
}
switch (rowID) {
... ...
... ... @@ -41,10 +41,11 @@ export default class BrandListCell extends React.Component {
if (yh_exposureData) {
yh_exposureData = {
I_INDEX: rowID,
ACTION_URL: rowData.url,
...yh_exposureData,
}
}
return (
<TouchableOpacity activeOpacity={0.5} yh_exposureData={yh_exposureData} onPress={() => {
this.props.onPressBrandItem && this.props.onPressBrandItem(rowData.url, rowID);
... ...
... ... @@ -70,6 +70,7 @@ export default class BrandSwiper extends React.Component {
if (yh_exposureData) {
yh_exposureData = {
I_INDEX: 1,
ACTION_URL: data[0].url,
...yh_exposureData,
}
}
... ... @@ -107,6 +108,7 @@ export default class BrandSwiper extends React.Component {
if (yh_exposureData) {
yh_exposureData = {
I_INDEX: i,
ACTION_URL: item.url,
...yh_exposureData,
}
}
... ...
... ... @@ -41,10 +41,12 @@ export default class OneRowTwoColImages extends React.Component {
if (yh_exposureData) {
yh_exposureData0 = {
I_INDEX: 0,
ACTION_URL: data[0].url,
...yh_exposureData,
};
yh_exposureData1 = {
I_INDEX: 1,
ACTION_URL: data[1].url,
...yh_exposureData,
};
}
... ...
... ... @@ -44,10 +44,10 @@ export default class Recommend extends React.Component {
if (yh_exposureData) {
yh_exposureData = {
I_INDEX: rowID,
ACTION_URL: rowData.get('url'),
...yh_exposureData,
};
}
return (
<TouchableOpacity yh_exposureData={yh_exposureData} activeOpacity={0.5} onPress={() => {
this.props.onPressRecommendItem && this.props.onPressRecommendItem(rowData.get('url'), rowID);
... ...
... ... @@ -880,10 +880,10 @@ function exposePruductListData(list,order,channel,index) {
tab_num = 2;
}
let pageName = 'iFP_BrandStore';
let pageName = 'iFP_StoreBase';
if (Platform.OS === 'android') {
pageName = 'aFP_BrandStore';
pageName = 'aFP_StoreBase';
}
let channelStr = 'boy';
if (channel == '1') {
... ...
... ... @@ -34,19 +34,6 @@ export default class DoubleImage extends React.Component {
if (!resource) {
return null;
}
let yh_exposureData = this.props.yh_exposureData?this.props.yh_exposureData:null;
let yh_exposureData0 = null;
let yh_exposureData1 = null;
if (yh_exposureData) {
yh_exposureData0 = {
I_INDEX: 0,
...yh_exposureData,
};
yh_exposureData1 = {
I_INDEX: 1,
...yh_exposureData,
}
}
let list = resource.get('module_data').get('data').toJS();
let properties = resource.get('module_data').get('properties').toJS();
... ... @@ -80,6 +67,32 @@ export default class DoubleImage extends React.Component {
let linkReource2 = data2.resource;
let moduleOrder = resource.get('module_order') + 1;
let moduleType = resource.get('module_type');
let url1 = '';
let url2 = '';
if (linkType1 == '0') {
url1 = `http://m.yohobuy.com?openby:yohobuy={"action":"go.poollist","params":{"productPool":"${linkReource1}"}}`;
} else if (linkType1 == '1') {
url1 = `http://m.yohobuy.com?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":"${linkReource1}"}}`;
} else if (linkType1 == '2') {
url1 = linkReource;
}
let yh_exposureData = this.props.yh_exposureData?this.props.yh_exposureData:null;
let yh_exposureData0 = null;
let yh_exposureData1 = null;
if (yh_exposureData) {
yh_exposureData0 = {
I_INDEX: 0,
ACTION_URL: url1,
...yh_exposureData,
};
yh_exposureData1 = {
I_INDEX: 1,
ACTION_URL: url2,
...yh_exposureData,
}
}
return(
<View style={{flexDirection: 'row',width: width,height: backgroundHeight,backgroundColor:'#f0f0f0'}}>
<TouchableOpacity yh_exposureData={yh_exposureData0} activeOpacity={1.0} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType1,linkReource1,moduleOrder,moduleType,1)}} >
... ...
... ... @@ -37,16 +37,25 @@ export default class Recommend extends React.Component {
}
renderRow(rowData, sectionID, rowID, highlightRow) {
let linkType = rowData.get('linkType');
let linkReource = rowData.get('resource');
let url = '';
if (linkType == '0') {
url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.poollist","params":{"productPool":"${linkReource}"}}`;
} else if (linkType == '1') {
url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":"${linkReource}"}}`;
} else if (linkType == '2') {
url = linkReource;
}
let yh_exposureData = this.props.yh_exposureData?this.props.yh_exposureData:null;
if (yh_exposureData) {
yh_exposureData = {
I_INDEX: rowID,
I_INDEX: 0,
ACTION_URL: url,
...yh_exposureData,
};
}
let rowContainerHeight = itemWidth;
let {resource} = this.props;
let list = resource.get('module_data').get('data').toArray();
... ...
... ... @@ -116,9 +116,9 @@ export default class RedBrand extends Component {
renderRow(rowData, sectionID, rowID, highlightRow) {
let pageName = 'iFP_BrandStore';
let pageName = 'iFP_RedPersonBrand';
if (Platform.OS === 'android') {
pageName = 'aFP_BrandStore';
pageName = 'aFP_RedPersonBrand';
}
if (sectionID == 'ShopBanner') {
... ...
... ... @@ -71,11 +71,23 @@ export default class RedBrandSwiper extends React.Component {
let backgroundHeight =isModuleMargin=='1'?(swiperHeight+10):swiperHeight;
if (data.length == 1) {
let linkType = data[0].linkType;
let linkReource = data[0].resource;
let url = '';
if (linkType == '0') {
url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.poollist","params":{"productPool":"${linkReource}"}}`;
} else if (linkType == '1') {
url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":"${linkReource}"}}`;
} else if (linkType == '2') {
url = linkReource;
}
if (yh_exposureData) {
yh_exposureData = {
I_INDEX: 1,
I_INDEX: 0,
ACTION_URL: url,
...yh_exposureData,
}
};
}
return (
<TouchableOpacity
... ... @@ -108,12 +120,24 @@ export default class RedBrandSwiper extends React.Component {
height={swiperHeight}
>
{data.map((item, i) => {
let linkType = item.linkType;
let linkReource = item.resource;
let url = '';
if (linkType == '0') {
url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.poollist","params":{"productPool":"${linkReource}"}}`;
} else if (linkType == '1') {
url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":"${linkReource}"}}`;
} else if (linkType == '2') {
url = linkReource;
}
if (yh_exposureData) {
yh_exposureData = {
I_INDEX: parseInt(i)+1+'',
ACTION_URL: url,
...yh_exposureData,
}
};
}
return (
<TouchableOpacity
yh_exposureData={yh_exposureData}
... ...
... ... @@ -34,13 +34,6 @@ export default class SingleImage extends React.Component {
if (!resource) {
return null;
}
let yh_exposureData = this.props.yh_exposureData?this.props.yh_exposureData:null;
if (yh_exposureData) {
yh_exposureData = {
I_INDEX: 0,
...yh_exposureData,
}
}
let list = resource.get('module_data').get('data').toJS();
let data = list?list[0]:null;
... ... @@ -65,6 +58,23 @@ export default class SingleImage extends React.Component {
let linkReource = data.resource;
let moduleOrder = resource.get('module_order') + 1;
let moduleType = resource.get('module_type');
let yh_exposureData = this.props.yh_exposureData?this.props.yh_exposureData:null;
let url = '';
if (linkType == '0') {
url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.poollist","params":{"productPool":"${linkReource}"}}`;
} else if (linkType == '1') {
url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":"${linkReource}"}}`;
} else if (linkType == '2') {
url = linkReource;
}
if (yh_exposureData) {
yh_exposureData = {
I_INDEX: 0,
ACTION_URL: url,
...yh_exposureData,
};
}
return (
<TouchableOpacity yh_exposureData={yh_exposureData} activeOpacity={1.0} style={{width: backgroundWidth, height:backgroundHeight,backgroundColor:'#f0f0f0'}} onPress={() => {
this.props.onPressProduct && this.props.onPressProduct(linkType,linkReource,moduleOrder,moduleType,1);
... ...
... ... @@ -57,12 +57,22 @@ export default class Title extends React.Component {
let properties = resource.get('module_data').get('properties').toJS();
let isModuleMargin = properties.isModuleMargin;
let url = '';
if (linkType == '0') {
url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.poollist","params":{"productPool":"${linkReource}"}}`;
} else if (linkType == '1') {
url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":"${linkReource}"}}`;
} else if (linkType == '2') {
url = linkReource;
}
if (yh_exposureData) {
yh_exposureData = {
I_INDEX: 0,
ACTION_URL: url,
...yh_exposureData,
}
};
}
return(
<View style={[styles.container,{height: isModuleMargin=='1'?40+10:40,backgroundColor: '#f0f0f0'}]}>
<View style={{width: width,height: 0.5,backgroundColor: '#e5e5e5'}}/>
... ...
... ... @@ -23,25 +23,6 @@ export default class RedPersonPicThree extends Component{
return null;
}
let yh_exposureData = this.props.yh_exposureData?this.props.yh_exposureData:null;
let yh_exposureData0 = null;
let yh_exposureData1 = null;
let yh_exposureData2 = null;
if (yh_exposureData) {
yh_exposureData0 = {
I_INDEX: 0,
...yh_exposureData,
};
yh_exposureData1 = {
I_INDEX: 1,
...yh_exposureData,
};
yh_exposureData2 = {
I_INDEX: 2,
...yh_exposureData,
}
}
let list = resource.get('module_data').get('data').toJS();
let properties = resource.get('module_data').get('properties').toJS();
let isModuleMargin = properties.isModuleMargin;
... ... @@ -88,6 +69,60 @@ export default class RedPersonPicThree extends Component{
let moduleOrder = resource.get('module_order') + 1;
let moduleType = resource.get('module_type');
let yh_exposureData = this.props.yh_exposureData?this.props.yh_exposureData:null;
let yh_exposureData0 = null;
let yh_exposureData1 = null;
let yh_exposureData2 = null;
let url1 = '';
if (linkType1 == '0') {
url1 = `http://m.yohobuy.com?openby:yohobuy={"action":"go.poollist","params":{"productPool":"${linkReource1}"}}`;
} else if (linkType1 == '1') {
url1 = `http://m.yohobuy.com?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":"${linkReource1}"}}`;
} else if (linkType1 == '2') {
url1 = linkReource1;
}
if (yh_exposureData) {
yh_exposureData0 = {
I_INDEX: 0,
ACTION_URL: url1,
...yh_exposureData,
};
}
let url2 = '';
if (linkType2 == '0') {
url2 = `http://m.yohobuy.com?openby:yohobuy={"action":"go.poollist","params":{"productPool":"${linkReource2}"}}`;
} else if (linkType2 == '1') {
url2 = `http://m.yohobuy.com?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":"${linkReource2}"}}`;
} else if (linkType2 == '2') {
url2 = linkReource2;
}
if (yh_exposureData) {
yh_exposureData1 = {
I_INDEX: 1,
ACTION_URL: url2,
...yh_exposureData,
};
}
let url3 = '';
if (linkType3 == '0') {
url3 = `http://m.yohobuy.com?openby:yohobuy={"action":"go.poollist","params":{"productPool":"${linkReource3}"}}`;
} else if (linkType3 == '1') {
url3 = `http://m.yohobuy.com?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":"${linkReource3}"}}`;
} else if (linkType3 == '2') {
url3 = linkReource3;
}
if (yh_exposureData) {
yh_exposureData2 = {
I_INDEX: 2,
ACTION_URL: url3,
...yh_exposureData,
};
}
switch (displayType) {
case '1':
return (
... ...
... ... @@ -56,9 +56,18 @@ export default class Video extends React.Component {
}
}
let yh_exposureData = this.props.yh_exposureData?this.props.yh_exposureData:null;
let url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.videolive", "params":{"room":"${room}","bgpic":"${bgpic}"}}`;
if (yh_exposureData) {
yh_exposureData = {
I_INDEX: 0,
ACTION_URL: url,
...yh_exposureData,
};
}
return(
<View style={{width: backgroundWidth,height:heigthW,backgroundColor: 'white'}}>
<TouchableOpacity activeOpacity={0.5}
<TouchableOpacity yh_exposureData={yh_exposureData} activeOpacity={0.5}
style={styles.thumbnail}
onPress={() => {
this.props.onPressVideo && this.props.onPressVideo(room,bgpic);
... ...
... ... @@ -331,10 +331,10 @@ function exposePruductListData(list,order,channel,index) {
tab_num = 2;
}
let pageName = 'iFP_RedBrand';
let pageName = 'iFP_RedPersonBrand';
if (Platform.OS === 'android') {
pageName = 'aFP_RedBrand';
pageName = 'aFP_RedPersonBrand';
}
let l2_TAB_NAM = '首页';
... ... @@ -781,10 +781,10 @@ export function appRecommendProduct(dataSource) {
let product_list = json.product_list;
for (var i = 0; i < product_list.length; i++) {
let items = product_list[i];
let pageName = 'iFP_RedBrand';
let pageName = 'iFP_RedPersonBrand';
if (Platform.OS === 'android') {
pageName = 'aFP_RedBrand';
pageName = 'aFP_RedPersonBrand';
}
let params = {
P_NAME : pageName,
... ... @@ -812,10 +812,10 @@ export function appRecommendProduct(dataSource) {
let product_list = json.product_list;
for (var i = 0; i < product_list.length; i++) {
let items = product_list[i];
let pageName = 'iFP_RedBrand';
let pageName = 'iFP_RedPersonBrand';
if (Platform.OS === 'android') {
pageName = 'aFP_RedBrand';
pageName = 'aFP_RedPersonBrand';
}
let params = {
P_NAME : pageName,
... ...