web3 更新 语言修复

This commit is contained in:
2025-09-22 16:40:56 +08:00
parent 7324ab178d
commit 365bdf7293
17 changed files with 681 additions and 564 deletions
@@ -207,7 +207,8 @@ export class PurchasePanel extends li_BaseView {
payType: param.payType,
goodId: param.goodId,
networkType: this.getDefaultNetworkType(),
base: this.base,
basePanel: this.base,
payPanel: this,
};
if (this.web3PopPanel == null)
@@ -12,6 +12,7 @@ import { TipsPanel } from "./TipsPanel";
import { SDKManager } from "../../../Main/Channel/SDKManager";
import LanguageUtils from "../../../Main/Common/LanguageUtils";
import { logger } from "db://assets/Scripts/Main/Common/Logger";
import { PersonalPanel } from "./PersonalPanel";
const { ccclass, property } = _decorator;
@@ -34,14 +35,16 @@ export class Web3PopPanel extends li_BaseView {
private networkType: proto.cs.EnmNetworkType;
private goodId: number;
private base: PurchasePanel;
private basePanel: PersonalPanel;
private payPanel: PurchasePanel;
private countdownTimer: any;
private remainingSeconds: number = 0;
private isCountingDown: boolean = false;
private tips: Label;
openUIDataCT(data: any): void {
this.refreshData(data);
this.base.web3PopPanel = this;
this.payPanel.web3PopPanel = this;
}
onLoadCT(): void {
@@ -54,6 +57,7 @@ export class Web3PopPanel extends li_BaseView {
this.address = this._nodeTab.addressText.getComponent(Label);
this.expireTimeText = this._nodeTab.expireTimeText.getComponent(Label);
this.qrCode = this._nodeTab.qrCode.getComponent(Sprite);
this.tips = this._nodeTab.tips.getComponent(Label);
this.registerListener();
this.selection.setScale(new Vec3(1, 0, 1));
@@ -83,13 +87,7 @@ export class Web3PopPanel extends li_BaseView {
},
this
);
GButton.BandClick(
this._nodeTab.ENT_BEP,
() => {
this.onClickCoinType(proto.cs.EnmNetworkType.ENT_BEP);
},
this
);
GButton.BandClick(
this._nodeTab.ENT_ETH,
() => {
@@ -97,6 +95,13 @@ export class Web3PopPanel extends li_BaseView {
},
this
);
GButton.BandClick(
this._nodeTab.ENT_BEP,
() => {
this.onClickCoinType(proto.cs.EnmNetworkType.ENT_BEP);
},
this
);
}
refreshData(data: any): void {
@@ -105,7 +110,8 @@ export class Web3PopPanel extends li_BaseView {
this.goodId = data.goodId;
this.curType =
data.networkType != undefined ? data.networkType : this.curType;
this.base = data.base;
this.basePanel = data.basePanel;
this.payPanel = data.payPanel;
}
refreshView() {
const OrderData = DataManager.I.getDataById<OrderData>(DataId.Order);
@@ -127,8 +133,8 @@ export class Web3PopPanel extends li_BaseView {
if (expireTime > 0) {
this.startCountdown(expireTime);
} else {
this.expireTimeText.string = "已过期";
this.expireTimeText.color = new Color(128, 128, 128, 255);
this.expireTimeText.string = LanguageUtils.getText("web3panel.expired");
//this.expireTimeText.color = new Color(128, 128, 128, 255);
this.disableButtons();
}
this.amount.string = amount;
@@ -137,30 +143,46 @@ export class Web3PopPanel extends li_BaseView {
case proto.cs.EnmNetworkType.ENT_TRON:
ResManager.I.changeResourceSpriteFrame(
this.coinIcon,
"ui/web3pop/coinIcon/ENT_TRON"
"ui/web3pop/coinIcon/Tron"
);
this.coinText.string = "Tron(TRC20)";
this.tips.string = LanguageUtils.getText("web3panel.tips").replace(
"{Network}",
"Tron"
);
this.coinText.string = "ENT_TRON";
break;
case proto.cs.EnmNetworkType.ENT_TON:
ResManager.I.changeResourceSpriteFrame(
this.coinIcon,
"ui/web3pop/coinIcon/ENT_TON"
"ui/web3pop/coinIcon/TON"
);
this.coinText.string = "TON";
this.tips.string = LanguageUtils.getText("web3panel.tips").replace(
"{Network}",
"TON"
);
this.coinText.string = "ENT_TON";
break;
case proto.cs.EnmNetworkType.ENT_ETH:
ResManager.I.changeResourceSpriteFrame(
this.coinIcon,
"ui/web3pop/coinIcon/ENT_ETH"
"ui/web3pop/coinIcon/ETH"
);
this.coinText.string = "ETH";
this.tips.string = LanguageUtils.getText("web3panel.tips").replace(
"{Network}",
"ETH"
);
this.coinText.string = "ENT_ETH";
break;
case proto.cs.EnmNetworkType.ENT_BEP:
ResManager.I.changeResourceSpriteFrame(
this.coinIcon,
"ui/web3pop/coinIcon/ENT_BEP"
"ui/web3pop/coinIcon/BEP"
);
this.coinText.string = "BEP";
this.tips.string = LanguageUtils.getText("web3panel.tips").replace(
"{Network}",
"BEP"
);
this.coinText.string = "ENT_BEP";
break;
}
@@ -198,7 +220,11 @@ export class Web3PopPanel extends li_BaseView {
case proto.cs.EnmNetworkType.ENT_BEP:
break;
}
this.base.startPayment(this.goodId, proto.cs.EnmPayType.EPT_WEB3_USD, type);
this.payPanel.startPayment(
this.goodId,
proto.cs.EnmPayType.EPT_WEB3_USD,
type
);
this.selection.scale = new Vec3(1, 0, 1);
}
@@ -222,7 +248,7 @@ export class Web3PopPanel extends li_BaseView {
onClickClose() {
this.stopCountdown();
this.base.web3PopPanel = null;
this.payPanel.web3PopPanel = null;
this.close();
}
@@ -279,14 +305,15 @@ export class Web3PopPanel extends li_BaseView {
if (!this.expireTimeText) return;
const timeText = this.formatCountdownTime(this.remainingSeconds);
this.expireTimeText.string = timeText;
this.expireTimeText.string =
LanguageUtils.getText("web3panel.expire") + timeText;
if (this.remainingSeconds <= 30 && this.remainingSeconds > 0) {
this.expireTimeText.color = new Color(255, 0, 0, 255);
} else if (this.remainingSeconds <= 0) {
this.expireTimeText.color = new Color(128, 128, 128, 255);
} else {
this.expireTimeText.color = new Color(255, 255, 255, 255);
this.expireTimeText.color = new Color(255, 135, 247, 255);
}
}
@@ -329,6 +356,8 @@ export class Web3PopPanel extends li_BaseView {
private onCountdownExpired(): void {
logger.log("Web3支付倒计时已过期");
this.disableButtons();
TipsPanel.show("支付时间已过期,请重新发起支付");
this.expireTimeText.string = LanguageUtils.getText("web3panel.expired");
//TipsPanel.show("支付时间已过期,请重新发起支付");
}
}
File diff suppressed because it is too large Load Diff
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

@@ -2,7 +2,7 @@
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "a27de5e4-1840-40c4-ad05-2bc4b3f36c79",
"uuid": "4ac28fc0-5891-44b4-953c-8940d43379b0",
"files": [
".json",
".png"
@@ -10,14 +10,14 @@
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "a27de5e4-1840-40c4-ad05-2bc4b3f36c79@6c48a",
"displayName": "ENT_TON",
"uuid": "4ac28fc0-5891-44b4-953c-8940d43379b0@6c48a",
"displayName": "BEP",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "a27de5e4-1840-40c4-ad05-2bc4b3f36c79",
"imageUuidOrDatabaseUri": "4ac28fc0-5891-44b4-953c-8940d43379b0",
"isUuid": true,
"visible": false,
"minfilter": "linear",
@@ -34,8 +34,8 @@
},
"f9941": {
"importer": "sprite-frame",
"uuid": "a27de5e4-1840-40c4-ad05-2bc4b3f36c79@f9941",
"displayName": "ENT_TON",
"uuid": "4ac28fc0-5891-44b4-953c-8940d43379b0@f9941",
"displayName": "BEP",
"id": "f9941",
"name": "spriteFrame",
"userData": {
@@ -46,10 +46,10 @@
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 64,
"height": 71,
"rawWidth": 64,
"rawHeight": 71,
"width": 63,
"height": 63,
"rawWidth": 63,
"rawHeight": 63,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
@@ -61,17 +61,17 @@
"meshType": 0,
"vertices": {
"rawPosition": [
-32,
-35.5,
-31.5,
-31.5,
0,
32,
-35.5,
31.5,
-31.5,
0,
-32,
35.5,
-31.5,
31.5,
0,
32,
35.5,
31.5,
31.5,
0
],
"indexes": [
@@ -84,12 +84,12 @@
],
"uv": [
0,
71,
64,
71,
63,
63,
63,
0,
0,
64,
63,
0
],
"nuv": [
@@ -103,18 +103,18 @@
1
],
"minPos": [
-32,
-35.5,
-31.5,
-31.5,
0
],
"maxPos": [
32,
35.5,
31.5,
31.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "a27de5e4-1840-40c4-ad05-2bc4b3f36c79@6c48a",
"imageUuidOrDatabaseUri": "4ac28fc0-5891-44b4-953c-8940d43379b0@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
@@ -129,6 +129,6 @@
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "a27de5e4-1840-40c4-ad05-2bc4b3f36c79@6c48a"
"redirect": "4ac28fc0-5891-44b4-953c-8940d43379b0@6c48a"
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

@@ -2,7 +2,7 @@
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "51d2ab04-4a3e-4872-b41a-c3b752734c3c",
"uuid": "ecc0567a-892a-4356-914b-73c100168288",
"files": [
".json",
".png"
@@ -10,14 +10,14 @@
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "51d2ab04-4a3e-4872-b41a-c3b752734c3c@6c48a",
"displayName": "ENT_BEP",
"uuid": "ecc0567a-892a-4356-914b-73c100168288@6c48a",
"displayName": "ETH",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "51d2ab04-4a3e-4872-b41a-c3b752734c3c",
"imageUuidOrDatabaseUri": "ecc0567a-892a-4356-914b-73c100168288",
"isUuid": true,
"visible": false,
"minfilter": "linear",
@@ -34,8 +34,8 @@
},
"f9941": {
"importer": "sprite-frame",
"uuid": "51d2ab04-4a3e-4872-b41a-c3b752734c3c@f9941",
"displayName": "ENT_BEP",
"uuid": "ecc0567a-892a-4356-914b-73c100168288@f9941",
"displayName": "ETH",
"id": "f9941",
"name": "spriteFrame",
"userData": {
@@ -46,10 +46,10 @@
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 70,
"height": 70,
"rawWidth": 70,
"rawHeight": 70,
"width": 63,
"height": 63,
"rawWidth": 63,
"rawHeight": 63,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
@@ -61,17 +61,17 @@
"meshType": 0,
"vertices": {
"rawPosition": [
-35,
-35,
-31.5,
-31.5,
0,
35,
-35,
31.5,
-31.5,
0,
-35,
35,
-31.5,
31.5,
0,
35,
35,
31.5,
31.5,
0
],
"indexes": [
@@ -84,12 +84,12 @@
],
"uv": [
0,
70,
70,
70,
63,
63,
63,
0,
0,
70,
63,
0
],
"nuv": [
@@ -103,18 +103,18 @@
1
],
"minPos": [
-35,
-35,
-31.5,
-31.5,
0
],
"maxPos": [
35,
35,
31.5,
31.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "51d2ab04-4a3e-4872-b41a-c3b752734c3c@6c48a",
"imageUuidOrDatabaseUri": "ecc0567a-892a-4356-914b-73c100168288@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
@@ -129,6 +129,6 @@
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "51d2ab04-4a3e-4872-b41a-c3b752734c3c@6c48a"
"redirect": "ecc0567a-892a-4356-914b-73c100168288@6c48a"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

@@ -2,7 +2,7 @@
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "7def72e9-1d54-4c0a-8ddb-3c58c8564acf",
"uuid": "e7365632-f721-473c-b545-7e9d56140774",
"files": [
".json",
".png"
@@ -10,14 +10,14 @@
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "7def72e9-1d54-4c0a-8ddb-3c58c8564acf@6c48a",
"displayName": "ENT_ETH",
"uuid": "e7365632-f721-473c-b545-7e9d56140774@6c48a",
"displayName": "TON",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "7def72e9-1d54-4c0a-8ddb-3c58c8564acf",
"imageUuidOrDatabaseUri": "e7365632-f721-473c-b545-7e9d56140774",
"isUuid": true,
"visible": false,
"minfilter": "linear",
@@ -34,8 +34,8 @@
},
"f9941": {
"importer": "sprite-frame",
"uuid": "7def72e9-1d54-4c0a-8ddb-3c58c8564acf@f9941",
"displayName": "ENT_ETH",
"uuid": "e7365632-f721-473c-b545-7e9d56140774@f9941",
"displayName": "TON",
"id": "f9941",
"name": "spriteFrame",
"userData": {
@@ -46,10 +46,10 @@
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 67,
"height": 67,
"rawWidth": 67,
"rawHeight": 67,
"width": 63,
"height": 63,
"rawWidth": 63,
"rawHeight": 63,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
@@ -61,17 +61,17 @@
"meshType": 0,
"vertices": {
"rawPosition": [
-33.5,
-33.5,
-31.5,
-31.5,
0,
33.5,
-33.5,
31.5,
-31.5,
0,
-33.5,
33.5,
-31.5,
31.5,
0,
33.5,
33.5,
31.5,
31.5,
0
],
"indexes": [
@@ -84,12 +84,12 @@
],
"uv": [
0,
67,
67,
67,
63,
63,
63,
0,
0,
67,
63,
0
],
"nuv": [
@@ -103,18 +103,18 @@
1
],
"minPos": [
-33.5,
-33.5,
-31.5,
-31.5,
0
],
"maxPos": [
33.5,
33.5,
31.5,
31.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "7def72e9-1d54-4c0a-8ddb-3c58c8564acf@6c48a",
"imageUuidOrDatabaseUri": "e7365632-f721-473c-b545-7e9d56140774@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
@@ -129,6 +129,6 @@
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "7def72e9-1d54-4c0a-8ddb-3c58c8564acf@6c48a"
"redirect": "e7365632-f721-473c-b545-7e9d56140774@6c48a"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

@@ -2,7 +2,7 @@
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "49b048c9-5df5-441e-bab1-71e783a89c38",
"uuid": "5f727fd9-541b-4ec1-b0af-e8c589ef1fc9",
"files": [
".json",
".png"
@@ -10,14 +10,14 @@
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "49b048c9-5df5-441e-bab1-71e783a89c38@6c48a",
"displayName": "ENT_TRON",
"uuid": "5f727fd9-541b-4ec1-b0af-e8c589ef1fc9@6c48a",
"displayName": "Tron",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "49b048c9-5df5-441e-bab1-71e783a89c38",
"imageUuidOrDatabaseUri": "5f727fd9-541b-4ec1-b0af-e8c589ef1fc9",
"isUuid": true,
"visible": false,
"minfilter": "linear",
@@ -34,8 +34,8 @@
},
"f9941": {
"importer": "sprite-frame",
"uuid": "49b048c9-5df5-441e-bab1-71e783a89c38@f9941",
"displayName": "ENT_TRON",
"uuid": "5f727fd9-541b-4ec1-b0af-e8c589ef1fc9@f9941",
"displayName": "Tron",
"id": "f9941",
"name": "spriteFrame",
"userData": {
@@ -46,10 +46,10 @@
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 67,
"height": 67,
"rawWidth": 67,
"rawHeight": 67,
"width": 63,
"height": 63,
"rawWidth": 63,
"rawHeight": 63,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
@@ -61,17 +61,17 @@
"meshType": 0,
"vertices": {
"rawPosition": [
-33.5,
-33.5,
-31.5,
-31.5,
0,
33.5,
-33.5,
31.5,
-31.5,
0,
-33.5,
33.5,
-31.5,
31.5,
0,
33.5,
33.5,
31.5,
31.5,
0
],
"indexes": [
@@ -84,12 +84,12 @@
],
"uv": [
0,
67,
67,
67,
63,
63,
63,
0,
0,
67,
63,
0
],
"nuv": [
@@ -103,18 +103,18 @@
1
],
"minPos": [
-33.5,
-33.5,
-31.5,
-31.5,
0
],
"maxPos": [
33.5,
33.5,
31.5,
31.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "49b048c9-5df5-441e-bab1-71e783a89c38@6c48a",
"imageUuidOrDatabaseUri": "5f727fd9-541b-4ec1-b0af-e8c589ef1fc9@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
@@ -129,6 +129,6 @@
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "49b048c9-5df5-441e-bab1-71e783a89c38@6c48a"
"redirect": "5f727fd9-541b-4ec1-b0af-e8c589ef1fc9@6c48a"
}
}