From 26efde3051b782b10226890bab51ca0a334d5943 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sun, 5 Jul 2026 10:58:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20promote=E9=A1=B5=E7=A7=BB=E5=88=B0RBAC?= =?UTF-8?q?=20any=E8=A7=92=E8=89=B2(=E6=97=A0=E9=9C=80=E7=99=BB=E5=BD=95)?= =?UTF-8?q?=EF=BC=8C=E5=AE=A2=E6=88=B7=E6=89=AB=E7=A0=81=E5=8F=AF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/load_path.py | 6 +++++- wwwroot/promote.dspy | 3 --- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/load_path.py b/scripts/load_path.py index 5f0a8a7..f79013f 100644 --- a/scripts/load_path.py +++ b/scripts/load_path.py @@ -91,10 +91,14 @@ print(f"Found {len(crud_defs)} CRUD definitions in {JSON_DIR}") for d in crud_defs: print(f" - {d['tblname']} (alias: {d['alias']})") -# any — 无需登录(菜单、CRUD别名目录) +# any — 无需登录(菜单、CRUD别名目录、促销页) PATHS_ANY = [ f"/{MOD}/menu.ui", f"/{MOD}/discount_setting", + # 促销页:客户扫码用,无需登录 + f"/{MOD}/promote", + f"/{MOD}/promote.dspy", + f"/{MOD}/generate_qr.dspy", ] # 每个 CRUD 定义 → any 别名目录 + logined 页面和脚本 diff --git a/wwwroot/promote.dspy b/wwwroot/promote.dspy index 8d21b86..9e49000 100644 --- a/wwwroot/promote.dspy +++ b/wwwroot/promote.dspy @@ -1,7 +1,4 @@ # Customer promote page - scan QR code to claim discount -from ahserver.serverenv import ServerEnv - -env = ServerEnv() code = params_kw.get('code', '') result = {