Bas*_*der 7 extjs sencha-touch
在sencha-touch上,这是我的商店声明
Ext.regStore('newsStore', {
model: 'News',
autoLoad: true,
proxy: {
type: 'ajax',
url: '../news/list.form?format=json',
reader: {
type: 'json',
root: ''
}
},
});
Run Code Online (Sandbox Code Playgroud)
我怎样才能修改params?我试过了
params:{ format: 'json'}
Run Code Online (Sandbox Code Playgroud)
但它不起作用!
meh*_*595 11
商店声明
new Ext.data.Store({
model:'prj.models.ContactInfo',
storeId:'contactInfoId',
proxy:{
type:'ajax',
url:'/GetContactInfoByID',
reader:{
type:'json'
},
extraParams:{
format:'json'
},
listeners:{
exception:function(proxy, response, orientation){
console.error('Failure Notification', response.responseText);
Ext.Msg.alert('Loading failed', response.statusText);
}
}
}
});
Run Code Online (Sandbox Code Playgroud)
将params添加到代理并读取ajax存储
prj.stores.contactInfoId.getProxy().extraParams.partyID = options.partyID;
prj.stores.contactInfoId.getProxy().extraParams.eventName = options.eventName;
prj.stores.contactInfoId.read();
Run Code Online (Sandbox Code Playgroud)
希望这可以帮助.
| 归档时间: |
|
| 查看次数: |
18402 次 |
| 最近记录: |