From 4f05c285a11d32caa924508bd55eba29a7d621a5 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Wed, 24 Jun 2026 21:37:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0init=20bind=E4=BC=A0?= =?UTF-8?q?=E9=80=92discountid=EF=BC=8Cdspy=E6=B7=BB=E5=8A=A0early=20debug?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wwwroot/discount_setting/get_products_with_discount.dspy | 1 + wwwroot/discount_setting/index.ui | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/wwwroot/discount_setting/get_products_with_discount.dspy b/wwwroot/discount_setting/get_products_with_discount.dspy index 5c960e6..8fabdcd 100644 --- a/wwwroot/discount_setting/get_products_with_discount.dspy +++ b/wwwroot/discount_setting/get_products_with_discount.dspy @@ -2,6 +2,7 @@ # 参数: discountid (必需) discountid = params_kw.get('discountid') +debug(f'get_products_with_discount called: params_kw keys={list(params_kw.keys())}, discountid={discountid}') if not discountid: return {"total": 0, "rows": []} diff --git a/wwwroot/discount_setting/index.ui b/wwwroot/discount_setting/index.ui index 6c5f5a1..e5a573f 100644 --- a/wwwroot/discount_setting/index.ui +++ b/wwwroot/discount_setting/index.ui @@ -67,5 +67,14 @@ } ] } + ], + "binds": [ + { + "wid": "self", + "event": "init", + "actiontype": "script", + "target": "product_discount_tbl", + "script": "var discountid = new URLSearchParams(window.location.search).get('discountid') || ''; if (discountid) { await this.render({discountid: discountid}); }" + } ] }