...
|
...
|
@@ -115,25 +115,29 @@ toast.prototype.tabTreeHelper = function (tabTree, sort) { |
|
|
* @returns {number}
|
|
|
*/
|
|
|
toast.prototype.pageHelper = function () {
|
|
|
var url = window.location.href.split('?')[0];
|
|
|
var params = url.split('#');
|
|
|
if (params.length <= 1) {
|
|
|
return 1;
|
|
|
}
|
|
|
|
|
|
var page = 1;
|
|
|
$.each(params, function (index) {
|
|
|
var param_split = params[index].split('=');
|
|
|
if (param_split.length > 1 && param_split[0].toLowerCase() == "page") {
|
|
|
page = Number.parseInt(param_split[1]);
|
|
|
return false;
|
|
|
}
|
|
|
})
|
|
|
if (location.hash.search(/page=(\d+)/g) > -1) {
|
|
|
page = /page=(\d+)/g.exec(location.hash)[1];
|
|
|
}
|
|
|
|
|
|
return page;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取url上配置的pageSize参数,如果没有则返回1
|
|
|
* pageSize 平台端全部默认10条
|
|
|
* @returns {number}
|
|
|
*/
|
|
|
toast.prototype.pageSizeHelper = function (g) {
|
|
|
var pageSize = 10;
|
|
|
if (location.hash.search(/size=(\d+)/g) > -1) {
|
|
|
pageSize = /size=(\d+)/g.exec(location.hash)[1];
|
|
|
}
|
|
|
|
|
|
return pageSize;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取url上的查询串,通过数据返回
|
|
|
* @returns 包含所有查询参数的对象,可以通过returnValue["xxx"]方式获取
|
|
|
*/
|
...
|
...
|
|