Authored by 孙凯

add 红人店铺 大数据上报 review by zhanglixia

... ... @@ -34,6 +34,20 @@ 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();
let isModuleMargin = properties.isModuleMargin;
... ... @@ -68,7 +82,7 @@ export default class DoubleImage extends React.Component {
let moduleType = resource.get('module_type');
return(
<View style={{flexDirection: 'row',width: width,height: backgroundHeight,backgroundColor:'#f0f0f0'}}>
<TouchableOpacity activeOpacity={1.0} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType1,linkReource1,moduleOrder,moduleType,1)}} >
<TouchableOpacity yh_exposureData={yh_exposureData0} activeOpacity={1.0} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType1,linkReource1,moduleOrder,moduleType,1)}} >
<YH_Image
url={backgroundImage1}
style={styles.thumbnail}
... ... @@ -82,7 +96,7 @@ export default class DoubleImage extends React.Component {
</View>:null}
</TouchableOpacity>
<TouchableOpacity activeOpacity={1.0} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType2,linkReource2,moduleOrder,moduleType,2)}} >
<TouchableOpacity yh_exposureData={yh_exposureData1} activeOpacity={1.0} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType2,linkReource2,moduleOrder,moduleType,2)}} >
<YH_Image
url={backgroundImage2}
style={styles.thumbnail}
... ...
... ... @@ -37,6 +37,16 @@ export default class Recommend extends React.Component {
}
renderRow(rowData, sectionID, rowID, highlightRow) {
let yh_exposureData = this.props.yh_exposureData?this.props.yh_exposureData:null;
if (yh_exposureData) {
yh_exposureData = {
I_INDEX: rowID,
...yh_exposureData,
};
}
let rowContainerHeight = itemWidth;
let {resource} = this.props;
let list = resource.get('module_data').get('data').toArray();
... ... @@ -54,7 +64,7 @@ export default class Recommend extends React.Component {
showTitle = true;
}
return (
<TouchableOpacity activeOpacity={1.0} onPress={() => {
<TouchableOpacity yh_exposureData={yh_exposureData} activeOpacity={1.0} onPress={() => {
this.props.onPressProduct && this.props.onPressProduct(rowData.get('linkType'), rowData.get('resource'),moduleOrder,moduleType,rowID+1);
}}>
<View style={[styles.rowContainer, bottomStyle,{height: rowContainerHeight}]}>
... ...
... ... @@ -115,29 +115,43 @@ export default class RedBrand extends Component {
}
renderRow(rowData, sectionID, rowID, highlightRow) {
let pageName = 'iFP_BrandStore';
if (Platform.OS === 'android') {
pageName = 'aFP_BrandStore';
}
if (sectionID == 'ShopBanner') {
let {launchProfile, shopsdecorator} = this.props;
let resList = shopsdecorator.modules?shopsdecorator.modules.toArray():[];
return(<Header resource={rowData} launchProfile={launchProfile} onPressLaunchProfile={this._onPressLaunchProfile} onPressCollection={this.props.onPressCollection} onPressLink={this.props.onPressLink}/>);
} else if(sectionID == 'brandReource'){
let params = {
P_NAME : pageName,
F_ID : rowID,
TAB_NAM : '首页',
TAB_ID : 0,
F_NAME : rowData.get('module_type'),
exposureEnd : 1,
};
if (rowData.get('module_type') == 'coupon') {
return(<CouponCell resource={rowData} onPressCoupon={this.props.onPressCoupon}/>);
return(<CouponCell yh_exposureData={params} resource={rowData} onPressCoupon={this.props.onPressCoupon}/>);
}else if (rowData.get('module_type') == 'CarouselImage') {
return(<RedBrandSwiper resource={rowData} onPressSlideItem={this.props.onPressProduct}/>);
return(<RedBrandSwiper yh_exposureData={params} resource={rowData} onPressSlideItem={this.props.onPressProduct}/>);
}else if (rowData.get('module_type') == 'Title') {
return(<Title resource={rowData} onPressProduct={this.props.onPressProduct}/>);
return(<Title yh_exposureData={params} resource={rowData} onPressProduct={this.props.onPressProduct}/>);
}else if (rowData.get('module_type') == 'SingleImage') {
return(<SingleImage resource={rowData} onPressProduct={this.props.onPressProduct}/>);
return(<SingleImage yh_exposureData={params} resource={rowData} onPressProduct={this.props.onPressProduct}/>);
}else if (rowData.get('module_type') == 'DoubleImage') {
return(<DoubleImage resource={rowData} onPressProduct={this.props.onPressProduct}/>);
return(<DoubleImage yh_exposureData={params} resource={rowData} onPressProduct={this.props.onPressProduct}/>);
}else if (rowData.get('module_type') == 'Video') {
return(<Video resource={rowData} videoCounts={videoCounts} onPressVideo={this.props.onPressVideo}/>);
return(<Video yh_exposureData={params} resource={rowData} videoCounts={videoCounts} onPressVideo={this.props.onPressVideo}/>);
}else if (rowData.get('module_type') == 'TripleImage') {
return(<TripleImage resource={rowData} onPressProduct={this.props.onPressProduct}/>);
return(<TripleImage yh_exposureData={params} resource={rowData} onPressProduct={this.props.onPressProduct}/>);
}else if (rowData.get('module_type') == 'FourImage') {
return(<FourImages resource={rowData} onPressProduct={this.props.onPressProduct}/>);
return(<FourImages yh_exposureData={params} resource={rowData} onPressProduct={this.props.onPressProduct}/>);
}else if (rowData.get('module_type') == 'AppRecommendProduct') {
return(<GoodsGroupList resource={rowData} onPressProductRecommend={this.props.onPressProductRecommend}/>);
return(<GoodsGroupList yh_exposureData={params} resource={rowData} onPressProductRecommend={this.props.onPressProductRecommend}/>);
}
} else if (sectionID == 'productList' || sectionID == 'newProductList') {
let similarIndex = this.props.similarIndex;
... ... @@ -247,6 +261,7 @@ export default class RedBrand extends Component {
<View style={styles.container}>
<ListView
ref='redBrandList'
yh_viewVisible = {true}
contentContainerStyle={styles.contentContainer}
enableEmptySections={true}
dataSource={this.dataSource.cloneWithRowsAndSections(dataSource)}
... ...
... ... @@ -61,6 +61,7 @@ export default class RedBrandSwiper extends React.Component {
if (!resource) {
return null;
}
let yh_exposureData = this.props.yh_exposureData?this.props.yh_exposureData:null;
let data = resource.get('module_data').get('data').toJS();
let moduleOrder = resource.get('module_order') + 1;
... ... @@ -70,8 +71,15 @@ export default class RedBrandSwiper extends React.Component {
let backgroundHeight =isModuleMargin=='1'?(swiperHeight+10):swiperHeight;
if (data.length == 1) {
if (yh_exposureData) {
yh_exposureData = {
I_INDEX: 1,
...yh_exposureData,
}
}
return (
<TouchableOpacity
yh_exposureData={yh_exposureData}
activeOpacity={1}
style={{width: width, height: backgroundHeight,backgroundColor:'#f0f0f0'}}
onPress={() => {
... ... @@ -100,8 +108,15 @@ export default class RedBrandSwiper extends React.Component {
height={swiperHeight}
>
{data.map((item, i) => {
if (yh_exposureData) {
yh_exposureData = {
I_INDEX: parseInt(i)+1+'',
...yh_exposureData,
}
}
return (
<TouchableOpacity
yh_exposureData={yh_exposureData}
key={i}
activeOpacity={1}
onPress={() => {
... ...
... ... @@ -34,6 +34,13 @@ 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;
... ... @@ -59,7 +66,7 @@ export default class SingleImage extends React.Component {
let moduleOrder = resource.get('module_order') + 1;
let moduleType = resource.get('module_type');
return (
<TouchableOpacity activeOpacity={1.0} style={{width: backgroundWidth, height:backgroundHeight,backgroundColor:'#f0f0f0'}} onPress={() => {
<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);
}}>
<View style={{width: backgroundWidth, height:backgroundHeight,backgroundColor: '#f0f0f0'}}>
... ...
... ... @@ -35,6 +35,7 @@ export default class Title extends React.Component {
if (!resource) {
return null;
}
let yh_exposureData = this.props.yh_exposureData?this.props.yh_exposureData:null;
let fontFamilyStyle = {};
if (Platform.OS === 'ios') {
... ... @@ -56,13 +57,19 @@ export default class Title extends React.Component {
let properties = resource.get('module_data').get('properties').toJS();
let isModuleMargin = properties.isModuleMargin;
if (yh_exposureData) {
yh_exposureData = {
I_INDEX: 0,
...yh_exposureData,
}
}
return(
<View style={[styles.container,{height: isModuleMargin=='1'?40+10:40,backgroundColor: '#f0f0f0'}]}>
<View style={{width: width,height: 0.5,backgroundColor: '#e5e5e5'}}/>
<View style={styles.title}>
<Text style={[styles.text, fontFamilyStyle]}>{title}</Text>
{hasMoreButton?
<TouchableOpacity activeOpacity={0.5} style={styles.thumbnail} onPress={() => {
<TouchableOpacity yh_exposureData={yh_exposureData} activeOpacity={0.5} style={styles.thumbnail} onPress={() => {
this.props.onPressProduct && this.props.onPressProduct(linkType,linkReource,moduleOrder,moduleType,0);
}}>
<Image
... ...
... ... @@ -23,6 +23,25 @@ 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;
... ... @@ -73,7 +92,7 @@ export default class RedPersonPicThree extends Component{
case '1':
return (
<View style={{flexDirection: 'row',width:width,height: isModuleMargin=='1'?containerHeigth4+nullHeigth:containerHeigth4,backgroundColor: '#f0f0f0'}}>
<TouchableOpacity activeOpacity={1.0} style={styles.imagetype4} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType1,linkReource1,moduleOrder,moduleType,1)}} >
<TouchableOpacity yh_exposureData={yh_exposureData0} activeOpacity={1.0} style={styles.imagetype4} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType1,linkReource1,moduleOrder,moduleType,1)}} >
<YH_Image url={backgroundImage1} style={[styles.imagetype4,{resizeMode: 'contain'}]}/>
{linkType1=='1' && showProductInfo1 ?<View style={styles.maskContainer4}>
<Text style={styles.titleText4} numberOfLines={1}>{name1}</Text>
... ... @@ -83,7 +102,7 @@ export default class RedPersonPicThree extends Component{
</View>
</View>:null}
</TouchableOpacity>
<TouchableOpacity activeOpacity={1.0} style={styles.imagetype4} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType2,linkReource2,moduleOrder,moduleType,2)}} >
<TouchableOpacity yh_exposureData={yh_exposureData1} activeOpacity={1.0} style={styles.imagetype4} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType2,linkReource2,moduleOrder,moduleType,2)}} >
<YH_Image url={backgroundImage2} style={[styles.imagetype4,,{resizeMode: 'contain'}]}/>
{linkType2=='1' && showProductInfo2?<View style={styles.maskContainer4}>
<Text style={styles.titleText4} numberOfLines={1}>{name2}</Text>
... ... @@ -93,7 +112,7 @@ export default class RedPersonPicThree extends Component{
</View>
</View>:null}
</TouchableOpacity>
<TouchableOpacity activeOpacity={1.0} style={styles.imagetype4} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType3,linkReource3,moduleOrder,moduleType,3)}} >
<TouchableOpacity yh_exposureData={yh_exposureData2} activeOpacity={1.0} style={styles.imagetype4} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType3,linkReource3,moduleOrder,moduleType,3)}} >
<YH_Image url={backgroundImage3} style={[styles.imagetype4,{resizeMode: 'contain'}]}/>
{linkType3=='1' && showProductInfo3?<View style={styles.maskContainer4}>
<Text style={styles.titleText4} numberOfLines={1}>{name3}</Text>
... ... @@ -109,21 +128,21 @@ export default class RedPersonPicThree extends Component{
case '2':
return (
<View style={{flexDirection: 'row',width:width,height: isModuleMargin=='1'?containerHeigth3+nullHeigth:containerHeigth3,backgroundColor: '#f0f0f0'}}>
<TouchableOpacity activeOpacity={1.0} style={styles.imagetype3} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType1,linkReource1,moduleOrder,moduleType,1)}} >
<TouchableOpacity yh_exposureData={yh_exposureData0} activeOpacity={1.0} style={styles.imagetype3} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType1,linkReource1,moduleOrder,moduleType,1)}} >
<YH_Image url={backgroundImage1} style={[styles.imagetype3,{resizeMode: 'contain'}]}/>
{linkType1=='1'?<View style={styles.maskContainer3}>
<Text style={{marginTop: 2,marginLeft: 10,fontSize: 11,backgroundColor: 'transparent',color: saleAble1?'red':'white',}}>{price1}</Text>
{saleAble1?<Text style={styles.deleteSale}>{sale1}</Text>:null}
</View>:null}
</TouchableOpacity>
<TouchableOpacity activeOpacity={1.0} style={styles.imagetype3} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType2,linkReource2,moduleOrder,moduleType,2)}} >
<TouchableOpacity yh_exposureData={yh_exposureData1} activeOpacity={1.0} style={styles.imagetype3} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType2,linkReource2,moduleOrder,moduleType,2)}} >
<YH_Image url={backgroundImage2} style={[styles.imagetype3,{resizeMode: 'contain'}]}/>
{linkType2=='1'?<View style={styles.maskContainer3}>
<Text style={{marginTop: 2,marginLeft: 10,fontSize: 11,backgroundColor: 'transparent',color: saleAble2?'red':'white',}}>{price2}</Text>
{saleAble2?<Text style={styles.deleteSale}>{sale2}</Text>:null}
</View>:null}
</TouchableOpacity>
<TouchableOpacity activeOpacity={1.0} style={styles.imagetype3} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType3,linkReource3,moduleOrder,moduleType,3)}} >
<TouchableOpacity yh_exposureData={yh_exposureData2} activeOpacity={1.0} style={styles.imagetype3} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType3,linkReource3,moduleOrder,moduleType,3)}} >
<YH_Image url={backgroundImage3} style={[styles.imagetype3,{resizeMode: 'contain'}]}/>
{linkType3=='1'?<View style={styles.maskContainer3}>
<Text style={{marginTop: 2,marginLeft: 10,fontSize: 11,backgroundColor: 'transparent',color: saleAble3?'red':'white',}}>{price3}</Text>
... ... @@ -137,7 +156,7 @@ export default class RedPersonPicThree extends Component{
return (
<View style={{flexDirection: 'row',width:width,height: isModuleMargin=='1'?containerHeigth+nullHeigth:containerHeigth,backgroundColor: '#f0f0f0'}}>
<View style={styles.subContainer}>
<TouchableOpacity activeOpacity={1.0} style={styles.image} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType1,linkReource1,moduleOrder,moduleType,1)}} >
<TouchableOpacity yh_exposureData={yh_exposureData0} activeOpacity={1.0} style={styles.image} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType1,linkReource1,moduleOrder,moduleType,1)}} >
<YH_Image url={backgroundImage1} style={[styles.image,{resizeMode: 'contain'}]}/>
{linkType1=='1'?<View style={styles.maskContainer1}>
<Text style={styles.titleText} numberOfLines={2}>{name1}</Text>
... ... @@ -147,7 +166,7 @@ export default class RedPersonPicThree extends Component{
</View>
</View>:null}
</TouchableOpacity>
<TouchableOpacity activeOpacity={1.0} style={styles.image} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType2,linkReource2,moduleOrder,moduleType,2)}} >
<TouchableOpacity yh_exposureData={yh_exposureData1} activeOpacity={1.0} style={styles.image} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType2,linkReource2,moduleOrder,moduleType,2)}} >
<YH_Image url={backgroundImage2} style={[styles.image,{resizeMode: 'contain'}]}/>
{linkType2=='1'?<View style={styles.maskContainer1}>
<Text style={styles.titleText} numberOfLines={2}>{name2}</Text>
... ... @@ -158,7 +177,7 @@ export default class RedPersonPicThree extends Component{
</View>:null}
</TouchableOpacity>
</View>
<TouchableOpacity activeOpacity={1.0} style={styles.imageBig} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType3,linkReource3,moduleOrder,moduleType,3)}} >
<TouchableOpacity yh_exposureData={yh_exposureData2} activeOpacity={1.0} style={styles.imageBig} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType3,linkReource3,moduleOrder,moduleType,3)}} >
<YH_Image url={backgroundImage3} style={[styles.imageBig,{resizeMode: 'contain'}]}/>
{linkType3=='1'?<View style={styles.maskContainer2}>
<Text style={styles.titleText} numberOfLines={2}>{name3}</Text>
... ... @@ -174,7 +193,7 @@ export default class RedPersonPicThree extends Component{
case '4':
return (
<View style={{flexDirection: 'row',width:width,height: isModuleMargin=='1'?containerHeigth+nullHeigth:containerHeigth,backgroundColor: '#f0f0f0'}}>
<TouchableOpacity activeOpacity={1.0} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType1,linkReource1,moduleOrder,moduleType,1)}} >
<TouchableOpacity yh_exposureData={yh_exposureData0} activeOpacity={1.0} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType1,linkReource1,moduleOrder,moduleType,1)}} >
<View style={styles.subContainer}>
<YH_Image url={backgroundImage1} style={[styles.imageBig,{resizeMode: 'contain'}]}/>
{linkType1=='1'?<View style={styles.maskContainer2}>
... ... @@ -187,7 +206,7 @@ export default class RedPersonPicThree extends Component{
</View>
</TouchableOpacity>
<View style={styles.subContainer}>
<TouchableOpacity activeOpacity={1.0} style={styles.image} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType2,linkReource2,moduleOrder,moduleType,2)}} >
<TouchableOpacity yh_exposureData={yh_exposureData1} activeOpacity={1.0} style={styles.image} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType2,linkReource2,moduleOrder,moduleType,2)}} >
<YH_Image url={backgroundImage2} style={[styles.image,{resizeMode: 'contain'}]}/>
{linkType2=='1'?<View style={styles.maskContainer1}>
<Text style={styles.titleText} numberOfLines={2}>{name2}</Text>
... ... @@ -197,7 +216,7 @@ export default class RedPersonPicThree extends Component{
</View>
</View>:null}
</TouchableOpacity>
<TouchableOpacity activeOpacity={1.0} style={styles.image} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType3,linkReource3,moduleOrder,moduleType,3)}} >
<TouchableOpacity yh_exposureData={yh_exposureData2} activeOpacity={1.0} style={styles.image} onPress={() => {this.props.onPressProduct && this.props.onPressProduct(linkType3,linkReource3,moduleOrder,moduleType,3)}} >
<YH_Image url={backgroundImage3} style={[styles.image,{resizeMode: 'contain'}]}/>
{linkType3=='1'?<View style={styles.maskContainer1}>
<Text style={styles.titleText} numberOfLines={2}>{name3}</Text>
... ...
'use strict';
import ReactNative from 'react-native';
import ReactNative, {
Platform,
} from 'react-native';
import RedBrandService from '../../services/RedBrandService';
import * as _ from 'lodash';
import {GetQueryString} from '../../utils/Helper';
... ... @@ -256,7 +258,7 @@ export function getProductList(reload=false) {
dispatch(productListRequest());
return new RedBrandService(app.host).productList(shopId, channel, order, page, pageSize, allFilterFactors)
.then(json => {
let payload = parseProductList(json);
let payload = parseProductList(json,order,app.channel,0);
payload.endReached = payload.currentPage == payload.pageCount || payload.list.length < pageSize;
if (payload.currentPage > 1) {
let oldList = productList.list.toJS();
... ... @@ -291,7 +293,7 @@ export function getProductListForNew(reload=false) {
dispatch(productListForNewRequest());
return new RedBrandService(app.host).productList(shopId, channel, order, page, pageSize)
.then(json => {
let payload = parseProductList(json);
let payload = parseProductList(json,order,app.channel,1);
payload.endReached = payload.currentPage == payload.pageCount || payload.list.length < pageSize;
if (payload.currentPage > 1) {
let oldList = productList.list.toJS();
... ... @@ -306,13 +308,78 @@ export function getProductListForNew(reload=false) {
};
}
function parseProductList(json) {
function exposePruductListData(list,order,channel,index) {
if (!list) {
return list;
}
let tab_name = '默认';
let tab_num = 0;
if (order == 's_t_desc') {
tab_name = '最新';
tab_num = 0;
}
if (order == 's_p_asc' || order == 's_p_desc') {
tab_name = '价格';
tab_num = 1;
}
if (order == 'p_d_asc' || order == 'p_d_desc') {
tab_name = '折扣';
tab_num = 2;
}
let pageName = 'iFP_RedBrand';
if (Platform.OS === 'android') {
pageName = 'aFP_RedBrand';
}
let l2_TAB_NAM = '首页';
if (index == 0) {
l2_TAB_NAM = '首页';
}else if (channel == 1) {
l2_TAB_NAM = '新品';
}
for (var i = 0; i < list.length; i++) {
let item = list[i];
let skn = item.product_skn;
let inFloorIndex = parseInt(i) + 1 + '';
let params = {
P_NAME : pageName,
I_INDEX : inFloorIndex,
PRD_SKN : skn,
TAB_NAM : tab_name,
TAB_ID : tab_num,
L2_TAB_ID: index,
L2_TAB_NAM: l2_TAB_NAM,
exposureEnd : 1,
};
item.yh_exposureData = params;
}
return list;
}
function parseProductList(json,order,channel,index) {
let list = json && json.product_list ? json.product_list : [];
try {
list = exposePruductListData(list,order,channel,index);
} catch (e) {
} finally {
}
let currentPage = json && json.page ? json.page : 1;
let pageCount = json && json.page_total ? json.page_total : 0;
let total = json && json.total ? json.total : 0;
let filter = json && json.filter ? json.filter : {};
let list = json && json.product_list ? json.product_list : [];
let filterCategoryDetailFilterList = {};
let categoryFilterList = [];
... ... @@ -712,6 +779,25 @@ export function appRecommendProduct(dataSource) {
return new RedBrandService(app.host).searchProductBySkn(SKNs)
.then(json => {
let product_list = json.product_list;
for (var i = 0; i < product_list.length; i++) {
let items = product_list[i];
let pageName = 'iFP_RedBrand';
if (Platform.OS === 'android') {
pageName = 'aFP_RedBrand';
}
let params = {
P_NAME : pageName,
I_INDEX : parseInt(i)+1+'',
PRD_SKN : items.product_skn,
L2_TAB_ID: 0,
L2_TAB_NAM: '首页',
F_NAME: 'AppRecommendProduct',
exposureEnd : 1,
};
items.yh_exposureData = params;
}
item.list = product_list;
dispatch(productSuccess(dataSource));
})
... ... @@ -724,9 +810,26 @@ export function appRecommendProduct(dataSource) {
return new RedBrandService(app.host).productList(shopId, channel, order, 1, pageSize)
.then(json => {
let product_list = json.product_list;
for (var i = 0; i < product_list.length; i++) {
let items = product_list[i];
let pageName = 'iFP_RedBrand';
if (Platform.OS === 'android') {
pageName = 'aFP_RedBrand';
}
let params = {
P_NAME : pageName,
I_INDEX : parseInt(i)+1+'',
PRD_SKN : items.product_skn,
L2_TAB_ID: 0,
L2_TAB_NAM: '首页',
F_NAME: 'AppRecommendProduct',
exposureEnd : 1,
};
items.yh_exposureData = params;
}
item.list = product_list;
dispatch(productSuccess(dataSource));
})
.catch(error => {
});
... ...