...
|
...
|
@@ -21,7 +21,7 @@ import {bindActionCreators} from 'redux'; |
|
|
import {connect} from 'react-redux';
|
|
|
import {Map} from 'immutable';
|
|
|
import * as brandStoreActions from '../../reducers/brandStore/brandStoreActions';
|
|
|
import BrandStoreHeaderView from '../brandStore/brandStoreSubView/SessionHeader/BrandStoreHeaderView';
|
|
|
import ShopTopBanner from '../brandStore/brandStoreSubView/Cells/ShopTopBanner';
|
|
|
import CouponCell from '../brandStore/brandStoreSubView/Cells/CouponCell';
|
|
|
import BrandListCell from '../brandStore/brandStoreSubView/Cells/BrandListCell';
|
|
|
import BrandSwiper from '../brandStore/brandStoreSubView/Cells/BrandSwiper';
|
...
|
...
|
@@ -29,6 +29,8 @@ import OneRowTwoColImages from '../brandStore/brandStoreSubView/Cells/OneRowTwoC |
|
|
import Recommend from '../brandStore/brandStoreSubView/Cells/Recommend';
|
|
|
import BrandProductFilter from '../brandStore/brandStoreSubView/Cells/BrandProductFilter'
|
|
|
import ProductListCell from '../brandStore/brandStoreSubView/Cells/BrandProductListCell';
|
|
|
import BrandStoreFilter from '../brandStore/brandStoreSubView/Cells/BrandStoreFilter';
|
|
|
|
|
|
|
|
|
export default class BrandStore extends Component {
|
|
|
constructor(props) {
|
...
|
...
|
@@ -53,8 +55,19 @@ export default class BrandStore extends Component { |
|
|
|
|
|
renderSectionHeader(sectionData, sectionID) {
|
|
|
switch(sectionID) {
|
|
|
// 顶部menu
|
|
|
|
|
|
case 'brandReource': {
|
|
|
return (
|
|
|
<BrandStoreFilter
|
|
|
onPressFilter={this.props.onPressFilter}
|
|
|
/>
|
|
|
);
|
|
|
}
|
|
|
// 底部商品列表筛选工具栏
|
|
|
case 'hotProducts_APP': {
|
|
|
return (
|
|
|
<Text>最新、价格、折扣、筛选</Text>
|
|
|
);
|
|
|
}
|
|
|
default:
|
|
|
return null;
|
|
|
}
|
...
|
...
|
@@ -63,7 +76,7 @@ export default class BrandStore extends Component { |
|
|
renderRow(rowData, sectionID, rowID, highlightRow) {
|
|
|
if (sectionID == 'shopTopBanner_APP') {
|
|
|
return (
|
|
|
<BrandStoreHeaderView
|
|
|
<ShopTopBanner
|
|
|
backgroundImage={rowData}
|
|
|
info={this.props.info}
|
|
|
onPressCollection={this.props.onPressCollection}
|
...
|
...
|
@@ -75,14 +88,20 @@ export default class BrandStore extends Component { |
|
|
case '0':
|
|
|
{
|
|
|
return (
|
|
|
<CouponCell />
|
|
|
<CouponCell
|
|
|
resource={rowData}
|
|
|
onPressCoupon={this.props.onPressCoupon}
|
|
|
/>
|
|
|
);
|
|
|
}
|
|
|
break;
|
|
|
case '1':
|
|
|
{
|
|
|
return (
|
|
|
<BrandListCell />
|
|
|
<BrandListCell
|
|
|
resource={rowData}
|
|
|
onPressBrandItem={this.props.onPressBrandItem}
|
|
|
/>
|
|
|
);
|
|
|
}
|
|
|
break;
|
...
|
...
|
@@ -133,6 +152,7 @@ export default class BrandStore extends Component { |
|
|
data={rowData}
|
|
|
/>
|
|
|
);
|
|
|
return null;
|
|
|
}
|
|
|
}
|
|
|
render() {
|
...
|
...
|
@@ -149,7 +169,7 @@ export default class BrandStore extends Component { |
|
|
let dataSource = {
|
|
|
shopTopBanner_APP: [shopTopBanner_APP],
|
|
|
brandReource:[coupon,brandBrowse,largeSlideImg_APP,oneRowTwoColImages_APP,recommend_APP,hotProducts_APP.list ? hotProducts_APP.list.toArray() : []],
|
|
|
productList: productList.list.toArray(),
|
|
|
// productList: productList.list.toArray(),
|
|
|
};
|
|
|
|
|
|
return (
|
...
|
...
|
@@ -159,7 +179,6 @@ export default class BrandStore extends Component { |
|
|
dataSource={this.dataSource.cloneWithRowsAndSections(dataSource)}
|
|
|
renderRow={this.renderRow}
|
|
|
renderSectionHeader={this.renderSectionHeader}
|
|
|
enableEmptySections = {true}
|
|
|
/>
|
|
|
);
|
|
|
}
|
...
|
...
|
|