| @@ -294,27 +294,30 @@ async routine() { | |||||
| getAdDataCount -=1; | getAdDataCount -=1; | ||||
| pageChangeCount -=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(()=>{ | setTimeout(()=>{ | ||||
| this.routine(); | this.routine(); | ||||