diff --git a/json/discount_marketing_list.json b/json/discount_marketing_list.json index f455e3d..fa6fe4c 100644 --- a/json/discount_marketing_list.json +++ b/json/discount_marketing_list.json @@ -78,7 +78,7 @@ "wid": "self", "event": "gen_promo", "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));})();" + "script": "(function(){var id='${id}$';if(!id||id==='${id}$'){alert('未获取到方案ID,请先选中一行。');return;}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')}}",