工作中用到了Extjs,从后台获取数据的时候,用到了extjs自己的Ext.data.store方法,然后封装了ExtGridReturn方法,
目的:前台用到Ext.data.store读取从后台传过来的数据,后台封装成ExtGridReturn类型
前台如下:
this.store = new Ext.data.Store({
remoteSort:true,
baseParams:{
start:0,
limit:this.pageSize
},
proxy:new Ext.data.HttpProxy({
method:'POST',
url:this.getAllUrl
}),
reader:new Ext.data.JsonReader({
totalProperty:'results',
root:'rows'
},['rulesId','rulesTitle','rulesContent','rulesType','updateUser',{
name:'updateTime',
type:'date',
dateFormat:'time'
},'rulesAuthor','isTop',{
name:'createTime',
type:'date',