Commit f4a14f7f authored by haiyoucuv's avatar haiyoucuv

上传

parent 685aa7ab
import { sendWebNet, WebNetName } from "./Utils/WebNet/WebNet"; import { sendWebNet, WebNetName } from "./Utils/WebNet/WebNet";
import { changeScene, hideWaiting, showPanel, showWaiting } from "db://assets/Module/UIFast"; import { changeScene, hideWaiting, showPanel, showToast, showWaiting } from "db://assets/Module/UIFast";
import { AESDecrypt, AESEncrypt } from "./Utils/Crypto"; import { AESDecrypt, AESEncrypt } from "./Utils/Crypto";
import store from "./store/store"; import store from "./store/store";
import { HomeScene } from "./Scenes/HomeScene"; import { HomeScene } from "./Scenes/HomeScene";
...@@ -72,25 +72,42 @@ export default class GameMgr { ...@@ -72,25 +72,42 @@ export default class GameMgr {
hideWaiting(); hideWaiting();
if (!success) { if (!success) {
// changeScene(HomeScene); changeScene(HomeScene);
showPanel(NoPrizePanel, {
highest: score,
score,
isError: true,
});
return false; return false;
} }
const panelData = { if (data.thirdCode && +data.thirdCode != 10000) {
prizeVO: data?.prizeVO, if (+data.thirdCode == 10001) {
highest: data?.historyMaxScore || 0, showPanel(NoPrizePanel, {
score, highest: score,
} score,
if (data?.prizeVO) { errorMsg: "There are too many people currently.\n" +
showPanel(PrizePanel, panelData); "You can check the coupon pack later\n" +
"to see if you won.",
});
} else if (+data.thirdCode == 10002) {
showPanel(NoPrizePanel, {
highest: score,
score,
errorMsg: "System exception.\n" +
"You can check the coupon pack later\n" +
"to see if you won.",
});
} else {
showToast(data.thirdMsg);
changeScene(HomeScene);
}
} else { } else {
showPanel(NoPrizePanel, panelData); const panelData = {
prizeVO: data?.prizeVO,
highest: data?.historyMaxScore || 0,
score,
}
if (data?.prizeVO) {
showPanel(PrizePanel, panelData);
} else {
showPanel(NoPrizePanel, panelData);
}
} }
} }
......
...@@ -21,6 +21,7 @@ export default class NoPrizePanel extends Panel { ...@@ -21,6 +21,7 @@ export default class NoPrizePanel extends Panel {
@property(Node) box: Node = null; @property(Node) box: Node = null;
@property(Node) errorTip: Node = null; @property(Node) errorTip: Node = null;
@property(Node) errorTip2: Node = null;
onLoad() { onLoad() {
...@@ -30,13 +31,14 @@ export default class NoPrizePanel extends Panel { ...@@ -30,13 +31,14 @@ export default class NoPrizePanel extends Panel {
} }
async start() { async start() {
const {highest, score, isError} = this.data; const {highest, score, errorMsg} = this.data;
this.highestLabel.string = highest; this.highestLabel.string = highest;
this.scoreLabel.string = score; this.scoreLabel.string = score;
this.box.active = !isError; this.box.active = !errorMsg;
this.errorTip.active = isError; this.errorTip.active = errorMsg;
this.errorTip.getComponent(Label).string = this.data.errorMsg;
} }
clickRank = () => { clickRank = () => {
......
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
"_prefab": null, "_prefab": null,
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 375.00000000000006, "x": 375,
"y": 812, "y": 812,
"z": 0 "z": 0
}, },
...@@ -961,7 +961,7 @@ ...@@ -961,7 +961,7 @@
"__prefab": null, "__prefab": null,
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 749.9999999999999, "width": 749.9999999999998,
"height": 1624 "height": 1624
}, },
"_anchorPoint": { "_anchorPoint": {
......
...@@ -1895,6 +1895,7 @@ ...@@ -1895,6 +1895,7 @@
"errorTip": { "errorTip": {
"__id__": 68 "__id__": 68
}, },
"errorTip2": null,
"_id": "" "_id": ""
}, },
{ {
......
...@@ -7,7 +7,9 @@ ...@@ -7,7 +7,9 @@
"optionName": "optionName", "optionName": "optionName",
"optionImg": "optionImg" "optionImg": "optionImg"
}, },
"historyMaxScore": 9999 "historyMaxScore": 9999,
"thirdCode": 10002,
"thirdMsg": "thirdMsg"
}, },
"timestamp": 1724379274542 "timestamp": 1724379274542
} }
\ No newline at end of file
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