|
@@ -35,91 +35,11 @@ $(function(){
|
|
|
"4": "技术咨询型需求",
|
|
|
"5": "技术人才型需求"
|
|
|
};
|
|
|
- var valu=localStorage.getItem("keyWord");
|
|
|
+ theKeyword=localStorage.getItem("keyWord");
|
|
|
var typ=localStorage.getItem("pageType");
|
|
|
localStorage.removeItem("keyWord");
|
|
|
localStorage.removeItem("pageType");
|
|
|
- console.log(valu);
|
|
|
- console.log(typ);
|
|
|
- if(typ){
|
|
|
- $.ajax({
|
|
|
- method: "get",
|
|
|
- dataType: "json",
|
|
|
- url: globalConfig.context + "/portal/search/achievementList",
|
|
|
- data: {
|
|
|
- pageNo: 1,
|
|
|
- pageSize: pageSize,
|
|
|
- keyword: valu,
|
|
|
- transferMode: theMode != 999 ? theMode : undefined,
|
|
|
- fieldA: theFieldA != 999 ? theFieldA : undefined,
|
|
|
- fieldB: theFieldB != 999 ? theFieldB : undefined,
|
|
|
- dataCategory:dataCategory != 999 ? dataCategory : undefined,
|
|
|
- category:category != 999 ? category : undefined,
|
|
|
- dateSort:dateSort,
|
|
|
- lowerPrice:lowerPrice,
|
|
|
- upperPrice:upperPrice
|
|
|
- },
|
|
|
- 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];
|
|
|
- var imgUrl=thisdata.pictureUrl!==null?thisdata.pictureUrl:"/img/timg.gif";
|
|
|
- var star='';
|
|
|
- for(var n=0;n<thisdata.maturity;n++){
|
|
|
- star+='<li></li>'
|
|
|
- }
|
|
|
- theArr.push([
|
|
|
- '<li val="'+thisdata.id+'" typ="'+thisdata.dataCategory+'">', //图片地址
|
|
|
- '<img src="' + globalConfig.avatarHost + '/upload' + imgUrl + '"/>',
|
|
|
- '<div class="list_text">',
|
|
|
- '<p>行业<span>' + (thisdata.industryCategoryA?getIndustryCategory(thisdata.industryCategoryA, thisdata.industryCategoryB):"未知行业") + '</span></p>',
|
|
|
- '<p>名称<span title=' + thisdata.name + '>' + (thisdata.name?thisdata.name:"未知名称") + '</span></p>',
|
|
|
- '<p>类型<span>' + (thisdata.demandType ? categoryObj[thisdata.demandType] : '类型未知') + '</span></p>',
|
|
|
- '<p class="money">预算<span>'+ (thisdata.budgetCost ? (thisdata.budgetCost + '万元') : '价格面议') + '</span></p>',
|
|
|
- '<a href="#">了解详情</a>',
|
|
|
- '</div>',
|
|
|
- '<input type="hidden" class="demandId" value="' + thisdata.id + '">',
|
|
|
- '<input type="hidden" class="demandType" value="' + thisdata.dataCategory + '">',
|
|
|
- '</li>',
|
|
|
- ].join(''));
|
|
|
- };
|
|
|
- };
|
|
|
- $('.main_introduce ul').empty();
|
|
|
- $('.main_introduce ul').append(theArr.join(''));
|
|
|
- if(data.data.list.length===0){
|
|
|
- $('.main_introduce ul').html("<div class='list_none'></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(''));
|
|
|
- }
|
|
|
- });
|
|
|
- }else{
|
|
|
- loadDate();
|
|
|
- }
|
|
|
-
|
|
|
+ loadDate();
|
|
|
function loadDate(pageNo) {
|
|
|
$.ajax({
|
|
|
method: "get",
|
|
@@ -160,9 +80,6 @@ $(function(){
|
|
|
'<p class="money">预算<span>'+ (thisdata.budgetCost ? (thisdata.budgetCost + '万元') : '价格面议') + '</span></p>',
|
|
|
'<a href="#">了解详情</a>',
|
|
|
'</div>',
|
|
|
- //'<div class="star">',
|
|
|
- //'<p>成熟度:<ol><li></li><li></li><li></li><li></li><li></li></ol></p>',
|
|
|
- //'</div>',
|
|
|
'<input type="hidden" class="demandId" value="' + thisdata.id + '">',
|
|
|
'<input type="hidden" class="demandType" value="' + thisdata.dataCategory + '">',
|
|
|
'</li>',
|
|
@@ -282,8 +199,6 @@ $(function(){
|
|
|
});
|
|
|
$('.pagination').on('click', 'li', function (e) {
|
|
|
e.preventDefault();
|
|
|
- console.log(valu);
|
|
|
- console.log(typ);
|
|
|
var texton=$("#search_on input").val();
|
|
|
if (this.className === 'pagePre'){
|
|
|
if (thePageNo > 1) {
|