|
|
@@ -14,12 +14,14 @@ var enterpriseList = [];
|
|
|
* 获取企业列表
|
|
|
*/
|
|
|
function getEnterpriseList(count, page, keyword) {
|
|
|
+ $('#loadingDiv').show();
|
|
|
enterpriseList = [];
|
|
|
$.get('enterprise/list', {
|
|
|
count: count,
|
|
|
page: page,
|
|
|
keyword: keyword
|
|
|
}, function (data) {
|
|
|
+ $('#loadingDiv').hide();
|
|
|
enterpriseList = data.content;
|
|
|
var pageNumber = data.number;
|
|
|
var pageSzie = data.size;
|
|
|
@@ -39,26 +41,6 @@ function getEnterpriseList(count, page, keyword) {
|
|
|
});
|
|
|
})(i)
|
|
|
}
|
|
|
- $('#m-page').pagination({
|
|
|
- pageCount: totalPage,
|
|
|
- totalData: total,
|
|
|
- current: pageNumber,
|
|
|
- showData: pageSzie,
|
|
|
- coping: true,
|
|
|
- homePage: '首页',
|
|
|
- endPage: '末页',
|
|
|
- prevContent: '<<',
|
|
|
- nextContent: '>>',
|
|
|
- jump: true,
|
|
|
- jumpBtn: '跳转',
|
|
|
- callback: function (api) {
|
|
|
- $('.now').text(api.getCurrent());
|
|
|
- $("#enterprise-body").load(location.href + " #enterprise-body");
|
|
|
- getEnterpriseList(count, api.getCurrent(), $('#keyword').val());
|
|
|
- },
|
|
|
- }, function (api) {
|
|
|
- $('.now').text(api.getCurrent());
|
|
|
- });
|
|
|
|
|
|
// 点击搜索
|
|
|
$('#p_search').unbind('click').click(function () {// 每次先解除上次绑定的事件,防止重复发送请求
|
|
|
@@ -75,6 +57,26 @@ function getEnterpriseList(count, page, keyword) {
|
|
|
}
|
|
|
};
|
|
|
}
|
|
|
+ $('#m-page').pagination({
|
|
|
+ pageCount: totalPage,
|
|
|
+ totalData: total,
|
|
|
+ current: pageNumber,
|
|
|
+ showData: pageSzie,
|
|
|
+ coping: true,
|
|
|
+ homePage: '首页',
|
|
|
+ endPage: '末页',
|
|
|
+ prevContent: '<<',
|
|
|
+ nextContent: '>>',
|
|
|
+ jump: true,
|
|
|
+ jumpBtn: '跳转',
|
|
|
+ callback: function (api) {
|
|
|
+ $('.now').text(api.getCurrent());
|
|
|
+ $("#enterprise-body").load(location.href + " #enterprise-body");
|
|
|
+ getEnterpriseList(count, api.getCurrent(), $('#keyword').val());
|
|
|
+ }
|
|
|
+ }, function (api) {
|
|
|
+ $('.now').text(api.getCurrent());
|
|
|
+ });
|
|
|
})
|
|
|
}
|
|
|
|