zane 1 месяц назад
Родитель
Сommit
38a250ca69

+ 0 - 2
assets/resources/prefab/family/FamilyPageHas.ts

@@ -16,8 +16,6 @@ const { ccclass, property } = _decorator;
 
 @ccclass("FamilyPageHas")
 export class FamilyPageHas extends BaseUI {
- 
-
   async editFamilyNotice() {
     let notice = await InputNameLayer.show(100);
     if (notice == null) {

+ 1 - 1
assets/resources/prefab/family/FamilyPageNo.ts

@@ -24,7 +24,7 @@ export class FamilyPageNo extends BaseUI {
     let content = Utils.setI18nLabel("Family.CreateFamilySuccess", name);
     let familyOwner = UserM.ins.getUserName();
     let shareLink = await ShareM.ins.getFamilyShareLink(name, familyOwner);
-    let success = await TipsLayer.confirm(title, content, shareLink);
+    let success = await TipsLayer.forceConfirm(title, content, shareLink);
     if (success) {
       UserM.ins.setMockHasFamily(true);
       EV.ins.emit(EV_TYPE.FAMILY_STATUS_UPDATE);

+ 17 - 17
assets/resources/prefab/family/ManagePlayerItem.prefab

@@ -375,7 +375,7 @@
   },
   {
     "__type__": "cc.Node",
-    "_name": "lbl_approvel_info",
+    "_name": "lbl_approve_info",
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
@@ -534,7 +534,7 @@
   },
   {
     "__type__": "cc.Node",
-    "_name": "icon_pog",
+    "_name": "exp",
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
@@ -559,7 +559,7 @@
     },
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 25.39100000000002,
+      "x": -15.242999999999995,
       "y": 28.565000000000055,
       "z": 0
     },
@@ -588,7 +588,7 @@
   },
   {
     "__type__": "cc.Node",
-    "_name": "lbl_rank_value",
+    "_name": "lbl_exp_value",
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
@@ -609,8 +609,8 @@
     },
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 16.569999999999993,
-      "y": -0.40200000000004366,
+      "x": 22.791999999999973,
+      "y": 1.8260000000000218,
       "z": 0
     },
     "_lrot": {
@@ -650,7 +650,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 10.66015625,
+      "width": 92.984375,
       "height": 29.2
     },
     "_anchorPoint": {
@@ -686,7 +686,7 @@
       "b": 255,
       "a": 255
     },
-    "_string": "-",
+    "_string": "12328734",
     "_horizontalAlign": 0,
     "_verticalAlign": 1,
     "_actualFontSize": 20,
@@ -759,8 +759,8 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 30,
-      "height": 30
+      "width": 45,
+      "height": 19
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -796,12 +796,12 @@
       "a": 255
     },
     "_spriteFrame": {
-      "__uuid__": "a02ea29d-ce4c-481a-a758-2b08eafe1ab1@f9941",
+      "__uuid__": "c67fadfb-f34b-426d-930b-584db4e9c671@f9941",
       "__expectedType__": "cc.SpriteFrame"
     },
     "_type": 0,
     "_fillType": 0,
-    "_sizeMode": 0,
+    "_sizeMode": 1,
     "_fillCenter": {
       "__type__": "cc.Vec2",
       "x": 0,
@@ -1085,7 +1085,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 110,
+      "width": 111.73828125,
       "height": 31.5
     },
     "_anchorPoint": {
@@ -1124,11 +1124,11 @@
     "_string": "Approve",
     "_horizontalAlign": 1,
     "_verticalAlign": 1,
-    "_actualFontSize": 25,
-    "_fontSize": 25,
+    "_actualFontSize": 30,
+    "_fontSize": 30,
     "_fontFamily": "Arial",
     "_lineHeight": 25,
-    "_overflow": 3,
+    "_overflow": 0,
     "_enableWrapText": true,
     "_font": null,
     "_isSystemFontUsed": true,
@@ -1194,7 +1194,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 120,
+      "width": 150,
       "height": 64
     },
     "_anchorPoint": {

+ 4 - 0
assets/resources/prefab/family/ManagePlayerItem.ts

@@ -25,6 +25,10 @@ export class ManagePlayerItem extends BaseUI {
     } else if (type == ManagePlayerItemType.MEMBERS) {
       this.setText("lbl_manager_name", "" + "Remove");
     }
+
+    this.FindNode("exp").active = type == ManagePlayerItemType.MEMBERS;
+
+    this.FindNode("lbl_approve_info").active = type == ManagePlayerItemType.APPROVE;
   }
 
   protected simpleOnBtnClick(name: string): void {

+ 3 - 14
assets/resources/prefab/hall/PageFamily.ts

@@ -1,21 +1,10 @@
 import { _decorator, Component, Node } from "cc";
 import BaseUI from "../../scripts/base/BaseUI";
 import { ScrollView } from "cc";
-import AB from "../../scripts/base/AB";
-import { instantiate } from "cc";
-import { Hall } from "../hall/Hall";
-import { RankPlayerItem } from "../item/RankPlayerItem";
-import { RankPlayerDto } from "../../scripts/api/RankM";
-import { InputNameLayer } from "../family/InputNameLayer";
-import { TipsData, TipsLayer } from "../layer/TipsLayer";
-import { MemberManager } from "../family/MemberManager";
-import Utils from "../../scripts/utils/Utils";
-import { DebugM } from "../../scripts/mgr/DebugM";
-import { Tips } from "../../scripts/mgr/Tips";
-import { Layout } from "cc";
+
 import EV, { EV_TYPE } from "../../scripts/mgr/EV";
 import UserM from "../../scripts/api/UserM";
-import { FamilyPageHas } from "../family/FamilyPageHas";
+
 const { ccclass, property } = _decorator;
 
 @ccclass("PageFamily")
@@ -41,7 +30,7 @@ export class PageFamily extends BaseUI {
   public onShow(): void {
     this.refresh();
 
-    // TipsLayer.showConfirm("test", "test");
+
   }
 
   async refresh() {

+ 4 - 6
assets/resources/prefab/hall/PageRank.ts

@@ -17,6 +17,7 @@ import { HelpLayer } from "../layer/HelpLayer";
 import { TipsData, TipsLayer } from "../layer/TipsLayer";
 import { Vec2 } from "cc";
 import { HelpImage, HelpType } from "../layer/HelpImage";
+
 const { ccclass, property } = _decorator;
 
 @ccclass("PageRank")
@@ -201,13 +202,10 @@ export class PageRank extends BaseUI implements OnTabClickListener {
         HelpImage.show(HelpType.Rank);
         break;
       case "btn_utility":
-        let data = new TipsData();
-        data.title = "";
-        data.content = `Check out POG Economy & Leaderboard Mechanics from Litepaper: `;
-        data.forceConfirm = true;
+        let content = `Check out POG Economy & Leaderboard Mechanics from Litepaper: `;
+        let data = TipsLayer.build(content);
         data.link = `https://telgather.gitbook.io/telgather-litepaper/telgather-economy/pog-economy-and-leaderboard-mechanics`;
-
-        TipsLayer.show(data);
+        data.show();
         break;
     }
   }

+ 6 - 1
assets/resources/prefab/item/GamePassItem.ts

@@ -64,12 +64,17 @@ export class GamePassItem extends BaseUI implements IPayListener {
       },
     ];
 
+    // this.setText(
+    //   "lbl_season_end_time",
+    //   "End Time:" + Utils.formattedOnlyDate(data.endTimeAt)
+    // );
     this.setText(
       "lbl_season_end_time",
-      "End Time:" + Utils.formattedOnlyDate(data.endTimeAt)
+      ""
     );
 
 
+
     let c = ConfigM.ins.getShopListByStoreId(1)[0];
 
     this.setText(

+ 0 - 2
assets/resources/prefab/item/PogBoosterItem.ts

@@ -11,8 +11,6 @@ import { RewardLayer } from "../layer/RewardLayer";
 import ItemsM from "../../scripts/mgr/ItemsM";
 import { Sprite } from "cc";
 import PogAd from "../../scripts/mgr/PogAd";
-import { TipsData, TipsLayer } from "../layer/TipsLayer";
-import { GoodsId } from "../../scripts/api/GoodsId";
 const { ccclass, property } = _decorator;
 
 @ccclass("PogBoosterItem")

+ 23 - 17
assets/resources/prefab/layer/TipsLayer.ts

@@ -16,6 +16,13 @@ export class TipsData {
   singleName: string = "";
   link: string = null;
   shareLink: string = null;
+
+  constructor(content: string) {
+    this.content = content;
+  }
+  async show(): Promise<TipsLayer> {
+    return await TipsLayer.show(this);
+  }
 }
 
 export interface OnConfirm {
@@ -24,26 +31,26 @@ export interface OnConfirm {
 
 @ccclass("TipsLayer")
 export class TipsLayer extends BaseUI {
-  static confirm(
+  static build(content: string): TipsData {
+    let tipsData: TipsData = new TipsData(content);
+    return tipsData;
+  }
+
+  static forceConfirm(
     title: string,
     content: string,
     shareLink: string = null
   ): Promise<boolean> {
     return new Promise((resolve, reject) => {
-      let tipsData: TipsData = {
-        title: title,
-        onCancel: () => {
-          console.warn("onCancel2222");
-          resolve(false);
-        },
-        link: null,
-        content: content,
-        onConfirm: () => {
-          resolve(true);
-        },
-        forceConfirm: true,
-        singleName: null,
-        shareLink: shareLink,
+      let tipsData: TipsData = TipsLayer.build(content);
+      tipsData.title = title;
+      tipsData.shareLink = shareLink;
+      tipsData.forceConfirm = true;
+      tipsData.onConfirm = () => {
+        resolve(true);
+      };
+      tipsData.onCancel = () => {
+        resolve(false);
       };
       TipsLayer.show(tipsData);
     });
@@ -67,9 +74,8 @@ export class TipsLayer extends BaseUI {
 
   static async showConfirm(title: string, content: string): Promise<boolean> {
     return new Promise((resolve, reject) => {
-      let tipsData: TipsData = new TipsData();
+      let tipsData: TipsData = TipsLayer.build(content);
       tipsData.title = title;
-      tipsData.content = content;
       tipsData.onConfirm = () => {
         resolve(true);
       };

+ 2 - 3
assets/resources/prefab/wallet/WalletPagePOG.ts

@@ -113,11 +113,10 @@ export class WalletPagePOG extends BaseUI {
         break;
 
       case "btn_utility":
-        let data = new TipsData();
+        let data = TipsLayer.build(Utils.setI18nLabel("Wallet.POGUtilityDesc"));
         data.title = "";
         data.forceConfirm = true;
-        data.content = Utils.setI18nLabel("Wallet.POGUtilityDesc");
-        TipsLayer.show(data);
+        data.show();
         break;
       case "btn_go_1":
         await Hall.ins.switchPage(Hall.PagePlay);

+ 8 - 14
assets/resources/prefab/wallet/WalletPageTOG.ts

@@ -38,25 +38,19 @@ export class WalletPageTOG extends BaseUI {
   protected simpleOnBtnClick(name: string): void {
     switch (name) {
       case "btn_utility":
-        let data = new TipsData();
+        let content = Utils.setI18nLabel("Wallet.TOGUtilityDesc");
+        let data = TipsLayer.build(content);
         data.title = "";
-        data.forceConfirm = true;
         data.link = "https://telgather.gitbook.io/telgather-litepaper/telgather-economy";
-        data.content = Utils.setI18nLabel("Wallet.TOGUtilityDesc");
-        TipsLayer.show(data);
+        data.show();
         break;
 
       case "btn_claim_tog":
-        TipsLayer.show({
-          title: "Claim TOG",
-          content: "Are you sure you want to claim TOG?",
-          forceConfirm: true,
-          link:null,
-          singleName: null,
-          onConfirm: () => {
-            Tips.show("Claim TOG Coming Soon");
-          },
-        }) 
+        let tipsData = TipsLayer.build(`Are you sure you want to claim TOG?`);
+        tipsData.onConfirm = () => {
+          Tips.show("Claim TOG Coming Soon");
+        };
+        tipsData.show();
         break;
       case "btn_history":
         Tips.show("TOG History Coming Soon");

+ 1 - 1
assets/resources/scripts/api/WsM.ts

@@ -52,7 +52,7 @@ export default class WsM {
           return;
         }
 
-        TipsLayer.confirm("Hello", "Welcome back!").then((success) => {
+        TipsLayer.forceConfirm("Hello", "Welcome back!").then((success) => {
           if (success) {
             window.location.reload();
           }

+ 2 - 3
assets/resources/scripts/mgr/PogAd.ts

@@ -10,10 +10,9 @@ export default class PogAd {
   public async showAd() {
     //@ts-ignore
     if (!window.googletag) {
-      let tipsData = new TipsData();
-      tipsData.content = "Failed to connect Google Ad Server";
+      let tipsData = TipsLayer.build("Failed to connect Google Ad Server");
       tipsData.forceConfirm = true;
-      await TipsLayer.show(tipsData);
+      await tipsData.show();
       return false;
     } else {
       let success: boolean = await TipsLayer.showConfirm(