浏览代码

[异常][修复]:捕获更新中的异常

tags/jenkins-front-end-screenad-137-v88^0
hupeng 6 年前
父节点
当前提交
0fb5abcec5
共有 1 个文件被更改,包括 21 次插入18 次删除
  1. +21
    -18
      App.js

+ 21
- 18
App.js 查看文件

@@ -294,27 +294,30 @@ async routine() {
getAdDataCount -=1;
pageChangeCount -=1;

try {
if (getAdDataCount<=0) {
await this.getAdDataList()
getAdDataCount = heartConfig.dataRefreshInterval
} else if (hbRequestCount<=0) {
await this.hbRequest()
hbRequestCount = heartConfig.heartbeatInterval
}

if (getAdDataCount<=0) {
await this.getAdDataList()
getAdDataCount = heartConfig.dataRefreshInterval
} else if (hbRequestCount<=0) {
await this.hbRequest()
hbRequestCount = heartConfig.heartbeatInterval
}

if (pageChangeCount <= 0) { //页面切换间隔
if (this.state.contentDisplayStatus) {
this.setState({ contentDisplayStatus: false})
if (this.updateContent()) {
this.setState({ contentDisplayStatus: true})
if (pageChangeCount <= 0) { //页面切换间隔
if (this.state.contentDisplayStatus) {
this.setState({ contentDisplayStatus: false})
if (this.updateContent()) {
this.setState({ contentDisplayStatus: true})
}
} else {
await this.getBaseInfo()
await this.getAdDataList()
}
} else {
await this.getBaseInfo()
await this.getAdDataList()
pageChangeCount = heartConfig.pageChangeInterval
}
pageChangeCount = heartConfig.pageChangeInterval
}
} catch(e){
this.setState({ versionInfo: this.state.versionInfo+'[E]'});
}

setTimeout(()=>{
this.routine();


正在加载...
取消
保存