|
@@ -62,6 +62,9 @@ $(function(){
|
|
|
var totle=result.data.totalCount;
|
|
|
var pages=Math.ceil(totle/4);
|
|
|
var sol='';
|
|
|
+ if(summary==null){
|
|
|
+ summary=''
|
|
|
+ };
|
|
|
var srctt=globalConfig.context + '/portal/news/newsDetail.html?id=' + id;
|
|
|
policy_li+="<li value='"+id+"'>"
|
|
|
+"<div class='policy_time'><p>"
|
|
@@ -201,6 +204,7 @@ $(function(){
|
|
|
success: function (result) {
|
|
|
thePageLengths = result.data.totalCount ? Math.ceil(result.data.totalCount / pageSizes) : 1;
|
|
|
var policy_img ='';
|
|
|
+ var totle=Math.ceil(result.data.totalCount/4);
|
|
|
for(var i=0;i<result.data.list.length;i++){
|
|
|
var id=result.data.list[i].id;
|
|
|
var title = result.data.list[i].title; //标题
|
|
@@ -209,8 +213,17 @@ $(function(){
|
|
|
titleImg=''
|
|
|
}
|
|
|
var summary = result.data.list[i].summary;//简介
|
|
|
+ if(summary==null){
|
|
|
+ summary=''
|
|
|
+ };
|
|
|
var imgUrls=titleImg!=''?globalConfig.avatarHost + '/upload' +titleImg:globalConfig.avatarHost+ '/upload/default/news.jpg';
|
|
|
- policy_img+="<li value='"+id+"'>"+"<img src='"+imgUrls+"' alt=''/>"+"<div class='zizone_text'><h4><a href='#'>"+title+"</a></h3><p>"+summary+"</p><a href='#'>MORE+</a></div></li>"
|
|
|
+ policy_img+=
|
|
|
+ "<li value='"+id+"'>"
|
|
|
+ +"<img src='"+imgUrls+"' alt=''/>"
|
|
|
+ +"<div class='zizone_text'><h4><a href='#'>"
|
|
|
+ +title+"</a></h3><p>"
|
|
|
+ +summary+"</p><a href='#'>MORE+</a>"
|
|
|
+ +"<input type='hidden' value='"+totle+"'/></div></li>"
|
|
|
}
|
|
|
$('.main_zizone ul').html(policy_img)
|
|
|
}.bind(this)
|
|
@@ -218,86 +231,24 @@ $(function(){
|
|
|
}
|
|
|
mids(1,1)
|
|
|
//点击时left
|
|
|
- var t=1;
|
|
|
- $('.zizone_left').click(function(){
|
|
|
+ var t=1;
|
|
|
+ $('.zizone_left').click(function(){
|
|
|
t--;
|
|
|
if(t<=1){
|
|
|
t=1
|
|
|
}
|
|
|
- $.ajax({
|
|
|
- method: "get",
|
|
|
- dataType: "json",
|
|
|
- url: globalConfig.context + "/portal/news/list",
|
|
|
- data: {
|
|
|
- provinceId:null,
|
|
|
- hot: 1,
|
|
|
- pageNo:t,
|
|
|
- type:4,
|
|
|
- pageSize:4
|
|
|
- },
|
|
|
- success: function (result) {
|
|
|
- var totle=Math.ceil(result.data.totalCount/4);
|
|
|
- var policy_img ='';
|
|
|
- for(var i=0;i<result.data.list.length;i++){
|
|
|
- var id=result.data.list[i].id;
|
|
|
- var title = result.data.list[i].title; //标题
|
|
|
- var titleImg = result.data.list[i].titleImg; //图片
|
|
|
- if(titleImg==null){
|
|
|
- titleImg=''
|
|
|
- }
|
|
|
- var summary = result.data.list[i].summary;//简介
|
|
|
- var imgUrls=titleImg!=''?globalConfig.avatarHost + '/upload' +titleImg:globalConfig.avatarHost+ '/upload/default/news.jpg';
|
|
|
- policy_img+="<li value='"+id+"'>"+"<img src='"+imgUrls+"' alt='''/>"+"<div class='zizone_text'><h4><a href='#'>"+title+"</a></h3><p>"+summary+"</p><a href='#'>MORE+</a></div></li>"
|
|
|
- }
|
|
|
- if(result.data.list.length===0){
|
|
|
- return false
|
|
|
- }{
|
|
|
-
|
|
|
- $('.main_zizone ul').html(policy_img)
|
|
|
- }
|
|
|
- }.bind(this)
|
|
|
- })
|
|
|
- })
|
|
|
- //点击时right
|
|
|
- var totle;
|
|
|
+ pageNos=t;
|
|
|
+ mids(1,pageNos);
|
|
|
+ })
|
|
|
+ //点击时right
|
|
|
$('.zizone_right').click(function(){
|
|
|
- t++;
|
|
|
- if(t>totle){
|
|
|
- t=totle
|
|
|
+ var tot=$('.main_zizone ul').find('input').val()
|
|
|
+ t++;
|
|
|
+ if(t>tot){
|
|
|
+ t=tot
|
|
|
}
|
|
|
- if(totle=1){
|
|
|
- t=1
|
|
|
- }
|
|
|
- $.ajax({
|
|
|
- method: "get",
|
|
|
- dataType: "json",
|
|
|
- url: globalConfig.context + "/portal/news/list",
|
|
|
- data: {
|
|
|
- provinceId:null,
|
|
|
- hot: 1,
|
|
|
- pageNo:t,
|
|
|
- type:4,
|
|
|
- pageSize:4
|
|
|
- },
|
|
|
- success: function (result) {
|
|
|
- totle=Math.ceil(result.data.totalCount/4);
|
|
|
- var policy_img ='';
|
|
|
- for(var i=0;i<result.data.list.length;i++){
|
|
|
- var id=result.data.list[i].id;
|
|
|
- var title = result.data.list[i].title; //标题
|
|
|
- var titleImg = result.data.list[i].titleImg; //图片
|
|
|
- if(titleImg==null){
|
|
|
- titleImg=''
|
|
|
- }
|
|
|
- var summary = result.data.list[i].summary;//简介
|
|
|
- var imgUrls=titleImg!=''?globalConfig.avatarHost + '/upload' +titleImg:globalConfig.avatarHost+ '/upload/default/news.jpg';
|
|
|
- policy_img+="<li value='"+id+"'>"+"<img src='"+imgUrls+"' alt='''/>"+"<div class='zizone_text'><h4><a href='#'>"+title+"</a></h3><p>"+summary+"</p><a href='#'>MORE+</a></div></li>"
|
|
|
- }
|
|
|
-
|
|
|
- $('.main_zizone ul').html(policy_img)
|
|
|
-
|
|
|
- }.bind(this)
|
|
|
- })
|
|
|
+ pageNos=t;
|
|
|
+ mids(1,pageNos);
|
|
|
})
|
|
|
//智者数据交互
|
|
|
var theKeyword, theFieldA, theFieldB, theFieldC;
|
|
@@ -305,8 +256,6 @@ $(function(){
|
|
|
thePageLength = 1,
|
|
|
pageSize = 12,
|
|
|
theType = 0;
|
|
|
-
|
|
|
-
|
|
|
function loadDate(pageNo) {
|
|
|
theFieldA = theFieldA != 999 ? theFieldA : undefined;
|
|
|
theFieldB = theFieldB != 999 ? theFieldB : undefined;
|
|
@@ -328,6 +277,9 @@ $(function(){
|
|
|
for (let i = 0; i < data.data.list.length; i++) {
|
|
|
let thisdata = data.data.list[i];
|
|
|
let engagedField = thisdata.engagedField ? thisdata.engagedField.split(',') : [];
|
|
|
+ if(thisdata.username==null||thisdata.username==''){
|
|
|
+ thisdata.username='佚名'
|
|
|
+ }
|
|
|
var imgUrl=thisdata.personPortraitUrl!=null?globalConfig.avatarHost + '/upload' +thisdata.personPortraitUrl:globalConfig.avatarHost+ '/upload/default/person.jpg';
|
|
|
theArr.push([
|
|
|
'<li value="'+thisdata.uid+'">',
|