Authored by 孙凯

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

4.修改 list title 字体
review by hongmo
@@ -56,8 +56,9 @@ let {width, height} = Dimensions.get('window'); @@ -56,8 +56,9 @@ let {width, height} = Dimensions.get('window');
56 let styles = StyleSheet.create({ 56 let styles = StyleSheet.create({
57 rowText: { 57 rowText: {
58 textAlign: 'left', 58 textAlign: 'left',
59 - fontSize: 14, 59 + fontSize: 17,
60 marginLeft:10, 60 marginLeft:10,
  61 + color: '#444444',
61 }, 62 },
62 row: { 63 row: {
63 height: 44, 64 height: 44,
@@ -73,26 +74,26 @@ let styles = StyleSheet.create({ @@ -73,26 +74,26 @@ let styles = StyleSheet.create({
73 }, 74 },
74 text: { 75 text: {
75 textAlign: 'left', 76 textAlign: 'left',
76 - fontSize: 10, 77 + fontSize: 13,
77 color: 'white', 78 color: 'white',
78 fontWeight: 'bold', 79 fontWeight: 'bold',
79 }, 80 },
80 hot: { 81 hot: {
81 alignItems: 'center', 82 alignItems: 'center',
82 - height: 15,  
83 - width: 30,  
84 - backgroundColor: 'red', 83 + height: 17,
  84 + width: 40,
  85 + backgroundColor: '#ca0b22',
85 marginLeft: 10, 86 marginLeft: 10,
86 justifyContent: 'center', 87 justifyContent: 'center',
87 borderRadius: 30, 88 borderRadius: 30,
88 }, 89 },
89 new: { 90 new: {
90 alignItems: 'center', 91 alignItems: 'center',
91 - height: 15,  
92 - width: 30, 92 + height: 17,
  93 + width: 40,
93 backgroundColor: 'green', 94 backgroundColor: 'green',
94 marginLeft: 10, 95 marginLeft: 10,
95 justifyContent: 'center', 96 justifyContent: 'center',
96 - borderRadius: 50, 97 + borderRadius: 30,
97 }, 98 },
98 }); 99 });
@@ -39,7 +39,7 @@ export default class BannerReourceList extends React.Component { @@ -39,7 +39,7 @@ export default class BannerReourceList extends React.Component {
39 let newSrc = getSlicedUrl(rowData.src, 140, 100, 2); 39 let newSrc = getSlicedUrl(rowData.src, 140, 100, 2);
40 return ( 40 return (
41 <TouchableOpacity activeOpacity={0.5} onPress={() => { 41 <TouchableOpacity activeOpacity={0.5} onPress={() => {
42 - this.props.onPressBrandItem && this.props.onPressBrandItem(rowData); 42 + this.props.onPressSlideItem && this.props.onPressSlideItem(rowData.url);
43 }}> 43 }}>
44 <View style={styles.row}> 44 <View style={styles.row}>
45 <View style={styles.thumbnailV}> 45 <View style={styles.thumbnailV}>
@@ -79,7 +79,6 @@ export default class BannerReourceList extends React.Component { @@ -79,7 +79,6 @@ export default class BannerReourceList extends React.Component {
79 <Text style={styles.titleText} numberOfLines={1}>{title.title}</Text> 79 <Text style={styles.titleText} numberOfLines={1}>{title.title}</Text>
80 </View> 80 </View>
81 <ListView 81 <ListView
82 - showsHorizontalScrollIndicator ={false}  
83 dataSource={this.dataSource.cloneWithRows(list)} 82 dataSource={this.dataSource.cloneWithRows(list)}
84 horizontal={true} 83 horizontal={true}
85 renderRow={this.renderRow.bind(this)} 84 renderRow={this.renderRow.bind(this)}
@@ -98,7 +98,6 @@ export default class Brand extends Component { @@ -98,7 +98,6 @@ export default class Brand extends Component {
98 reourceForKid={this.props.reourceForKid} 98 reourceForKid={this.props.reourceForKid}
99 reourceForLifeStyle={this.props.reourceForLifeStyle} 99 reourceForLifeStyle={this.props.reourceForLifeStyle}
100 onPressSlideItem= {this.props.onPressSlideItem} 100 onPressSlideItem= {this.props.onPressSlideItem}
101 - onPressBrandItem={this.props.onPressBrandItem}  
102 onPressFilter= {this.props.onPressFilter} 101 onPressFilter= {this.props.onPressFilter}
103 brandFliter={this.props.brandFliter} 102 brandFliter={this.props.brandFliter}
104 /> 103 />
@@ -163,6 +162,7 @@ export default class Brand extends Component { @@ -163,6 +162,7 @@ export default class Brand extends Component {
163 let contentContainerStyle; 162 let contentContainerStyle;
164 let renderSectionHeader = null; 163 let renderSectionHeader = null;
165 let showIndexForListView = false; 164 let showIndexForListView = false;
  165 + let showsVerticalScrollIndicator = false;
166 166
167 if (brandFliter == 0) { 167 if (brandFliter == 0) {
168 list = data ? data.get('all_list') : null; 168 list = data ? data.get('all_list') : null;
@@ -182,10 +182,12 @@ export default class Brand extends Component { @@ -182,10 +182,12 @@ export default class Brand extends Component {
182 list = data ? data.get('new_list') : null; 182 list = data ? data.get('new_list') : null;
183 listDataSource = list ? this.dataSource.cloneWithRows(list.toArray()) : null; 183 listDataSource = list ? this.dataSource.cloneWithRows(list.toArray()) : null;
184 contentContainerStyle = styles.contentContainerTwo; 184 contentContainerStyle = styles.contentContainerTwo;
  185 + showsVerticalScrollIndicator = true;
185 } else if (brandFliter == 2) { 186 } else if (brandFliter == 2) {
186 list = data ? data.get('hot_list') : null; 187 list = data ? data.get('hot_list') : null;
187 listDataSource = list ? this.dataSource.cloneWithRows(list.toArray()) : null; 188 listDataSource = list ? this.dataSource.cloneWithRows(list.toArray()) : null;
188 contentContainerStyle = styles.contentContainerTwo; 189 contentContainerStyle = styles.contentContainerTwo;
  190 + showsVerticalScrollIndicator = true;
189 } 191 }
190 192
191 if (!list) { 193 if (!list) {
@@ -203,7 +205,7 @@ export default class Brand extends Component { @@ -203,7 +205,7 @@ export default class Brand extends Component {
203 enableEmptySections={true} 205 enableEmptySections={true}
204 dataSource={listDataSource} 206 dataSource={listDataSource}
205 renderRow={this.renderRow} 207 renderRow={this.renderRow}
206 - showsVerticalScrollIndicator={false} 208 + showsVerticalScrollIndicator={showsVerticalScrollIndicator}
207 renderSectionHeader={renderSectionHeader} 209 renderSectionHeader={renderSectionHeader}
208 renderHeader={this.renderHeader} 210 renderHeader={this.renderHeader}
209 /> 211 />
@@ -42,7 +42,7 @@ export default class BrandHeader extends React.Component { @@ -42,7 +42,7 @@ export default class BrandHeader extends React.Component {
42 return ( 42 return (
43 <View style={styles.header}> 43 <View style={styles.header}>
44 <BrandSwiper resource={data} onPressSlideItem={this.props.onPressSlideItem}/> 44 <BrandSwiper resource={data} onPressSlideItem={this.props.onPressSlideItem}/>
45 - <BannerReourceList resource={data} onPressBrandItem={this.props.onPressBrandItem}/> 45 + <BannerReourceList resource={data} onPressSlideItem={this.props.onPressSlideItem}/>
46 <BrandFliter resource={data} selectID={brandFliter} onPressFilter={this.props.onPressFilter}/> 46 <BrandFliter resource={data} selectID={brandFliter} onPressFilter={this.props.onPressFilter}/>
47 </View> 47 </View>
48 ); 48 );
@@ -91,7 +91,7 @@ export default class BrandSwiper extends React.Component { @@ -91,7 +91,7 @@ export default class BrandSwiper extends React.Component {
91 showsButtons={false} 91 showsButtons={false}
92 loop={true} 92 loop={true}
93 autoplay={true} 93 autoplay={true}
94 - autoplayTimeout={2} 94 + autoplayTimeout={3}
95 paginationStyle={{bottom: 8}} 95 paginationStyle={{bottom: 8}}
96 dot={this.dot} 96 dot={this.dot}
97 activeDot={(Platform.OS === 'ios')?this.activeDot:null} 97 activeDot={(Platform.OS === 'ios')?this.activeDot:null}