|
@@ -10,12 +10,15 @@ import {
|
|
|
provinceList
|
|
|
} from './NewDicProvinceList';
|
|
|
import {
|
|
|
- techFieldList,
|
|
|
- getTechField
|
|
|
-} from './DicTechFieldList';
|
|
|
+ industry
|
|
|
+} from './dataDic';
|
|
|
|
|
|
$(function() {
|
|
|
//初始智者智政切换描点
|
|
|
+ var theKeyword, province, dataObj={};
|
|
|
+ var thePageNo = 1,
|
|
|
+ thePageLength = 1,
|
|
|
+ pageSize = 12;
|
|
|
let hash=window.location.hash
|
|
|
if(hash=="#zizone"){
|
|
|
$('.zone_right').addClass('actives').siblings().removeClass('actives')
|
|
@@ -39,7 +42,10 @@ $(function() {
|
|
|
$('.searchs').show();
|
|
|
$(".sanjiao").animate({ left: "895px" });
|
|
|
})
|
|
|
- //地方政策城市切换
|
|
|
+ //刷新判断搜索框是否存在
|
|
|
+ if($('.zone_right').hasClass('actives')){
|
|
|
+ $('.searchs').show();
|
|
|
+ }
|
|
|
//初始北京第一页新闻
|
|
|
$('.place_city ul li').eq(0).addClass('thon').siblings().removeClass('thon');
|
|
|
var thePageNos = 1;
|
|
@@ -163,51 +169,8 @@ $(function() {
|
|
|
var theId = $(this).attr('value');
|
|
|
window.open(globalConfig.context + '/portal/news/newsDetail.html?id=' + theId);
|
|
|
})
|
|
|
- //地方政策跳转
|
|
|
+
|
|
|
//中央政策点击刷新
|
|
|
- //初始化内容
|
|
|
- function mids(provinces,pageNos){
|
|
|
- $.ajax({
|
|
|
- method: "get",
|
|
|
- dataType: "json",
|
|
|
- url: globalConfig.context + "/portal/news/list",
|
|
|
- data: {
|
|
|
- provinceId:null,
|
|
|
- hot: 1,
|
|
|
- pageNo:pageNos||1,
|
|
|
- type:4,
|
|
|
- pageSize:pageSizes
|
|
|
- },
|
|
|
- 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; //标题
|
|
|
- var titleImg = result.data.list[i].titleImg; //图片
|
|
|
- if(titleImg==null){
|
|
|
- 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>"
|
|
|
- +"<input type='hidden' value='"+totle+"'/></div></li>"
|
|
|
- }
|
|
|
- $('.main_zizone ul').html(policy_img)
|
|
|
- }.bind(this)
|
|
|
- })
|
|
|
- }
|
|
|
- mids(1,1)
|
|
|
- //点击时left
|
|
|
var t=1;
|
|
|
$('.zizone_left').click(function(){
|
|
|
t--;
|
|
@@ -217,41 +180,27 @@ $(function() {
|
|
|
pageNos=t;
|
|
|
mids(1,pageNos);
|
|
|
})
|
|
|
- //点击时right
|
|
|
- $('.zizone_right').click(function(){
|
|
|
- var tot=$('.main_zizone ul').find('input').val()
|
|
|
- t++;
|
|
|
- if(t>tot){
|
|
|
- t=tot
|
|
|
- }
|
|
|
- pageNos=t;
|
|
|
- mids(1,pageNos);
|
|
|
- })
|
|
|
//智者数据交互
|
|
|
- var theKeyword, theFieldA, theFieldB, theFieldC,province,international;
|
|
|
- var thePageNo = 1,
|
|
|
- thePageLength = 1,
|
|
|
- pageSize = 12,
|
|
|
- theType = 0;
|
|
|
function loadDate(pageNo) {
|
|
|
- theFieldA = theFieldA != 999 ? theFieldA : undefined;
|
|
|
- theFieldB = theFieldB != 999 ? theFieldB : undefined;
|
|
|
- theFieldC = theFieldC != 999 ? theFieldC : undefined;
|
|
|
+ $('.loading').show();
|
|
|
$.ajax({
|
|
|
method: "get",
|
|
|
dataType: "json",
|
|
|
url: globalConfig.context + "/portal/search/subscriberList",
|
|
|
data: {
|
|
|
- province:province,
|
|
|
pageNo: pageNo || 1,
|
|
|
pageSize: pageSize,
|
|
|
- type: theType,
|
|
|
- name: theKeyword,
|
|
|
- field: theFieldA ? ((theFieldA || '') + (theFieldB ? (',' + theFieldB) : '') + (theFieldC ? (',' + theFieldC) : '')) : undefined,
|
|
|
- international:international != 999 ? international : undefined
|
|
|
+ field: dataObj.theFieldA?dataObj.theFieldA:'',
|
|
|
+ international:dataObj.international,
|
|
|
+ name:dataObj.theKeyword,
|
|
|
+ province:dataObj.province
|
|
|
},
|
|
|
success: function (data) {
|
|
|
- var theArr = [];
|
|
|
+ var theArr = [];
|
|
|
+ console.log(data)
|
|
|
+ if(data&&data.error.length){
|
|
|
+ msg(data.error[0].message)
|
|
|
+ }
|
|
|
if (data.data && data.data.list) {
|
|
|
for (let i = 0; i < data.data.list.length; i++) {
|
|
|
let thisdata = data.data.list[i];
|
|
@@ -260,27 +209,27 @@ $(function() {
|
|
|
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+'">',
|
|
|
- '<img src="'+ imgUrl+'" />',
|
|
|
- '<div class="list_text">',
|
|
|
- '<p class="bulr">'+ thisdata.username + '</p>',
|
|
|
- '<p class="orange">' + (thisdata.position || '未知职位') + '</p>',
|
|
|
- '<p class="text_on">' + achievementNumText + '</p>',
|
|
|
- '</div>',
|
|
|
- '<div class="shadow_text">',
|
|
|
- '<p class="bulr">'+ thisdata.username + '</p>',
|
|
|
- '<p class="orange">' + (thisdata.position || '未知职位') + '</p>',
|
|
|
- '<p class="text_on">' + achievementNumText+ '</p>',
|
|
|
- '<img src="' + globalConfig.portalHost + '/img/search_txt.png "/>',
|
|
|
- '</div>',
|
|
|
- '</li>' ,
|
|
|
- ].join(''));
|
|
|
+ theArr.push(`
|
|
|
+ <li value="${thisdata.uid}">
|
|
|
+ <div class="noImg">
|
|
|
+ ${thisdata.personPortraitUrl&&thisdata.personPortraitUrl!=null?'<img src="'+globalConfig.avatarHost+thisdata.personPortraitUrl+'"/>':''}
|
|
|
+ </div>
|
|
|
+ <div class="list_text">
|
|
|
+ <p class="bulr">${thisdata.username}</p>
|
|
|
+ <p class="orange">${thisdata.position?thisdata.position:'未知职位'}</p>
|
|
|
+ <p class="text_on">${achievementNumText}</p>
|
|
|
+ </div>
|
|
|
+ <div class="shadow_text">
|
|
|
+ <p class="bulr">${thisdata.username }</p>
|
|
|
+ <p class="orange">${thisdata.position?thisdata.position:'未知职位'}</p>
|
|
|
+ <p class="text_on">${achievementNumText}</p>
|
|
|
+ <span> <img src="${globalConfig.portalHost}/img/search_txt.png "/></span>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ `);
|
|
|
};
|
|
|
- } else {
|
|
|
- return;
|
|
|
- };
|
|
|
+ }
|
|
|
+ $('.loading').hide();
|
|
|
$('#subscriberList').empty();
|
|
|
$('#subscriberList').append(theArr.join(''));
|
|
|
if(data.data.list.length===0){
|
|
@@ -347,8 +296,6 @@ $(function() {
|
|
|
provinces = p_val;
|
|
|
datt(provinces, 1);
|
|
|
});
|
|
|
-
|
|
|
- //中央政策点击刷新
|
|
|
//初始化内容
|
|
|
function mids(provinces, pageNos) {
|
|
|
$.ajax({
|
|
@@ -393,14 +340,6 @@ $(function() {
|
|
|
mids(1, 1)
|
|
|
//点击时left
|
|
|
var t = 1;
|
|
|
- $('.zizone_left').click(function() {
|
|
|
- t--;
|
|
|
- if(t <= 1) {
|
|
|
- t = 1
|
|
|
- }
|
|
|
- pageNos = t;
|
|
|
- mids(1, pageNos);
|
|
|
- })
|
|
|
//点击时right
|
|
|
$('.zizone_right').click(function() {
|
|
|
var tot = $('.main_zizone ul').find('input').val()
|
|
@@ -412,93 +351,7 @@ $(function() {
|
|
|
mids(1, pageNos);
|
|
|
})
|
|
|
//智者数据交互
|
|
|
- var theKeyword, theFieldA, theFieldB, theFieldC, province, international;
|
|
|
- var thePageNo = 1,
|
|
|
- thePageLength = 1,
|
|
|
- pageSize = 12,
|
|
|
- theType = 0;
|
|
|
-
|
|
|
- function loadDate(pageNo) {
|
|
|
- theFieldA = theFieldA != 999 ? theFieldA : undefined;
|
|
|
- theFieldB = theFieldB != 999 ? theFieldB : undefined;
|
|
|
- theFieldC = theFieldC != 999 ? theFieldC : undefined;
|
|
|
- $.ajax({
|
|
|
- method: "get",
|
|
|
- dataType: "json",
|
|
|
- url: globalConfig.context + "/portal/search/subscriberList",
|
|
|
- data: {
|
|
|
- province: province,
|
|
|
- pageNo: pageNo || 1,
|
|
|
- pageSize: pageSize,
|
|
|
- type: theType,
|
|
|
- name: theKeyword,
|
|
|
- field: theFieldA ? ((theFieldA || '') + (theFieldB ? (',' + theFieldB) : '') + (theFieldC ? (',' + theFieldC) : '')) : undefined,
|
|
|
- international: international != 999 ? international : undefined
|
|
|
- },
|
|
|
- success: function(data) {
|
|
|
- var theArr = [];
|
|
|
- if(data.data && data.data.list) {
|
|
|
- for(let i = 0; i < data.data.list.length; i++) {
|
|
|
- let thisdata = data.data.list[i];
|
|
|
- let achievementNumText=(thisdata.achievementNum==null)?"":thisdata.achievementNum;
|
|
|
- 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 + '">',
|
|
|
- '<img src="' + imgUrl + '" />',
|
|
|
- '<div class="list_text">',
|
|
|
- '<p class="bulr">' + thisdata.username + '</p>',
|
|
|
- '<p class="orange">' + (thisdata.position || '未知职位') + '</p>',
|
|
|
- '<p class="text_on">' + achievementNumText + '</p>',
|
|
|
- '</div>',
|
|
|
- '<div class="shadow_text">',
|
|
|
- '<p class="bulr">' + thisdata.username + '</p>',
|
|
|
- '<p class="orange">' + (thisdata.position || '未知职位') + '</p>',
|
|
|
- '<p class="text_on">' + achievementNumText + '</p>',
|
|
|
- '<img src="' + globalConfig.portalHost + '/img/search_txt.png "/>',
|
|
|
- '</div>',
|
|
|
- '</li>',
|
|
|
- ].join(''));
|
|
|
- };
|
|
|
- } else {
|
|
|
- return;
|
|
|
- };
|
|
|
- $('#subscriberList').empty();
|
|
|
- $('#subscriberList').append(theArr.join(''));
|
|
|
- if(data.data.list.length === 0) {
|
|
|
- $('#subscriberList').html('<div class="imgbg"></div>');
|
|
|
- }
|
|
|
- $('.totalCount').html("共" + data.data.totalCount + "条数据");
|
|
|
- thePageLength = data.data.totalCount ? Math.ceil(data.data.totalCount / pageSize) : 1;
|
|
|
- var pageArr = [],
|
|
|
- firstNo = 1,
|
|
|
- endNo = 5;
|
|
|
- if(thePageNo > 3) {
|
|
|
- firstNo = thePageNo - 2;
|
|
|
- endNo = Math.min((Number(thePageNo) + 2), thePageLength);
|
|
|
- } else {
|
|
|
- endNo = Math.min(thePageLength, 5);
|
|
|
- };
|
|
|
- for(let i = firstNo; i <= endNo; i++) {
|
|
|
- if(i == thePageNo) {
|
|
|
- pageArr.push(
|
|
|
- '<li class="pageNumber active"><a href="#" value=' + i + ' >' + i + '</a></li>'
|
|
|
- );
|
|
|
- } else {
|
|
|
- pageArr.push(
|
|
|
- '<li class="pageNumber"><a href="#" value=' + i + ' >' + i + '</a></li>'
|
|
|
- );
|
|
|
- }
|
|
|
- };
|
|
|
- $('.pageNumber').remove();
|
|
|
- $('.pagePre').after(pageArr.join(''));
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
+
|
|
|
if(window.location.search) {
|
|
|
let theUrl = window.location.search
|
|
|
theKeyword = theUrl.substring(1, theUrl.length);
|
|
@@ -506,19 +359,17 @@ $(function() {
|
|
|
$('#searchInput').val(theKeyword);
|
|
|
};
|
|
|
loadDate();
|
|
|
- var industryListArr = [],
|
|
|
- industrySecondList = [],
|
|
|
- industryThirdList = [];
|
|
|
- industryListArr.push(['<li value="999" class="active">',
|
|
|
+ var industryListArr = [];
|
|
|
+ industryListArr.push(['<li value="" class="active">',
|
|
|
'<span>',
|
|
|
'不限',
|
|
|
'</span>',
|
|
|
'</li>',
|
|
|
].join(''));
|
|
|
- techFieldList.map(function(item) {
|
|
|
+ industry.map(function(item) {
|
|
|
industryListArr.push(['<li value="' + item.value + '">',
|
|
|
'<span>',
|
|
|
- item.label,
|
|
|
+ item.key,
|
|
|
'</span>',
|
|
|
'</li>',
|
|
|
].join(''));
|
|
@@ -530,93 +381,22 @@ $(function() {
|
|
|
var theValue = this.value;
|
|
|
$(this).siblings("li").removeClass("active");
|
|
|
$(this).addClass("active");
|
|
|
- industrySecondList = [];
|
|
|
- industrySecondList.push(['<li value="999" class="active">',
|
|
|
- '<span>',
|
|
|
- '不限',
|
|
|
- '</span>',
|
|
|
- '</li>',
|
|
|
- ].join(''));
|
|
|
- if(theValue !== 999) {
|
|
|
- $('#industrySecondBox').css("display", "block");
|
|
|
- techFieldList.map(function(item) {
|
|
|
- if(item.value == theValue) {
|
|
|
- item.children.map(function(child) {
|
|
|
- industrySecondList.push(['<li value="' + child.value + '">',
|
|
|
- '<span>',
|
|
|
- child.label,
|
|
|
- '</span>',
|
|
|
- '</li>',
|
|
|
- ].join(''));
|
|
|
- });
|
|
|
- };
|
|
|
- });
|
|
|
- } else {
|
|
|
- $('#industrySecondBox').css("display", "none");
|
|
|
- };
|
|
|
- if(industrySecondList && industrySecondList.length) {
|
|
|
- $('#industrySecondList').empty();
|
|
|
- $('#industrySecondList').append(industrySecondList.join(''));
|
|
|
- };
|
|
|
- $('#industryThirdBox').css("display", "none");
|
|
|
- theFieldA = this.value;
|
|
|
- theFieldB = 999;
|
|
|
- theFieldC = 999;
|
|
|
- loadDate();
|
|
|
- });
|
|
|
- $('#industrySecondList').on('click', 'li', function() {
|
|
|
- var theValue = this.value;
|
|
|
- $(this).siblings("li").removeClass("active");
|
|
|
- $(this).addClass("active");
|
|
|
- industryThirdList = [];
|
|
|
- industryThirdList.push(['<li value="999" class="active">',
|
|
|
- '<span>',
|
|
|
- '不限',
|
|
|
- '</span>',
|
|
|
- '</li>',
|
|
|
- ].join(''));
|
|
|
- if(theValue !== 999) {
|
|
|
- $('#industryThirdBox').css("display", "block");
|
|
|
- techFieldList.map(function(itemA) {
|
|
|
- if(itemA.value == theFieldA) {
|
|
|
- itemA.children.map(function(itemB) {
|
|
|
- if(itemB.value == theValue) {
|
|
|
- itemB.children.map(function(itemC) {
|
|
|
- industryThirdList.push(['<li value="' + itemC.value + '">',
|
|
|
- '<span>',
|
|
|
- itemC.label,
|
|
|
- '</span>',
|
|
|
- '</li>',
|
|
|
- ].join(''));
|
|
|
- })
|
|
|
- }
|
|
|
- });
|
|
|
- };
|
|
|
- });
|
|
|
- } else {
|
|
|
- $('#industryThirdBox').css("display", "none");
|
|
|
- };
|
|
|
- if(industryThirdList && industryThirdList.length) {
|
|
|
- $('#industryThirdList').empty();
|
|
|
- $('#industryThirdList').append(industryThirdList.join(''));
|
|
|
- };
|
|
|
- theFieldB = this.value;
|
|
|
- theFieldC = 999;
|
|
|
- loadDate();
|
|
|
- });
|
|
|
- $('#industryThirdList').on('click', 'li', function() {
|
|
|
- $(this).siblings("li").removeClass("active");
|
|
|
- $(this).addClass("active");
|
|
|
- theFieldC = this.value;
|
|
|
+ dataObj.province ='';
|
|
|
+ dataObj.theKeyword='';
|
|
|
+ dataObj.theFieldA=theValue;
|
|
|
loadDate();
|
|
|
});
|
|
|
$('.searchs button').click(function(e) {
|
|
|
e.preventDefault();
|
|
|
theKeyword = $('#search_on input').val();
|
|
|
province = $('#selt option:checked').attr('value');
|
|
|
- province = province
|
|
|
+ dataObj.theFieldA ='';
|
|
|
+ dataObj.province = province;
|
|
|
+ dataObj.theKeyword=theKeyword;
|
|
|
loadDate();
|
|
|
+ $('#industryList li').removeClass('active');
|
|
|
});
|
|
|
+
|
|
|
$('.pagination').on('click', 'li', function(e) {
|
|
|
e.preventDefault();
|
|
|
if(this.className === 'pagePre') {
|
|
@@ -651,7 +431,9 @@ $(function() {
|
|
|
$('#isInt').prop('checked', false);
|
|
|
$('#noInt').prop('checked', false);
|
|
|
$('#noInt,#isInt').parent().addClass('demand').removeClass('patent');
|
|
|
- international = null;
|
|
|
+ dataObj.international = null;
|
|
|
+ dataObj.province = '';
|
|
|
+ dataObj.theKeyword='';
|
|
|
loadDate();
|
|
|
})
|
|
|
$('#isInt').click(function() {
|
|
@@ -660,7 +442,9 @@ $(function() {
|
|
|
$(this).parent().addClass('patent').removeClass('demand');
|
|
|
$('#noInt').attr('checked', false);
|
|
|
$('#noInt').parent().addClass('demand').removeClass('patent');
|
|
|
- international = 1;
|
|
|
+ dataObj.international = 1;
|
|
|
+ dataObj.province = '';
|
|
|
+ dataObj.theKeyword='';
|
|
|
loadDate();
|
|
|
})
|
|
|
$('#noInt').click(function() {
|
|
@@ -669,7 +453,21 @@ $(function() {
|
|
|
$(this).parent().addClass('patent').removeClass('demand');
|
|
|
$('#isInt').attr('checked', false);
|
|
|
$('#isInt').parent().addClass('demand').removeClass('patent');
|
|
|
- international = 0;
|
|
|
+ dataObj.international = 0;
|
|
|
+ dataObj.province = '';
|
|
|
+ dataObj.theKeyword='';
|
|
|
loadDate();
|
|
|
})
|
|
|
+ //提示框渐隐函数
|
|
|
+ function msg(txt) {
|
|
|
+ if($('.smg').hasClass('active')){
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+ $('.smg').addClass('active');
|
|
|
+ var lit = $('#msg').val(txt);
|
|
|
+ setTimeout(function () {
|
|
|
+ $('.smg').removeClass('active');
|
|
|
+ $('#msg').val('');
|
|
|
+ }, 2000)
|
|
|
+ }
|
|
|
})
|