<?xml version="1.0" encoding="UTF-8"?> <!-- $Author: syj $Date: 2016年3月3日14:49:39 $Revision: 1.0 $Purpose: --> <a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true"> <a:init-procedure><![CDATA[ ]]></a:init-procedure> <a:view> <a:dataSets> <a:dataSet id="send_message_ds" fetchAll="true" loadData="true" model="hls_weixin.wx_send_message_query"><![CDATA[ ]]></a:dataSet> </a:dataSets> <a:screenBody><![CDATA[ ]]></a:screenBody> <script type="text/javascript"><![CDATA[ function send_message() { var ds = $('send_message_ds'); var length = ds.getAll().length; var param; for (var i = 0;i < length;i++) { record = ds.getAt(i); param = { 'touser': record.get('touser'), 'title': record.get('title'), 'msg_body': record.get('msg_body') }; } /* Leaf.request({ url: 'wx_push_message.lsc', para: param, success: function success(data) {}, failure: function() { }, error: function() { }, scope: this }); */ Ext.Ajax.request({ url: 'http://songyongjian.imwork.net/wx/send_message.lsc', params: { _request_data: Ext.util.JSON.encode({ parameter: param }) }, failure: function(e) { // failFunction(); }, success: function(res) { //successFunction(res); } }); } send_message(); ]]></script> </a:view> </a:screen>