|
|
@@ -291,6 +291,8 @@ codePushStatusDidChange(syncStatus) { |
|
|
|
num = 2; |
|
|
|
} else if (adDataList.length > 0 && !adDataBgList.length) { |
|
|
|
num = 0; |
|
|
|
} else if (!adDataList.length && adDataBgList.length > 0) { |
|
|
|
num = 1; |
|
|
|
} |
|
|
|
this.setState({adType: num }) |
|
|
|
} |
|
|
@@ -305,6 +307,10 @@ codePushStatusDidChange(syncStatus) { |
|
|
|
this.showErrMsg(result.message+'\n'+this.state.macAddress); |
|
|
|
} else if (result.data.list) { |
|
|
|
//aaa |
|
|
|
/* result.data.list[0].type = 2; |
|
|
|
result.data.list[1].type = 2; |
|
|
|
result.data.list[2].type = 2; |
|
|
|
result.data.list[3].type = 2; */ |
|
|
|
result.data.list[4].type = 2; |
|
|
|
result.data.list[5].type = 2; |
|
|
|
console.log(result.data) |
|
|
@@ -516,6 +522,14 @@ getContentView() { |
|
|
|
</View>) |
|
|
|
} |
|
|
|
} |
|
|
|
setAdSwiperItemDom(item) { |
|
|
|
let contentItem = item.item; |
|
|
|
return ( |
|
|
|
<View style={styles.onlyAdSwiperItem}> |
|
|
|
<Image source={{uri: contentItem.coverImg}} resizeMode='stretch' style={styles.onlyAdTypeItemImg} /> |
|
|
|
</View> |
|
|
|
) |
|
|
|
} |
|
|
|
setSwiperItemDom(item) { |
|
|
|
let contentItem = item.item; |
|
|
|
let index = item.index; |
|
|
@@ -638,7 +652,7 @@ getAdView(){ |
|
|
|
</Swiper> */} |
|
|
|
<View style={styles.adTypeSwiper02}> |
|
|
|
<Carousel |
|
|
|
ref={'carousel'} |
|
|
|
ref={'carousel02'} |
|
|
|
data={adDataList} |
|
|
|
renderItem={this.setSwiperItemDom} |
|
|
|
sliderWidth={1080} |
|
|
@@ -669,6 +683,22 @@ getAdView(){ |
|
|
|
</View> |
|
|
|
</ImageBackground> |
|
|
|
); |
|
|
|
} else if (this.state.adType == 1) { |
|
|
|
return( |
|
|
|
<Carousel |
|
|
|
ref={'carousel01'} |
|
|
|
data={adDataBgList} |
|
|
|
renderItem={this.setAdSwiperItemDom} |
|
|
|
sliderWidth={1080} |
|
|
|
itemWidth={1080} |
|
|
|
itemHeight={1920} |
|
|
|
sliderHeight={1920} |
|
|
|
activeSlideOffset={0} |
|
|
|
autoplay={true} |
|
|
|
loop={true} |
|
|
|
autoplayInterval={2500} |
|
|
|
/> |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
@@ -1189,4 +1219,14 @@ MyPage = CodePush(codePushOptions)(MyPage); |
|
|
|
borderWidth:1, |
|
|
|
}, |
|
|
|
|
|
|
|
onlyAdSwiperItem:{ |
|
|
|
width: '100%', |
|
|
|
height: '100%', |
|
|
|
}, |
|
|
|
|
|
|
|
onlyAdTypeItemImg:{ |
|
|
|
width: '100%', |
|
|
|
height: '100%', |
|
|
|
} |
|
|
|
|
|
|
|
}); |