| @@ -545,10 +545,20 @@ setAdSwiperItemDom(item) { | |||||
| setSwiperItemDom(item) { | setSwiperItemDom(item) { | ||||
| let contentItem = item.item; | let contentItem = item.item; | ||||
| let index = item.index; | let index = item.index; | ||||
| let curLogo = null; | |||||
| if (contentItem.type == 0) { | |||||
| if (contentItem.subType == 2) | |||||
| curLogo = require('./image/timed.png'); | |||||
| if (contentItem.subType == 6) | |||||
| curLogo = require('./image/discount.png'); | |||||
| if (contentItem.subType == 7) | |||||
| curLogo = require('./image/groupbuy.png'); | |||||
| } | |||||
| return ( | return ( | ||||
| <View style={styles.carouselItemWrap}> | <View style={styles.carouselItemWrap}> | ||||
| <BoxShadow setting={shadowOpt}> | <BoxShadow setting={shadowOpt}> | ||||
| <View style={styles.contentItemTopForAd} key={index}> | <View style={styles.contentItemTopForAd} key={index}> | ||||
| <Image source={curLogo} resizeMode='center' style={styles.contentItemUpLayerLogo} /> | |||||
| {/* <ImageBackground style={styles.adTypeSwiper02} resizeMode="stretch" source={require('./image/item-background.png')}></ImageBackground> */} | {/* <ImageBackground style={styles.adTypeSwiper02} resizeMode="stretch" source={require('./image/item-background.png')}></ImageBackground> */} | ||||
| <Image source={{uri: contentItem.coverImg}} resizeMode='cover' style={styles.adTypeItemImg} /> | <Image source={{uri: contentItem.coverImg}} resizeMode='cover' style={styles.adTypeItemImg} /> | ||||
| @@ -646,15 +656,23 @@ getAdView(){ | |||||
| </ImageBackground> | </ImageBackground> | ||||
| ); | ); | ||||
| } else if (this.state.adType == 2) { | } else if (this.state.adType == 2) { | ||||
| let curWidthNum = 1080/(PixelRatio.get()) | |||||
| let curWidthNum = 1080/(PixelRatio.get()); | |||||
| let curImgObj = null; | |||||
| if (!this.state.curCoverImgUrl) { | |||||
| curImgObj = require('./image/background.png'); | |||||
| } else { | |||||
| curImgObj = { | |||||
| uri: this.state.curCoverImgUrl | |||||
| } | |||||
| } | |||||
| return ( | return ( | ||||
| // <ImageBackground style={styles.adTypeBg} source={require('./image/ad1.jpg')}> | // <ImageBackground style={styles.adTypeBg} source={require('./image/ad1.jpg')}> | ||||
| <ImageBackground style={styles.adTypeBg} resizeMode="stretch" source={{ uri: this.state.curCoverImgUrl}}> | |||||
| {/* adType == 2 滚动轮播 */} | |||||
| {/* <Swiper ref='scrollView' style={styles.adTypeSwiper02} autoplay={true} autoplayTimeout={1} showPagination={false} | |||||
| dotColor="transparent" activeDotColor="transparent" horizontal={true} showsButtons={false}> | |||||
| {this.renderAdTypeSwiper()} | |||||
| </Swiper> */} | |||||
| <View style={styles.adWrapBox}> | |||||
| <Animatable.View animation="slideInDown" style={styles.adWrap} key={this.state.curCoverImgUrl}> | |||||
| <ImageBackground style={styles.adTypeBg} resizeMode="stretch" source={curImgObj}> | |||||
| </ImageBackground> | |||||
| </Animatable.View> | |||||
| <View style={styles.adTypeSwiper02}> | <View style={styles.adTypeSwiper02}> | ||||
| <Carousel | <Carousel | ||||
| ref={'carousel02'} | ref={'carousel02'} | ||||
| @@ -663,17 +681,23 @@ getAdView(){ | |||||
| sliderWidth={curWidthNum} | sliderWidth={curWidthNum} | ||||
| itemWidth={curWidthNum} | itemWidth={curWidthNum} | ||||
| layout={'stack'} | layout={'stack'} | ||||
| itemHeight={134} | |||||
| sliderHeight={134} | |||||
| activeSlideOffset={0} | activeSlideOffset={0} | ||||
| autoplay={true} | autoplay={true} | ||||
| loop={true} | loop={true} | ||||
| autoplayInterval={3000} | |||||
| autoplayInterval={3500} | |||||
| /> | /> | ||||
| </View> | </View> | ||||
| </View> | |||||
| {/* <View style={styles.bottomBox}> | |||||
| ); | |||||
| /* itemHeight={134} | |||||
| sliderHeight={134} | |||||
| adType == 2 滚动轮播 */ | |||||
| /* <Swiper ref='scrollView' style={styles.adTypeSwiper02} autoplay={true} autoplayTimeout={1} showPagination={false} | |||||
| dotColor="transparent" activeDotColor="transparent" horizontal={true} showsButtons={false}> | |||||
| {this.renderAdTypeSwiper()} | |||||
| </Swiper> */ | |||||
| /* <View style={styles.bottomBox}> | |||||
| <View style={styles.bottomLogoBackground}> | <View style={styles.bottomLogoBackground}> | ||||
| <Image source={{ uri: this.state.baseInfo.imgUrlH}} resizeMode='contain' style={styles.bottomLogo} /> | <Image source={{ uri: this.state.baseInfo.imgUrlH}} resizeMode='contain' style={styles.bottomLogo} /> | ||||
| </View> | </View> | ||||
| @@ -686,23 +710,22 @@ getAdView(){ | |||||
| <Text style={styles.bottomQrcode1Str}>公众号</Text> | <Text style={styles.bottomQrcode1Str}>公众号</Text> | ||||
| </View> | </View> | ||||
| <Text style={styles.bottomPlacehold}>{this.state.versionInfo}</Text> | <Text style={styles.bottomPlacehold}>{this.state.versionInfo}</Text> | ||||
| </View> */} | |||||
| </ImageBackground> | |||||
| ); | |||||
| </View> */ | |||||
| } else if (this.state.adType == 1) { | } else if (this.state.adType == 1) { | ||||
| let curWidthNum = 1080/(PixelRatio.get()) | |||||
| return( | return( | ||||
| <Carousel | <Carousel | ||||
| ref={'carousel01'} | ref={'carousel01'} | ||||
| data={adDataBgList} | data={adDataBgList} | ||||
| renderItem={this.setAdSwiperItemDom} | renderItem={this.setAdSwiperItemDom} | ||||
| sliderWidth={1080} | |||||
| itemWidth={1080} | |||||
| itemHeight={1920} | |||||
| sliderHeight={1920} | |||||
| sliderWidth={curWidthNum} | |||||
| itemWidth={curWidthNum} | |||||
| activeSlideOffset={0} | activeSlideOffset={0} | ||||
| autoplay={true} | autoplay={true} | ||||
| loop={true} | loop={true} | ||||
| autoplayInterval={3000} | |||||
| autoplayInterval={5000} | |||||
| /> | /> | ||||
| ) | ) | ||||
| } | } | ||||
| @@ -923,6 +946,15 @@ MyPage = CodePush(codePushOptions)(MyPage); | |||||
| position:'absolute', | position:'absolute', | ||||
| backgroundColor:'transparent' | backgroundColor:'transparent' | ||||
| }, | }, | ||||
| contentItemUpLayerLogo: { | |||||
| width:160/PixelRatio.get(), | |||||
| height:83/PixelRatio.get(), | |||||
| position: 'absolute', | |||||
| left: -20/PixelRatio.get(), | |||||
| top: 20/PixelRatio.get(), | |||||
| zIndex:100, | |||||
| backgroundColor: 'transparent', | |||||
| }, | |||||
| contentItemTop:{ | contentItemTop:{ | ||||
| flex: 3, | flex: 3, | ||||
| @@ -1182,6 +1214,19 @@ MyPage = CodePush(codePushOptions)(MyPage); | |||||
| width: '100%', | width: '100%', | ||||
| height: '100%', | height: '100%', | ||||
| }, | }, | ||||
| adWrapBox: { | |||||
| width: '100%', | |||||
| height: '100%', | |||||
| position: 'relative', | |||||
| }, | |||||
| adWrap: { | |||||
| width: '100%', | |||||
| height: '100%', | |||||
| position: 'absolute', | |||||
| left: 0, | |||||
| top: 0, | |||||
| zIndex: 10, | |||||
| }, | |||||
| adTypeSwiper02:{ | adTypeSwiper02:{ | ||||
| flex: 1, | flex: 1, | ||||
| @@ -1222,6 +1267,7 @@ MyPage = CodePush(codePushOptions)(MyPage); | |||||
| }, | }, | ||||
| contentItemTopForAd:{ | contentItemTopForAd:{ | ||||
| position: 'relative', | |||||
| flex: 1, | flex: 1, | ||||
| width: 800/PixelRatio.get(), | width: 800/PixelRatio.get(), | ||||
| // width: '100%', | // width: '100%', | ||||