|
@@ -17,7 +17,7 @@ import { FlyContainer, FlyType } from "./FlyContainer";
|
|
|
import { RewardLayer } from "../layer/RewardLayer";
|
|
|
import ItemsM from "../../scripts/mgr/ItemsM";
|
|
|
import EV, { EV_TYPE } from "../../scripts/mgr/EV";
|
|
|
- import { HelpImage, HelpType } from "../layer/HelpImage";
|
|
|
+import { HelpImage, HelpType } from "../layer/HelpImage";
|
|
|
const { ccclass, property } = _decorator;
|
|
|
|
|
|
@ccclass("PageShop")
|
|
@@ -44,14 +44,17 @@ export class PageShop extends BaseUI implements OnTabClickListener {
|
|
|
static readonly TAB_POG_BOX = { index: 3, name: "ScrollViewPogBox" };
|
|
|
private _tabsTitle: CommonTabsTitle = null;
|
|
|
init() {
|
|
|
+
|
|
|
+ this.FindNode("GamePassItem").active = false;
|
|
|
+ this.FindNode("PogBoosterItem").active = false;
|
|
|
+
|
|
|
this._tabsTitle = this.getComponentInChildren(CommonTabsTitle);
|
|
|
let titles = ["GAME PASS", "POG CRIT", "ITEM BOX", "POG BOX"];
|
|
|
this._tabsTitle.init(titles, this);
|
|
|
|
|
|
// this.onTabClick(PageShop.TAB_GAME_PASS.index);
|
|
|
|
|
|
- this.FindNode("GamePassItem").active = false;
|
|
|
- this.FindNode("PogBoosterItem").active = false;
|
|
|
+
|
|
|
}
|
|
|
onTabClick(index: number) {
|
|
|
this._tabsTitle.setSelect(index);
|
|
@@ -100,7 +103,13 @@ export class PageShop extends BaseUI implements OnTabClickListener {
|
|
|
grid.removeAllChildren();
|
|
|
|
|
|
let tpl = this.FindNode("PogBoosterItem");
|
|
|
+ tpl.active = false;
|
|
|
let list = await ShopM.ins.getShopListByStoreId(type);
|
|
|
+ if (!list || list.length <= 0) {
|
|
|
+ Tips.show("Server Shop is empty");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
for (let item of list) {
|
|
|
let itemNode = instantiate(tpl);
|
|
|
itemNode.active = true;
|
|
@@ -186,7 +195,7 @@ export class PageShop extends BaseUI implements OnTabClickListener {
|
|
|
this.PuzzleToGamePass();
|
|
|
break;
|
|
|
case "btn_help_item_box":
|
|
|
- // Tips.show("ComingSoon");
|
|
|
+ // Tips.show("ComingSoon");
|
|
|
|
|
|
HelpImage.show(HelpType.ItemBox);
|
|
|
break;
|