补充前端小模块说明注释
This commit is contained in:
@@ -9,6 +9,7 @@ let shopControlEventsBound = false;
|
||||
* @returns {void}
|
||||
*/
|
||||
function callShopGlobal(functionName) {
|
||||
// 商店主体逻辑仍在 Blade 全局函数内,这里只把 data 事件桥接到旧函数。
|
||||
if (typeof window[functionName] === "function") {
|
||||
window[functionName]();
|
||||
}
|
||||
@@ -30,12 +31,14 @@ export function bindShopControls() {
|
||||
return;
|
||||
}
|
||||
|
||||
// 商店弹窗关闭入口与遮罩关闭逻辑保持同一个旧函数。
|
||||
if (event.target.closest("[data-shop-modal-close]")) {
|
||||
event.preventDefault();
|
||||
callShopGlobal("closeShopModal");
|
||||
return;
|
||||
}
|
||||
|
||||
// 改名确认/取消只转发按钮意图,接口请求仍由 Blade 内的 submitRename 处理。
|
||||
if (event.target.closest("[data-shop-rename-confirm]")) {
|
||||
event.preventDefault();
|
||||
callShopGlobal("submitRename");
|
||||
@@ -48,6 +51,7 @@ export function bindShopControls() {
|
||||
return;
|
||||
}
|
||||
|
||||
// 赠礼确认/取消对应单次特效卡流程,先保留旧的弹窗状态管理函数。
|
||||
if (event.target.closest("[data-shop-gift-confirm]")) {
|
||||
event.preventDefault();
|
||||
callShopGlobal("confirmGift");
|
||||
|
||||
Reference in New Issue
Block a user