From 70d90e01eb47bc121e2ce57cf68c91ca2632514c Mon Sep 17 00:00:00 2001 From: caserKing Date: Wed, 28 Aug 2019 10:14:28 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=A4=A7=E5=B1=8F=E3=80=91=E3=80=90?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E3=80=91=E3=80=90=E5=9B=BE=E7=89=87=E9=A2=84?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E5=A4=84=E7=90=86=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.js | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/App.js b/App.js index 2c95fbd..8270957 100644 --- a/App.js +++ b/App.js @@ -120,7 +120,7 @@ export default class MyPage extends Component { curAdType02Index: 0, //广告图index coverImgUrl: 'https://iformall-net.s3.cn-northwest-1.amazonaws.com.cn/456/37d833d7-263f-4f97-8588-e827c2f43db4.jpg', previewImg: 'https://iformall-net.s3.cn-northwest-1.amazonaws.com.cn/456/37d833d7-263f-4f97-8588-e827c2f43db4.jpg', - + curImgState: false, }; /* this.codePushUpdate = this.codePushUpdate.bind(this); @@ -379,7 +379,13 @@ componentWillUnmount(){ async routine() { hbRequestCount -=1; getAdDataCount -=1; - pageChangeCount -=1; + if (this.state.adType == 2 && this.state.curImgState) { + pageChangeCount -=1; + } + if (this.state.adType != 2) { + pageChangeCount -=1; + } + try { if (getAdDataCount<=0) { @@ -663,11 +669,14 @@ getAdView(){ { - + this.setState({ + curImgState: false + }) }} onLoad={() => { this.setState({ - coverImgUrl: this.state.previewImg + coverImgUrl: this.state.previewImg, + curImgState: true }) }} resizeMode="stretch" source={{uri: this.state.previewImg}}> @@ -689,7 +698,7 @@ getAdView(){ activeSlideOffset={0} autoplay={true} loop={true} - autoplayInterval={3500} + autoplayInterval={4500} />