Authored by 孙凯

1.品牌的轮播速度太快了 以修改 2s 改为 3s 2.热门品牌,滑动的时候没有进度条 以修改 3.热门品牌,点过去顶部没有title 以修改

4.修改 list title 字体
review by hongmo
... ... @@ -56,8 +56,9 @@ let {width, height} = Dimensions.get('window');
let styles = StyleSheet.create({
rowText: {
textAlign: 'left',
fontSize: 14,
fontSize: 17,
marginLeft:10,
color: '#444444',
},
row: {
height: 44,
... ... @@ -73,26 +74,26 @@ let styles = StyleSheet.create({
},
text: {
textAlign: 'left',
fontSize: 10,
fontSize: 13,
color: 'white',
fontWeight: 'bold',
},
hot: {
alignItems: 'center',
height: 15,
width: 30,
backgroundColor: 'red',
height: 17,
width: 40,
backgroundColor: '#ca0b22',
marginLeft: 10,
justifyContent: 'center',
borderRadius: 30,
},
new: {
alignItems: 'center',
height: 15,
width: 30,
height: 17,
width: 40,
backgroundColor: 'green',
marginLeft: 10,
justifyContent: 'center',
borderRadius: 50,
borderRadius: 30,
},
});
... ...
... ... @@ -39,7 +39,7 @@ export default class BannerReourceList extends React.Component {
let newSrc = getSlicedUrl(rowData.src, 140, 100, 2);
return (
<TouchableOpacity activeOpacity={0.5} onPress={() => {
this.props.onPressBrandItem && this.props.onPressBrandItem(rowData);
this.props.onPressSlideItem && this.props.onPressSlideItem(rowData.url);
}}>
<View style={styles.row}>
<View style={styles.thumbnailV}>
... ... @@ -79,7 +79,6 @@ export default class BannerReourceList extends React.Component {
<Text style={styles.titleText} numberOfLines={1}>{title.title}</Text>
</View>
<ListView
showsHorizontalScrollIndicator ={false}
dataSource={this.dataSource.cloneWithRows(list)}
horizontal={true}
renderRow={this.renderRow.bind(this)}
... ...
... ... @@ -98,7 +98,6 @@ export default class Brand extends Component {
reourceForKid={this.props.reourceForKid}
reourceForLifeStyle={this.props.reourceForLifeStyle}
onPressSlideItem= {this.props.onPressSlideItem}
onPressBrandItem={this.props.onPressBrandItem}
onPressFilter= {this.props.onPressFilter}
brandFliter={this.props.brandFliter}
/>
... ... @@ -163,6 +162,7 @@ export default class Brand extends Component {
let contentContainerStyle;
let renderSectionHeader = null;
let showIndexForListView = false;
let showsVerticalScrollIndicator = false;
if (brandFliter == 0) {
list = data ? data.get('all_list') : null;
... ... @@ -182,10 +182,12 @@ export default class Brand extends Component {
list = data ? data.get('new_list') : null;
listDataSource = list ? this.dataSource.cloneWithRows(list.toArray()) : null;
contentContainerStyle = styles.contentContainerTwo;
showsVerticalScrollIndicator = true;
} else if (brandFliter == 2) {
list = data ? data.get('hot_list') : null;
listDataSource = list ? this.dataSource.cloneWithRows(list.toArray()) : null;
contentContainerStyle = styles.contentContainerTwo;
showsVerticalScrollIndicator = true;
}
if (!list) {
... ... @@ -203,7 +205,7 @@ export default class Brand extends Component {
enableEmptySections={true}
dataSource={listDataSource}
renderRow={this.renderRow}
showsVerticalScrollIndicator={false}
showsVerticalScrollIndicator={showsVerticalScrollIndicator}
renderSectionHeader={renderSectionHeader}
renderHeader={this.renderHeader}
/>
... ...
... ... @@ -42,7 +42,7 @@ export default class BrandHeader extends React.Component {
return (
<View style={styles.header}>
<BrandSwiper resource={data} onPressSlideItem={this.props.onPressSlideItem}/>
<BannerReourceList resource={data} onPressBrandItem={this.props.onPressBrandItem}/>
<BannerReourceList resource={data} onPressSlideItem={this.props.onPressSlideItem}/>
<BrandFliter resource={data} selectID={brandFliter} onPressFilter={this.props.onPressFilter}/>
</View>
);
... ...
... ... @@ -91,7 +91,7 @@ export default class BrandSwiper extends React.Component {
showsButtons={false}
loop={true}
autoplay={true}
autoplayTimeout={2}
autoplayTimeout={3}
paginationStyle={{bottom: 8}}
dot={this.dot}
activeDot={(Platform.OS === 'ios')?this.activeDot:null}
... ...