Commit 55058a38 authored by XieChuanJin's avatar XieChuanJin

修复排行榜bug

parent bdb50bfc
...@@ -46,17 +46,17 @@ export default class RankListPanel extends Panel { ...@@ -46,17 +46,17 @@ export default class RankListPanel extends Panel {
this.list.itemRenderer = RankListItem; this.list.itemRenderer = RankListItem;
//监听滑动事件 //监听滑动事件
this.scroller.addEventListener(egret.Event.CHANGE, () => { /* this.scroller.addEventListener(egret.Event.CHANGE, () => {
this.scrollerEnd = this.scroller.viewport.scrollV this.scrollerEnd = this.scroller.viewport.scrollV
if (!this.pageOver && !this.isLoadingMore && (this.scroller.viewport.scrollV + this.scroller.height) >= (this.scroller.viewport.contentHeight)) { if (!this.pageOver && !this.isLoadingMore && (this.scroller.viewport.scrollV + this.scroller.height) >= (this.scroller.viewport.contentHeight)) {
this.isLoadingMore = true; this.isLoadingMore = true;
this.loadMore(); this.loadMore();
} }
}, this); }, this); */
}, window["rankId"], DataManager.ins.customCfgData.actId, true, this.pageIndex, 12); }, window["rankId"], DataManager.ins.customCfgData.actId, false, this.pageIndex, 150);
} }
private loadMore() { /* private loadMore() {
Loading.instace.show(); Loading.instace.show();
NetManager.ins.getRecentRankListNew((success: any) => { // 查询排行榜 NetManager.ins.getRecentRankListNew((success: any) => { // 查询排行榜
if (!success) return; if (!success) return;
...@@ -64,7 +64,6 @@ export default class RankListPanel extends Panel { ...@@ -64,7 +64,6 @@ export default class RankListPanel extends Panel {
if (rankData["userRankList"].length <= 0) { if (rankData["userRankList"].length <= 0) {
this.pageOver = true; this.pageOver = true;
return;
} else { } else {
for (let i of rankData["userRankList"]) { for (let i of rankData["userRankList"]) {
this.rankDataArray.push(i); this.rankDataArray.push(i);
...@@ -75,8 +74,8 @@ export default class RankListPanel extends Panel { ...@@ -75,8 +74,8 @@ export default class RankListPanel extends Panel {
this.isLoadingMore = false; this.isLoadingMore = false;
} }
Loading.instace.hide(); Loading.instace.hide();
}, window["rankId"], DataManager.ins.customCfgData.actId, true, ++this.pageIndex, 20); }, window["rankId"], DataManager.ins.customCfgData.actId, false, ++this.pageIndex, 12);
} } */
} }
const scrollerSkinXML = `<?xml version="1.0" encoding="utf-8"?> const scrollerSkinXML = `<?xml version="1.0" encoding="utf-8"?>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment