|
@@ -13,8 +13,8 @@ $(function(){
|
|
|
|
|
|
var theKeyword,pageSize,Province;
|
|
|
var thePageNo = 1,
|
|
|
- thePageLength = 1,
|
|
|
- pageSize = 6;
|
|
|
+ thePageLength = 1,
|
|
|
+ pageSize = 6;
|
|
|
function loadDate(pageNo) {
|
|
|
$.ajax({
|
|
|
method: "get",
|
|
@@ -28,30 +28,25 @@ $(function(){
|
|
|
},
|
|
|
success: function (data) {
|
|
|
var theArr = [];
|
|
|
- var pages=data.data.totalCount%6;
|
|
|
- var paget=data.data.totalCount/6;
|
|
|
- var page=1;
|
|
|
- if(data.data.totalCount<6||data.data.totalCount==null){
|
|
|
- page=1
|
|
|
- }else{
|
|
|
- page=pages=0?paget:Math.floor(paget)+1;
|
|
|
- }
|
|
|
- if (data.data && data.data.list) {
|
|
|
+ thePageLength = data.data.totalCount ? Math.ceil(data.data.totalCount / pageSize) : 1;
|
|
|
+ if (data.data && data.data.list) {
|
|
|
for (let i = 0; i < data.data.list.length; i++) {
|
|
|
- let thisdata = data.data.list[i];
|
|
|
+ let thisdata = data.data.list[i];
|
|
|
theArr.push([
|
|
|
- '<li value="'+thisdata+'">',
|
|
|
- '<img src="' + globalConfig.avatarHost + '/upload' + thisdata.publicityPictureUrl + '" alt="行业" />',
|
|
|
+ '<li value="'+thisdata.id+'">',
|
|
|
+ '<img src="' + globalConfig.avatarHost + '/upload' + thisdata.publicityPictureUrl+'"/>',
|
|
|
'<p>' + thisdata.companyName + '</p>',
|
|
|
'<a href="">MORE+</a>',
|
|
|
'</li>',
|
|
|
].join(''));
|
|
|
- };
|
|
|
+ };
|
|
|
};
|
|
|
- $('.invest_right ul').empty();
|
|
|
- $('.invest_right ul').append(theArr.join(''));
|
|
|
- $('.totalCount').html("共 "+ page +" 页 " + data.data.totalCount + " 条数据");
|
|
|
- thePageLength = data.data.totalCount ? Math.ceil(data.data.totalCount / pageSize) : 1;
|
|
|
+ $('.invest_imglist ul').empty();
|
|
|
+ $('.invest_imglist ul').append(theArr.join(''));
|
|
|
+ if(data.data.list.length===0){
|
|
|
+ $('.invest_imglist ul').html('<li>敬请期待…<li>')
|
|
|
+ }
|
|
|
+ $('.totalCount').html("共 "+ thePageLength +" 页 " + data.data.totalCount + " 条数据");
|
|
|
var pageArr = [],
|
|
|
firstNo = 1,
|
|
|
endNo = 5;
|
|
@@ -74,7 +69,7 @@ $(function(){
|
|
|
};
|
|
|
$('.pageNumber').remove();
|
|
|
$('.pagePre').after(pageArr.join(''));
|
|
|
- },
|
|
|
+ },
|
|
|
});
|
|
|
}
|
|
|
if (window.location.search) {
|
|
@@ -87,13 +82,11 @@ $(function(){
|
|
|
};
|
|
|
loadDate();
|
|
|
|
|
|
- $('.pagination').on('click', 'li', function (e) {
|
|
|
- $(this).addClass('active').siblings().removeClass('active')
|
|
|
+ $('.pagination').on('click', 'li', function (e) {
|
|
|
e.preventDefault();
|
|
|
- thePageNo=$(this).val();
|
|
|
if (this.className === 'pagePre') {
|
|
|
if (thePageNo > 1) {
|
|
|
- thePageNo = 1;
|
|
|
+ thePageNo = 1;
|
|
|
loadDate(thePageNo);
|
|
|
}
|
|
|
} else if (this.className === 'pageNext') {
|
|
@@ -109,13 +102,12 @@ $(function(){
|
|
|
thePageNo = nextPageNo;
|
|
|
loadDate(thePageNo);
|
|
|
};
|
|
|
- };
|
|
|
-
|
|
|
+ };
|
|
|
});
|
|
|
|
|
|
$('.invest_imglist ul').on('click', 'li', function () {
|
|
|
- var theId = $(this).value;
|
|
|
- window.open(globalConfig.context + '/portal/detail/achievementDetail.html?id=' + theId );
|
|
|
+ var theId = $(this).attr('value');
|
|
|
+ window.open(globalConfig.context + '/portal/financial/investmentDetail.html?organizationId=' + theId );
|
|
|
})
|
|
|
|
|
|
var addlength=provinceList.length;
|