...
|
...
|
@@ -53,7 +53,7 @@ export default class BrandStore extends Component { |
|
|
renderSectionHeader(sectionData, sectionID) {
|
|
|
switch(sectionID) {
|
|
|
// 顶部menu
|
|
|
case 'largeSlideImg_APP': {
|
|
|
case 'brandReource': {
|
|
|
return (
|
|
|
<Text>首页、上新、人气、全部商品</Text>
|
|
|
);
|
...
|
...
|
@@ -72,46 +72,86 @@ export default class BrandStore extends Component { |
|
|
|
|
|
renderRow(rowData, sectionID, rowID, highlightRow) {
|
|
|
|
|
|
switch(sectionID) {
|
|
|
case 'shopTopBanner_APP': {
|
|
|
return (
|
|
|
<BrandStoreHeaderView
|
|
|
backgroundImage={rowData}
|
|
|
info={this.props.info}
|
|
|
onPressCollection={this.props.onPressCollection}
|
|
|
/>
|
|
|
);
|
|
|
}
|
|
|
break;
|
|
|
case 'largeSlideImg_APP': {
|
|
|
return(
|
|
|
<BrandSwiper
|
|
|
resource={rowData}
|
|
|
onPressBrandItem={this.props.onPressBrandItem}
|
|
|
/>
|
|
|
)
|
|
|
}
|
|
|
break;
|
|
|
case 'oneRowTwoColImages_APP': {
|
|
|
return (
|
|
|
<OneRowTwoColImages
|
|
|
resource={rowData}
|
|
|
onPressOneRowTwoColImages={this.props.onPressOneRowTwoColImages}
|
|
|
/>
|
|
|
);
|
|
|
}
|
|
|
break;
|
|
|
case 'recommend_APP': {
|
|
|
return (
|
|
|
<Recommend
|
|
|
resource={rowData}
|
|
|
onPressRecommendItem={this.props.onPressRecommendItem}
|
|
|
/>
|
|
|
);
|
|
|
if (sectionID == 'shopTopBanner_APP') {
|
|
|
return (
|
|
|
<BrandStoreHeaderView
|
|
|
backgroundImage={rowData}
|
|
|
info={this.props.info}
|
|
|
onPressCollection={this.props.onPressCollection}
|
|
|
/>
|
|
|
);
|
|
|
}else if (sectionID == 'brandReource') {
|
|
|
|
|
|
switch (rowID) {
|
|
|
case '0':
|
|
|
{
|
|
|
if (rowData != null) {
|
|
|
return null;
|
|
|
|
|
|
}else {
|
|
|
return null;
|
|
|
}
|
|
|
}
|
|
|
break;
|
|
|
case '1':
|
|
|
{
|
|
|
if (rowData != null) {
|
|
|
return null;
|
|
|
|
|
|
}else {
|
|
|
return null;
|
|
|
}
|
|
|
}
|
|
|
break;
|
|
|
case '2':
|
|
|
{
|
|
|
if (rowData != null) {
|
|
|
return (
|
|
|
<BrandSwiper
|
|
|
resource={rowData}
|
|
|
onPressBrandItem={this.props.onPressBrandItem}
|
|
|
/>
|
|
|
);
|
|
|
}else {
|
|
|
return null;
|
|
|
}
|
|
|
}
|
|
|
break;
|
|
|
case '3':
|
|
|
{
|
|
|
if (rowData != null) {
|
|
|
return (
|
|
|
<OneRowTwoColImages
|
|
|
resource={rowData}
|
|
|
onPressOneRowTwoColImages={this.props.onPressOneRowTwoColImages}
|
|
|
/>
|
|
|
);
|
|
|
}else {
|
|
|
return null;
|
|
|
}
|
|
|
}
|
|
|
break;
|
|
|
case '4':
|
|
|
{
|
|
|
if (rowData != null) {
|
|
|
return (
|
|
|
<Recommend
|
|
|
resource={rowData}
|
|
|
onPressRecommendItem={this.props.onPressRecommendItem}
|
|
|
/>
|
|
|
);
|
|
|
}else {
|
|
|
return null;
|
|
|
}
|
|
|
}
|
|
|
break;
|
|
|
default:
|
|
|
return null;
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
break;
|
|
|
default:
|
|
|
return null;
|
|
|
}else if (sectionID == 'hotProducts_APP') {
|
|
|
return null;
|
|
|
}
|
|
|
}
|
|
|
render() {
|
...
|
...
|
@@ -127,13 +167,7 @@ export default class BrandStore extends Component { |
|
|
|
|
|
let dataSource = {
|
|
|
shopTopBanner_APP: [shopTopBanner_APP],
|
|
|
menu: ['menu'],
|
|
|
coupon: [coupon],
|
|
|
brandBrowse: [brandBrowse],
|
|
|
largeSlideImg_APP: [largeSlideImg_APP],
|
|
|
oneRowTwoColImages_APP: [oneRowTwoColImages_APP],
|
|
|
recommend_APP: [recommend_APP],
|
|
|
hotProducts_APP: hotProducts_APP.list ? hotProducts_APP.list.toArray() : [],
|
|
|
brandReource:[coupon,brandBrowse,largeSlideImg_APP,oneRowTwoColImages_APP,recommend_APP,hotProducts_APP.list ? hotProducts_APP.list.toArray() : []],
|
|
|
};
|
|
|
|
|
|
return (
|
...
|
...
|
|