|
|
@@ -545,10 +545,20 @@ setAdSwiperItemDom(item) { |
|
|
|
setSwiperItemDom(item) { |
|
|
|
let contentItem = item.item; |
|
|
|
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 ( |
|
|
|
<View style={styles.carouselItemWrap}> |
|
|
|
<BoxShadow setting={shadowOpt}> |
|
|
|
<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> */} |
|
|
|
<Image source={{uri: contentItem.coverImg}} resizeMode='cover' style={styles.adTypeItemImg} /> |
|
|
@@ -646,15 +656,23 @@ getAdView(){ |
|
|
|
</ImageBackground> |
|
|
|
); |
|
|
|
} 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 ( |
|
|
|
// <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}> |
|
|
|
<Carousel |
|
|
|
ref={'carousel02'} |
|
|
@@ -663,17 +681,23 @@ getAdView(){ |
|
|
|
sliderWidth={curWidthNum} |
|
|
|
itemWidth={curWidthNum} |
|
|
|
layout={'stack'} |
|
|
|
itemHeight={134} |
|
|
|
sliderHeight={134} |
|
|
|
activeSlideOffset={0} |
|
|
|
autoplay={true} |
|
|
|
loop={true} |
|
|
|
autoplayInterval={3000} |
|
|
|
autoplayInterval={3500} |
|
|
|
/> |
|
|
|
</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}> |
|
|
|
<Image source={{ uri: this.state.baseInfo.imgUrlH}} resizeMode='contain' style={styles.bottomLogo} /> |
|
|
|
</View> |
|
|
@@ -686,23 +710,22 @@ getAdView(){ |
|
|
|
<Text style={styles.bottomQrcode1Str}>公众号</Text> |
|
|
|
</View> |
|
|
|
<Text style={styles.bottomPlacehold}>{this.state.versionInfo}</Text> |
|
|
|
</View> */} |
|
|
|
</ImageBackground> |
|
|
|
); |
|
|
|
</View> */ |
|
|
|
|
|
|
|
|
|
|
|
} else if (this.state.adType == 1) { |
|
|
|
let curWidthNum = 1080/(PixelRatio.get()) |
|
|
|
return( |
|
|
|
<Carousel |
|
|
|
ref={'carousel01'} |
|
|
|
data={adDataBgList} |
|
|
|
renderItem={this.setAdSwiperItemDom} |
|
|
|
sliderWidth={1080} |
|
|
|
itemWidth={1080} |
|
|
|
itemHeight={1920} |
|
|
|
sliderHeight={1920} |
|
|
|
sliderWidth={curWidthNum} |
|
|
|
itemWidth={curWidthNum} |
|
|
|
activeSlideOffset={0} |
|
|
|
autoplay={true} |
|
|
|
loop={true} |
|
|
|
autoplayInterval={3000} |
|
|
|
autoplayInterval={5000} |
|
|
|
/> |
|
|
|
) |
|
|
|
} |
|
|
@@ -923,6 +946,15 @@ MyPage = CodePush(codePushOptions)(MyPage); |
|
|
|
position:'absolute', |
|
|
|
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:{ |
|
|
|
flex: 3, |
|
|
@@ -1182,6 +1214,19 @@ MyPage = CodePush(codePushOptions)(MyPage); |
|
|
|
width: '100%', |
|
|
|
height: '100%', |
|
|
|
}, |
|
|
|
adWrapBox: { |
|
|
|
width: '100%', |
|
|
|
height: '100%', |
|
|
|
position: 'relative', |
|
|
|
}, |
|
|
|
adWrap: { |
|
|
|
width: '100%', |
|
|
|
height: '100%', |
|
|
|
position: 'absolute', |
|
|
|
left: 0, |
|
|
|
top: 0, |
|
|
|
zIndex: 10, |
|
|
|
}, |
|
|
|
|
|
|
|
adTypeSwiper02:{ |
|
|
|
flex: 1, |
|
|
@@ -1222,6 +1267,7 @@ MyPage = CodePush(codePushOptions)(MyPage); |
|
|
|
}, |
|
|
|
|
|
|
|
contentItemTopForAd:{ |
|
|
|
position: 'relative', |
|
|
|
flex: 1, |
|
|
|
width: 800/PixelRatio.get(), |
|
|
|
// width: '100%', |
|
|
|