From 9dbb44fbd96365e82eba4f713daef30b556adf39 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Wed, 5 Aug 2026 17:53:59 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=94=9F=E6=88=90=E4=BF=83=E9=94=80?= =?UTF-8?q?=E7=A0=81=E6=94=B9=E7=94=A8script+fetch=20POST=E4=BC=A0?= =?UTF-8?q?=E5=8F=82=EF=BC=8C=E7=BB=95=E8=BF=87urlwidget/PopupWindow?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E4=BC=A0=E9=80=92=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- json/discount_marketing_list.json | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/json/discount_marketing_list.json b/json/discount_marketing_list.json index 7a179ec..f455e3d 100644 --- a/json/discount_marketing_list.json +++ b/json/discount_marketing_list.json @@ -77,22 +77,8 @@ { "wid": "self", "event": "gen_promo", - "actiontype": "urlwidget", - "target": "PopupWindow", - "popup_options": { - "title": "生成促销码", - "cwidth": 16, - "cheight": 10 - }, - "params_mapping": { - "mapping": { - "id": "marketing_id" - }, - "need_other": false - }, - "options": { - "url": "{{entire_url('../api/gen_promo_from_mkt.dspy')}}" - } + "actiontype": "script", + "script": "(function(){var id='${id}$';var x=new XMLHttpRequest();x.open('POST','{{entire_url('../api/gen_promo_from_mkt.dspy')}}',true);x.setRequestHeader('Content-Type','application/x-www-form-urlencoded');x.onload=function(){try{var d=JSON.parse(x.responseText);if(d.widgettype==='Message'){var m=new bricks.Message(d.options);m.show();}else{alert(d.options.message||x.responseText);}}catch(e){alert(x.responseText);}};x.send('marketing_id='+encodeURIComponent(id));})();" } ], "new_data_url": "{{entire_url('/discount/api/marketing_create.dspy')}}", @@ -100,4 +86,4 @@ "delete_data_url": "{{entire_url('/discount/api/marketing_delete.dspy')}}", "logined_userorgid": "resellerid" } -} \ No newline at end of file +}