| @@ -361,11 +361,9 @@ codePushStatusDidChange(syncStatus) { | |||||
| + encodeURIComponent(this.state.macAddress) | + encodeURIComponent(this.state.macAddress) | ||||
| + '&pageNum=1&pageSize=1000') | + '&pageNum=1&pageSize=1000') | ||||
| .then(result => { | .then(result => { | ||||
| console.log(result) | |||||
| if (result.code != 200) { | if (result.code != 200) { | ||||
| this.showErrMsg(result.message+'\n'+this.state.macAddress); | this.showErrMsg(result.message+'\n'+this.state.macAddress); | ||||
| } else if (result.data.list) { | } else if (result.data.list) { | ||||
| console.log(result.data.list) | |||||
| // | // | ||||
| //type==0的是券 1是? 2是广告大图 | //type==0的是券 1是? 2是广告大图 | ||||
| let curData = result.data.list; | let curData = result.data.list; | ||||
| @@ -399,7 +397,6 @@ codePushStatusDidChange(syncStatus) { | |||||
| if (result.code != 200) { | if (result.code != 200) { | ||||
| this.showErrMsg(result.message+'\n'+this.state.macAddress); | this.showErrMsg(result.message+'\n'+this.state.macAddress); | ||||
| } else if (result.data) { | } else if (result.data) { | ||||
| console.log(result.data) | |||||
| this.setState({baseInfo:result.data}); | this.setState({baseInfo:result.data}); | ||||
| } else { | } else { | ||||
| this.showErrMsg(errorMsg.ERR_DATA_GET); | this.showErrMsg(errorMsg.ERR_DATA_GET); | ||||
| @@ -471,7 +468,7 @@ async routine() { | |||||
| } else if (this.state.adType == 0) { | } else if (this.state.adType == 0) { | ||||
| if (pageChangeCount <= 0) { //页面切换间隔 | if (pageChangeCount <= 0) { //页面切换间隔 | ||||
| //如果播放到了最后一页,接下来暂停计时器,可能播放商户排名页 | //如果播放到了最后一页,接下来暂停计时器,可能播放商户排名页 | ||||
| if (curAdIndex > adDataList.length) { | |||||
| if (curAdIndex >= adDataList.length) { | |||||
| this.dealRankTimer(true); | this.dealRankTimer(true); | ||||
| this.setState({ | this.setState({ | ||||
| openRankList: true, | openRankList: true, | ||||
| @@ -918,27 +915,21 @@ renderAdDom() { | |||||
| getAdView(){ | getAdView(){ | ||||
| if (this.state.baseInfo) { | if (this.state.baseInfo) { | ||||
| if (this.state.adType == 0) { | if (this.state.adType == 0) { | ||||
| console.log(this.state.hasRankList) | |||||
| console.log(this.state.openRankList) | |||||
| if (this.state.hasRankList && this.state.openRankList) { | if (this.state.hasRankList && this.state.openRankList) { | ||||
| console.log(111) | |||||
| return ( | return ( | ||||
| this.renderRankDom() | this.renderRankDom() | ||||
| ) | ) | ||||
| } else { | } else { | ||||
| console.log(222) | |||||
| return ( | return ( | ||||
| this.renderTicketDom() | this.renderTicketDom() | ||||
| ) | ) | ||||
| } | } | ||||
| } else if (this.state.adType == 2) { | } else if (this.state.adType == 2) { | ||||
| if (this.state.hasRankList && this.state.openRankList) { | if (this.state.hasRankList && this.state.openRankList) { | ||||
| console.log(333) | |||||
| return ( | return ( | ||||
| this.renderRankDom() | this.renderRankDom() | ||||
| ) | ) | ||||
| } else { | } else { | ||||
| console.log(444) | |||||
| return ( | return ( | ||||
| this.renderAdDom() | this.renderAdDom() | ||||
| ) | ) | ||||