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())