...
|
...
|
@@ -13,9 +13,7 @@ import { |
|
|
} from 'react-native';
|
|
|
|
|
|
import {Map} from 'immutable';
|
|
|
import BrandSwiper from './BrandSwiper';
|
|
|
import BannerReourceList from './BannerReourceList';
|
|
|
import BrandFliter from './BrandFliter';
|
|
|
import BrandHeader from './BrandHeader';
|
|
|
import YH_SearchBar from '../../../common/components/YH_SearchBar';
|
|
|
import ChannelFliter from './ChannelFliter';
|
|
|
import AllBrandListCell from './AllBrandListCell';
|
...
|
...
|
@@ -82,24 +80,6 @@ export default class Brand extends Component { |
|
|
}
|
|
|
|
|
|
renderHeader(){
|
|
|
let data = this.props.reourceForBoy;
|
|
|
let brandFliter = this.props.brandFliter;
|
|
|
let brandChannelFliter = this.props.brandChannelFliter;
|
|
|
|
|
|
if (brandChannelFliter == 1) {
|
|
|
data = this.props.reourceForBoy;
|
|
|
} else if (brandChannelFliter == 2) {
|
|
|
data = this.props.reourceForGirl;
|
|
|
} else if (brandChannelFliter == 3) {
|
|
|
data = this.props.reourceForKid;
|
|
|
} else if (brandChannelFliter == 4) {
|
|
|
data = this.props.reourceForLifeStyle;
|
|
|
}
|
|
|
|
|
|
let banner = data.get('banner');
|
|
|
let custom_brands = data.get('custom_brands');
|
|
|
let brandsText = data.get('brandsText');
|
|
|
|
|
|
return (
|
|
|
<View style={styles.header}>
|
|
|
<TouchableOpacity
|
...
|
...
|
@@ -115,9 +95,18 @@ export default class Brand extends Component { |
|
|
editable={false}
|
|
|
/>
|
|
|
</TouchableOpacity>
|
|
|
{banner?<BrandSwiper resource={banner} onPressSlideItem={this.props.onPressSlideItem}/>:null}
|
|
|
{custom_brands?<BannerReourceList resource={custom_brands} onPressSlideItem={this.props.onPressSlideItem}/>:null}
|
|
|
{brandsText?<BrandFliter dataSource={brandsText} selectID={brandFliter} onPressFilter={this.props.onPressFilter}/>:null}
|
|
|
|
|
|
<BrandHeader
|
|
|
brandChannelFliter= {this.props.brandChannelFliter}
|
|
|
reourceForBoy= {this.props.reourceForBoy}
|
|
|
reourceForGirl={this.props.reourceForGirl}
|
|
|
reourceForKid={this.props.reourceForKid}
|
|
|
reourceForLifeStyle={this.props.reourceForLifeStyle}
|
|
|
onPressSlideItem= {this.props.onPressSlideItem}
|
|
|
onPressFilter= {this.props.onPressFilter}
|
|
|
brandFliter={this.props.brandFliter}
|
|
|
/>
|
|
|
|
|
|
</View>
|
|
|
);
|
|
|
}
|
...
|
...
|
|