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} />