From 524c3b4b7bc448d0d35fee3d9b5eb74e6950279b Mon Sep 17 00:00:00 2001 From: caserKing Date: Mon, 12 Aug 2019 12:37:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E9=87=8D=E6=96=B0=E5=AE=89?= =?UTF-8?q?=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.js | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/App.js b/App.js index 4fee8ed..2554e56 100644 --- a/App.js +++ b/App.js @@ -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() { ) } } +setAdSwiperItemDom(item) { + let contentItem = item.item; + return ( + + + + ) +} setSwiperItemDom(item) { let contentItem = item.item; let index = item.index; @@ -638,7 +652,7 @@ getAdView(){ */} ); + } else if (this.state.adType == 1) { + return( + + ) } } else { @@ -1189,4 +1219,14 @@ MyPage = CodePush(codePushOptions)(MyPage); borderWidth:1, }, + onlyAdSwiperItem:{ + width: '100%', + height: '100%', + }, + + onlyAdTypeItemImg:{ + width: '100%', + height: '100%', + } + });