Ext点击上下页面时,需要绑定当前查询的条件

var store = this.getStore();

//先删除先前的参数

for (var key in store.baseParams) {

if (key && key.indexOf('userId') != -1) {

delete store.baseParams[key];

}

if (key && key.indexOf('ipArea') != -1) {

delete store.baseParams[key];

}

if (key && key.indexOf('mobileBrandId') != -1) {

delete store.baseParams[key];

}

if (key && key.indexOf('cityId') != -1) {

delete store.baseParams[key];

}

if (key && key.indexOf('startTime') != -1) {

delete store.baseParams[key];

}

if (key && key.indexOf('endTime') != -1) {

delete store.baseParams[key];

}

}

// 绑定查询参数到store,否则点击分页时会出现无参数情况,会导致下一页的信息结果有误

if (userId)

store.setBaseParam('userId', userId);

if (ipArea)

store.setBaseParam('ipArea', ipArea);

if (endTime)

store.setBaseParam('endTime', endTime);

if (cityId)

store.setBaseParam('cityId', cityId);

if (startTime)

store.setBaseParam('startTime', startTime);

if (mobileBrandId)

store.setBaseParam('mobileBrandId', mobileBrandId);

你可能感兴趣的:(Ext,ext,delete)