| @@ -448,25 +448,22 @@ Page({ | |||
| query.select('.tipContent').boundingClientRect(); | |||
| var duration = 0;//动画时常 | |||
| query.exec((option) => { | |||
| if(!option){ | |||
| console.log("没有拿到节点信息"); | |||
| if(!option || !option[1] || !option[0] || !option[1].width || !option[0].width){ | |||
| setTimeout(()=>{ | |||
| this.getGameAwardList(); | |||
| },3000); | |||
| return; | |||
| } | |||
| console.log(option[1].width); | |||
| duration = option[1].width < option[0].width ? 10 : option[1].width / option[0].width * 10; | |||
| this.aniFun(duration * 1000, -option[1].width); | |||
| if (res.data.length >= this.data.configure.count) { | |||
| console.log("还有更多数据"); | |||
| setTimeout(() => { | |||
| this.aniFun(0, '100%'); | |||
| this.data.configure.page += 1; | |||
| this.getGameAwardList(); | |||
| }, duration * 1000) | |||
| } else { | |||
| console.log("没有更多数据了"); | |||
| // console.log("没有更多数据了"); | |||
| setTimeout(() => { | |||
| this.aniFun(0, '100%'); | |||
| this.data.gameAwardListArr = this.data.gameAwardListArr.substring(0, this.data.gameAwardListArr.length - 2); | |||
| @@ -490,7 +487,6 @@ Page({ | |||
| if(this.data.pageUnload){ | |||
| return; | |||
| } | |||
| console.log(1); | |||
| this.aniFun(duration, left); | |||
| setTimeout(() => { | |||
| this.aniFun(0, '100%'); | |||