From 5532cdf8c236e3aa9a13dee205201dbcd3a842fb Mon Sep 17 00:00:00 2001 From: TJH Date: Mon, 6 Jul 2026 14:52:31 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=80=E5=87=BA=E6=B8=B8=E6=88=8F=E5=90=8E?= =?UTF-8?q?=E6=89=93=E5=BC=80from=E4=BB=A3=E8=A1=A8=E7=9A=84=E7=BD=91?= =?UTF-8?q?=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/Game/Scripts/SlotBar.ts | 15 +- assets/Game/SlotScene.prefab | 320 +++++++++++++++++++++++-------- assets/Main/Scripts/main/comm.ts | 10 + 3 files changed, 260 insertions(+), 85 deletions(-) diff --git a/assets/Game/Scripts/SlotBar.ts b/assets/Game/Scripts/SlotBar.ts index e9f6e78..2d48d16 100644 --- a/assets/Game/Scripts/SlotBar.ts +++ b/assets/Game/Scripts/SlotBar.ts @@ -1,6 +1,6 @@ import { _decorator, Animation, Button, Component, Label, Node, sp, Sprite, tween, Tween, UIOpacity, Vec3, } from "cc"; import { SLOT_BAR_EVENT } from "./Define"; -import { callGameBalanceApi, getGameId, gold2cash } from "../../Main/Scripts/main/comm"; +import { callGameBalanceApi, getFrom, getGameId, gold2cash } from "../../Main/Scripts/main/comm"; import { AudioManager } from "../../Main/Scripts/managers/AudioManager"; import { GameDataManager } from "../../Main/Scripts/managers/GameDataManager"; import { I18nManager } from "../../Main/Scripts/managers/I18nManager"; @@ -42,6 +42,10 @@ export class SlotBar extends Component { @property({ type: [BtnConfig] }) btnTable: BtnConfig[] = []; + //全局遮罩 + @property(Node) + gray: Node = null + hasClickSpin: boolean = false; hasClickManualStop: boolean = false; private isFastSpin: boolean = false; @@ -517,7 +521,14 @@ export class SlotBar extends Component { false, null, () => { - window.close(); + let from = getFrom() + console.log('from', from) + if (!from || from == "") { + window.close() + } else { + this.gray.active = true + location.replace(from) + } }, I18nManager.instance.t("AID_QUIT_LEFT_BUTTON"), I18nManager.instance.t("AID_ERROR_QUIT_BUTTON") diff --git a/assets/Game/SlotScene.prefab b/assets/Game/SlotScene.prefab index 5a2cb24..f0010ac 100644 --- a/assets/Game/SlotScene.prefab +++ b/assets/Game/SlotScene.prefab @@ -25,26 +25,29 @@ "__id__": 650 }, { - "__id__": 1160 + "__id__": 1168 }, { - "__id__": 1179 + "__id__": 1187 + }, + { + "__id__": 1159 } ], "_active": true, "_components": [ { - "__id__": 1194 + "__id__": 1202 }, { - "__id__": 1196 + "__id__": 1204 }, { - "__id__": 1198 + "__id__": 1206 } ], "_prefab": { - "__id__": 1200 + "__id__": 1208 }, "_lpos": { "__type__": "cc.Vec3", @@ -13442,7 +13445,7 @@ } ], "_prefab": { - "__id__": 1159 + "__id__": 1167 }, "_lpos": { "__type__": "cc.Vec3", @@ -24658,6 +24661,9 @@ "__id__": 1158 } ], + "gray": { + "__id__": 1159 + }, "_id": "" }, { @@ -24762,6 +24768,154 @@ "__id__": 848 } }, + { + "__type__": "cc.Node", + "_name": "gray", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 1160 + }, + { + "__id__": 1162 + }, + { + "__id__": 1164 + } + ], + "_prefab": { + "__id__": 1166 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_lrot": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + }, + "_lscale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "_mobility": 0, + "_layer": 1073741824, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1159 + }, + "_enabled": true, + "__prefab": { + "__id__": 1161 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 1080, + "height": 1920 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "c20f2wemRDoIkJDo7pmASN" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1159 + }, + "_enabled": true, + "__prefab": { + "__id__": 1163 + }, + "_alignFlags": 45, + "_target": null, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 100, + "_originalHeight": 100, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "ecL5kURzRGhZgR14QRz3X1" + }, + { + "__type__": "cc.BlockInputEvents", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 1159 + }, + "_enabled": true, + "__prefab": { + "__id__": 1165 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "69ZyVNQ8hFApTYUjCcNSBZ" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "3b6GzPsepH9aODFEhu4pgl", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, { "__type__": "cc.PrefabInfo", "root": { @@ -24782,14 +24936,14 @@ "__id__": 1 }, "_prefab": { - "__id__": 1161 + "__id__": 1169 }, "__editorExtras__": {} }, { "__type__": "cc.PrefabInfo", "root": { - "__id__": 1160 + "__id__": 1168 }, "asset": { "__uuid__": "29fb0a1e-a12f-4c41-9000-815327a25730", @@ -24797,7 +24951,7 @@ }, "fileId": "c9QEC2alVDUrRXVFfYng3l", "instance": { - "__id__": 1162 + "__id__": 1170 }, "targetOverrides": null }, @@ -24810,35 +24964,35 @@ "mountedChildren": [], "mountedComponents": [], "propertyOverrides": [ - { - "__id__": 1163 - }, - { - "__id__": 1165 - }, - { - "__id__": 1166 - }, - { - "__id__": 1167 - }, - { - "__id__": 1168 - }, - { - "__id__": 1169 - }, { "__id__": 1171 }, { "__id__": 1173 }, + { + "__id__": 1174 + }, { "__id__": 1175 }, + { + "__id__": 1176 + }, { "__id__": 1177 + }, + { + "__id__": 1179 + }, + { + "__id__": 1181 + }, + { + "__id__": 1183 + }, + { + "__id__": 1185 } ], "removedComponents": [] @@ -24846,7 +25000,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 1164 + "__id__": 1172 }, "propertyPath": [ "_name" @@ -24862,7 +25016,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 1164 + "__id__": 1172 }, "propertyPath": [ "_lpos" @@ -24877,7 +25031,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 1164 + "__id__": 1172 }, "propertyPath": [ "_lrot" @@ -24893,7 +25047,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 1164 + "__id__": 1172 }, "propertyPath": [ "_euler" @@ -24908,7 +25062,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 1164 + "__id__": 1172 }, "propertyPath": [ "_active" @@ -24918,7 +25072,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 1170 + "__id__": 1178 }, "propertyPath": [ "_active" @@ -24934,7 +25088,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 1172 + "__id__": 1180 }, "propertyPath": [ "_active" @@ -24950,7 +25104,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 1174 + "__id__": 1182 }, "propertyPath": [ "_active" @@ -24966,7 +25120,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 1176 + "__id__": 1184 }, "propertyPath": [ "_contentSize" @@ -24986,7 +25140,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 1178 + "__id__": 1186 }, "propertyPath": [ "_active" @@ -25006,14 +25160,14 @@ "__id__": 1 }, "_prefab": { - "__id__": 1180 + "__id__": 1188 }, "__editorExtras__": {} }, { "__type__": "cc.PrefabInfo", "root": { - "__id__": 1179 + "__id__": 1187 }, "asset": { "__uuid__": "93f49f19-92c8-468b-a67d-b423f3be55f9", @@ -25021,7 +25175,7 @@ }, "fileId": "0d6YCKuIdEs4y/XDNnFU5x", "instance": { - "__id__": 1181 + "__id__": 1189 }, "targetOverrides": [] }, @@ -25034,29 +25188,29 @@ "mountedChildren": [], "mountedComponents": [], "propertyOverrides": [ - { - "__id__": 1182 - }, - { - "__id__": 1184 - }, - { - "__id__": 1185 - }, - { - "__id__": 1186 - }, - { - "__id__": 1187 - }, - { - "__id__": 1188 - }, { "__id__": 1190 }, { "__id__": 1192 + }, + { + "__id__": 1193 + }, + { + "__id__": 1194 + }, + { + "__id__": 1195 + }, + { + "__id__": 1196 + }, + { + "__id__": 1198 + }, + { + "__id__": 1200 } ], "removedComponents": [] @@ -25064,7 +25218,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 1183 + "__id__": 1191 }, "propertyPath": [ "_name" @@ -25080,7 +25234,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 1183 + "__id__": 1191 }, "propertyPath": [ "_lpos" @@ -25095,7 +25249,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 1183 + "__id__": 1191 }, "propertyPath": [ "_lrot" @@ -25111,7 +25265,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 1183 + "__id__": 1191 }, "propertyPath": [ "_euler" @@ -25126,7 +25280,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 1183 + "__id__": 1191 }, "propertyPath": [ "_active" @@ -25136,7 +25290,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 1189 + "__id__": 1197 }, "propertyPath": [ "_active" @@ -25152,7 +25306,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 1191 + "__id__": 1199 }, "propertyPath": [ "_active" @@ -25168,7 +25322,7 @@ { "__type__": "CCPropertyOverrideInfo", "targetInfo": { - "__id__": 1193 + "__id__": 1201 }, "propertyPath": [ "_contentSize" @@ -25195,7 +25349,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 1195 + "__id__": 1203 }, "_contentSize": { "__type__": "cc.Size", @@ -25223,7 +25377,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 1197 + "__id__": 1205 }, "_alignFlags": 45, "_target": null, @@ -25259,7 +25413,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 1199 + "__id__": 1207 }, "slotGame": { "__id__": 647 @@ -25290,21 +25444,21 @@ "instance": null, "targetOverrides": [ { - "__id__": 1201 + "__id__": 1209 }, { - "__id__": 1203 + "__id__": 1211 }, { - "__id__": 1205 + "__id__": 1213 } ], "nestedPrefabInstanceRoots": [ { - "__id__": 1179 + "__id__": 1187 }, { - "__id__": 1160 + "__id__": 1168 }, { "__id__": 833 @@ -25412,10 +25566,10 @@ "sysGift" ], "target": { - "__id__": 1160 + "__id__": 1168 }, "targetInfo": { - "__id__": 1202 + "__id__": 1210 } }, { @@ -25427,17 +25581,17 @@ { "__type__": "cc.TargetOverrideInfo", "source": { - "__id__": 1198 + "__id__": 1206 }, "sourceInfo": null, "propertyPath": [ "sysGift" ], "target": { - "__id__": 1160 + "__id__": 1168 }, "targetInfo": { - "__id__": 1204 + "__id__": 1212 } }, { @@ -25449,17 +25603,17 @@ { "__type__": "cc.TargetOverrideInfo", "source": { - "__id__": 1198 + "__id__": 1206 }, "sourceInfo": null, "propertyPath": [ "slotRanking" ], "target": { - "__id__": 1179 + "__id__": 1187 }, "targetInfo": { - "__id__": 1206 + "__id__": 1214 } }, { diff --git a/assets/Main/Scripts/main/comm.ts b/assets/Main/Scripts/main/comm.ts index e58b9f7..02e0ef2 100644 --- a/assets/Main/Scripts/main/comm.ts +++ b/assets/Main/Scripts/main/comm.ts @@ -16,6 +16,7 @@ let supportUrl = "" let oddsUrl = "" let historyUrl = "" let isRB7 = false; +let from = ""; export function getOddsUrl() { return oddsUrl; @@ -40,6 +41,10 @@ export function getIsRB7() { return isRB7; } +export function getFrom() { + return from; +} + export function getCsymbol() { return csymbol; } @@ -86,6 +91,11 @@ export function initReqAddr() { currency = c } + const fr = qs.get("from"); + if (fr) { + from = fr + } + const brand = qs.get("brand") if (brand == 'rb7') { isRB7 = brand == 'rb7';