diff --git a/App.js b/App.js
index 0a1b163..d787f52 100644
--- a/App.js
+++ b/App.js
@@ -164,6 +164,8 @@ async codePushUpdate() {
CodePush.allowRestart();
await CodePush.getUpdateMetadata(CodePush.UpdateState.RUNNING)
.then((metadata: LocalPackage) => {
+ console.log(CodePush.UpdateState)
+ console.log(metadata)
this.setState({ versionInfo: metadata ? 'b'+NativeModules.BuildConfig.versionCode+"-" + metadata.label : 'b'+ NativeModules.BuildConfig.versionCode});
versionInfo = this.state.versionInfo;
}, (error: any) => {
@@ -303,6 +305,9 @@ codePushStatusDidChange(syncStatus) {
let num = 0;
if (adDataList.length > 0 && adDataBgList.length > 0) {
num = 2;
+ this.setState({
+ coverImgUrl: adDataBgList[0].coverImg
+ })
} else if (adDataList.length > 0 && !adDataBgList.length) {
num = 0;
} else if (!adDataList.length && adDataBgList.length > 0) {
@@ -321,12 +326,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;
@@ -360,6 +359,7 @@ codePushStatusDidChange(syncStatus) {
if (result.code != 200) {
this.showErrMsg(result.message+'\n'+this.state.macAddress);
} else if (result.data) {
+ console.log(result.data)
this.setState({baseInfo:result.data});
} else {
this.showErrMsg(errorMsg.ERR_DATA_GET);
@@ -398,7 +398,7 @@ async routine() {
hbRequestCount = heartConfig.heartbeatInterval
}
- //如果是adType == 2时间间隔到了,要检验轮播是否走完在决定切换
+ //如果是adType == 2时间间隔到了,
if (this.state.adType == 2) {
if (pageChangeCount<=0) {
let curNum = this.state.curAdType02Index + 1;
@@ -483,6 +483,7 @@ getContentViewItemMerchantName(contentItem) {
}
getContentViewItem(contentItem, annomation) {
+ console.log(contentItem)
if (!contentItem)
return (
@@ -710,37 +711,17 @@ getAdView(){
activeSlideOffset={0}
autoplay={true}
loop={true}
- autoplayInterval={4500}
+ autoplayInterval={5000}
/>
);
- /* itemHeight={134}
- sliderHeight={134}
- adType == 2 滚动轮播 */
- /*
- {this.renderAdTypeSwiper()}
- */
- /*
-
-
-
-
-
- 小程序
-
-
-
- 公众号
-
- {this.state.versionInfo}
- */
} else if (this.state.adType == 1) {
let curWidthNum = 1080/(PixelRatio.get())
+ let timeSpace = parseInt(Number(heartConfig.pageChangeInterval)*1000);
return(
)
}