diff --git a/App.js b/App.js index 96c8163..3c3b1a2 100644 --- a/App.js +++ b/App.js @@ -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 ( + {/* */} @@ -646,15 +656,23 @@ getAdView(){ ); } 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 ( // - - {/* adType == 2 滚动轮播 */} - {/* - {this.renderAdTypeSwiper()} - */} + + + + + + + - - {/* + ); + /* itemHeight={134} + sliderHeight={134} + adType == 2 滚动轮播 */ + /* + {this.renderAdTypeSwiper()} + */ + /* @@ -686,23 +710,22 @@ getAdView(){ 公众号 {this.state.versionInfo} - */} - - ); + */ + + } else if (this.state.adType == 1) { + let curWidthNum = 1080/(PixelRatio.get()) return( ) } @@ -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%',