发现好货banner效果更新---review 鹿亮亮
Showing
1 changed file
with
4 additions
and
3 deletions
@@ -6,6 +6,7 @@ import Swiper from 'react-native-swiper'; | @@ -6,6 +6,7 @@ import Swiper from 'react-native-swiper'; | ||
6 | import ImmutablePropTypes from 'react-immutable-proptypes'; | 6 | import ImmutablePropTypes from 'react-immutable-proptypes'; |
7 | import SlicedImage from '../../../common/components/SlicedImage'; | 7 | import SlicedImage from '../../../common/components/SlicedImage'; |
8 | import Immutable, {Map} from 'immutable'; | 8 | import Immutable, {Map} from 'immutable'; |
9 | +import RecyclerSwiper from '../../../common/recycler-swiper/recyclerswiper' | ||
9 | 10 | ||
10 | const { | 11 | const { |
11 | View, | 12 | View, |
@@ -15,6 +16,7 @@ const { | @@ -15,6 +16,7 @@ const { | ||
15 | Dimensions, | 16 | Dimensions, |
16 | Platform, | 17 | Platform, |
17 | } = ReactNative; | 18 | } = ReactNative; |
19 | +const YH_Swiper = (Platform.OS === 'ios') ? Swiper : RecyclerSwiper; | ||
18 | 20 | ||
19 | export default class ListBannerSwiper extends React.Component { | 21 | export default class ListBannerSwiper extends React.Component { |
20 | 22 | ||
@@ -52,13 +54,12 @@ export default class ListBannerSwiper extends React.Component { | @@ -52,13 +54,12 @@ export default class ListBannerSwiper extends React.Component { | ||
52 | 54 | ||
53 | return ( | 55 | return ( |
54 | <View style={styles.container}> | 56 | <View style={styles.container}> |
55 | - <Swiper | 57 | + <YH_Swiper |
56 | style={styles.banner} | 58 | style={styles.banner} |
57 | showsButtons={false} | 59 | showsButtons={false} |
58 | loop={true} | 60 | loop={true} |
59 | autoplay={true} | 61 | autoplay={true} |
60 | autoplayTimeout={2} | 62 | autoplayTimeout={2} |
61 | - paginationStyle={{bottom: 8}} | ||
62 | dot={this.dot} | 63 | dot={this.dot} |
63 | activeDot={(Platform.OS === 'ios')?this.activeDot:null} | 64 | activeDot={(Platform.OS === 'ios')?this.activeDot:null} |
64 | width={width} | 65 | width={width} |
@@ -78,7 +79,7 @@ export default class ListBannerSwiper extends React.Component { | @@ -78,7 +79,7 @@ export default class ListBannerSwiper extends React.Component { | ||
78 | </TouchableOpacity> | 79 | </TouchableOpacity> |
79 | ); | 80 | ); |
80 | })} | 81 | })} |
81 | - </Swiper> | 82 | + </YH_Swiper> |
82 | </View> | 83 | </View> |
83 | ); | 84 | ); |
84 | } | 85 | } |
-
Please register or login to post a comment