找出下列代码的错误点 var store = me.Store_BPMDATA_AdmissionFee_M; var ids=[]; var grid = me.Grid_BPMDATA_AdmissionFee_M; var recs = grid.getSelectionModel().getSelection(); debugger; Ext.Msg.show( { title: '同步数据', //msg: '您确定要删除选中项吗?', buttons: Ext.Msg.OK, //buttons: Ext.Msg.OKCANCEL, defaultFocus: 'OK', //defaultFocus: 'cancel', //icon: Ext.MessageBox.INFO, fn: function (btn, text) { YZSoft.Ajax.request( { url: YZSoft.$url(me, 'YZModules/RenewalPayment.ashx'), method: 'POST', params: { method: 'ProcessRequest' }, jsonData: , success: function (action) { var rv = ""; debugger; store.reload(); }, failure: function (action) { var rv = action.result.errorMessage; Ext.Msg.alert("提示", "通知操作失败,请联系管理员!" + rv) } }); } });
时间: 2024-03-24 10:41:39 浏览: 108
错误代码显示
代码中有一个语法错误,即 `jsonData: ,` 这一行。应该在 `jsonData:` 后面加上一个空对象 `{}`,表示传递一个空的 JSON 对象。修改后的代码如下:
```javascript
var store = me.Store_BPMDATA_AdmissionFee_M;
var ids=[];
var grid = me.Grid_BPMDATA_AdmissionFee_M;
var recs = grid.getSelectionModel().getSelection();
debugger;
Ext.Msg.show({
title: '同步数据',
//msg: '您确定要删除选中项吗?',
buttons: Ext.Msg.OK,
//buttons: Ext.Msg.OKCANCEL,
defaultFocus: 'OK',
//defaultFocus: 'cancel',
//icon: Ext.MessageBox.INFO,
fn: function (btn, text) {
YZSoft.Ajax.request({
url: YZSoft.$url(me, 'YZModules/RenewalPayment.ashx'),
method: 'POST',
params: {
method: 'ProcessRequest'
},
jsonData: {}, // 修复语法错误
success: function (action) {
var rv = "";
debugger;
store.reload();
},
failure: function (action) {
var rv = action.result.errorMessage;
Ext.Msg.alert("提示", "通知操作失败,请联系管理员!" + rv)
}
});
}
});
```
阅读全文