From 39f0ea43c9a271681851f5e9f1965d923dc2a6cb Mon Sep 17 00:00:00 2001 From: caserKing Date: Mon, 2 Sep 2019 12:30:25 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=A4=A7=E5=B1=8F=E3=80=91=E3=80=90?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E3=80=91=E3=80=90codepush=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E4=B8=8D=E9=87=8D=E5=90=AF=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.js | 35 +++-------------------------------- 1 file changed, 3 insertions(+), 32 deletions(-) diff --git a/App.js b/App.js index 3bce1f8..0b87155 100644 --- a/App.js +++ b/App.js @@ -119,8 +119,6 @@ export default class MyPage extends Component { versionInfo:'未知', adType: 0, 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', coverImgUrl: '', previewImg: '', curImgState: false, @@ -179,7 +177,8 @@ async codePushUpdate() { ).then((status: SyncStatus) => { }, (error: any) => { - CodePush.restartApp(); + console.log(error) + // CodePush.restartApp(); }); } @@ -304,6 +303,7 @@ codePushStatusDidChange(syncStatus) { let num = 0; if (adDataList.length > 0 && adDataBgList.length > 0) { num = 2; + this.setState({previewImg: adDataBgList[0].coverImg}); } else if (adDataList.length > 0 && !adDataBgList.length) { num = 0; } else if (!adDataList.length && adDataBgList.length > 0) { @@ -322,13 +322,6 @@ 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) //type==0的是券 1是? 2是广告大图 let curData = result.data.list; this.dealLoopType(curData); @@ -717,28 +710,6 @@ getAdView(){ ); - /* itemHeight={134} - sliderHeight={134} - adType == 2 滚动轮播 */ - /* - {this.renderAdTypeSwiper()} - */ - /* - - - - - - 小程序 - - - - 公众号 - - {this.state.versionInfo} - */ - } else if (this.state.adType == 1) { let curWidthNum = 1080/(PixelRatio.get())