|
@@ -4,6 +4,11 @@ import BaseUI from "../../scripts/base/BaseUI";
|
|
import { Layout } from "cc";
|
|
import { Layout } from "cc";
|
|
import { instantiate } from "cc";
|
|
import { instantiate } from "cc";
|
|
import { PlayGameItem } from "../item/PlayGameItem";
|
|
import { PlayGameItem } from "../item/PlayGameItem";
|
|
|
|
+import RankM, { RankDto } from "../../scripts/api/RankM";
|
|
|
|
+import Utils from "../../scripts/utils/Utils";
|
|
|
|
+import UserM from "../../scripts/api/UserM";
|
|
|
|
+import { GoodsId } from "../../scripts/api/GoodsId";
|
|
|
|
+import { PageRank } from "./PageRank";
|
|
|
|
|
|
const { ccclass, property } = _decorator;
|
|
const { ccclass, property } = _decorator;
|
|
|
|
|
|
@@ -17,7 +22,7 @@ export class PagePlay extends BaseUI {
|
|
this.tpl.active = false;
|
|
this.tpl.active = false;
|
|
this.ui();
|
|
this.ui();
|
|
}
|
|
}
|
|
- ui() {
|
|
|
|
|
|
+ async ui() {
|
|
let layout = this.FindNode("games_layout");
|
|
let layout = this.FindNode("games_layout");
|
|
this.tpl.parent = layout;
|
|
this.tpl.parent = layout;
|
|
this.tpl.active = true;
|
|
this.tpl.active = true;
|
|
@@ -29,6 +34,19 @@ export class PagePlay extends BaseUI {
|
|
// item.active = true;
|
|
// item.active = true;
|
|
// item.getComponent(PlayGameItem).init((i + 1) * 100);
|
|
// item.getComponent(PlayGameItem).init((i + 1) * 100);
|
|
// }
|
|
// }
|
|
|
|
+
|
|
|
|
+ let data: RankDto = await RankM.ins.rankData(PageRank.RankTypeSeason);
|
|
|
|
+
|
|
|
|
+ this.setText(
|
|
|
|
+ "lbl_send_portal",
|
|
|
|
+ Utils.formatNumber(data.remainPog, 0) +
|
|
|
|
+ "/" +
|
|
|
|
+ Utils.formatNumber(data.seasonPog, 0)
|
|
|
|
+ );
|
|
|
|
+ this.setText(
|
|
|
|
+ "lbl_remain_portal",
|
|
|
|
+ "" + UserM.ins.getGoodsCount(GoodsId.POG)
|
|
|
|
+ );
|
|
}
|
|
}
|
|
|
|
|
|
public onShow(): void {
|
|
public onShow(): void {
|