|
@@ -48,12 +48,30 @@ $(function () {
|
|
|
dataList.data.map((item,index)=>{
|
|
|
if(dataList.topId==item.topLevelId){
|
|
|
$('.serviceList .industry').eq(index).find('.industryList ul li:eq(0)').addClass('active');
|
|
|
+ $('.onSelect .preFirst').css('display', 'block').html(`
|
|
|
+ <span>不限</span>
|
|
|
+ `)
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
if (item.indexOf('secondId') > -1) {
|
|
|
let secondIds = item.split('=')
|
|
|
dataList.secondId = decodeURIComponent(secondIds[1])
|
|
|
+ (dataList.data).map((item,index)=>{
|
|
|
+ if((item.children).length){
|
|
|
+ (item.children).map((atem,indexT)=>{
|
|
|
+ if(dataList.secondId==atem.id){
|
|
|
+ if(indexT>=7){
|
|
|
+ heigFun(index)
|
|
|
+ };
|
|
|
+ $('.onSelect .preFirst').css('display', 'block').html(`
|
|
|
+ <span>${atem.name}</span>
|
|
|
+ `)
|
|
|
+ $('.serviceList .industry').eq(index).find('.industryList ul li').eq(indexT+1).addClass('active');
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
} else {
|
|
@@ -69,11 +87,29 @@ $(function () {
|
|
|
if(dataList.topId==item.topLevelId){
|
|
|
$('.serviceList .industry').eq(index).find('.industryList ul li:eq(0)').addClass('active');
|
|
|
}
|
|
|
+ $('.onSelect .preFirst').css('display', 'block').html(`
|
|
|
+ <span>不限</span>
|
|
|
+ `)
|
|
|
})
|
|
|
}
|
|
|
if (newHash.indexOf('secondId') > -1) {
|
|
|
let secondIds = newHash.split('=')
|
|
|
- dataList.secondId = decodeURIComponent(secondIds[1])
|
|
|
+ dataList.secondId = decodeURIComponent(secondIds[1]);
|
|
|
+ (dataList.data).map((item,index)=>{
|
|
|
+ if((item.children).length){
|
|
|
+ (item.children).map((atem,indexT)=>{
|
|
|
+ if(dataList.secondId==atem.id){
|
|
|
+ if(indexT>=7){
|
|
|
+ heigFun(index)
|
|
|
+ };
|
|
|
+ $('.onSelect .preFirst').css('display', 'block').html(`
|
|
|
+ <span>${atem.name}</span>
|
|
|
+ `)
|
|
|
+ $('.serviceList .industry').eq(index).find('.industryList ul li').eq(indexT+1).addClass('active');
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
loadDate()
|
|
@@ -97,7 +133,6 @@ $(function () {
|
|
|
module: 1
|
|
|
},
|
|
|
success: function (data) {
|
|
|
- console.log(data)
|
|
|
var theArrs = [];
|
|
|
if (data.data && data.data.length) {
|
|
|
let thisdata = data.data;
|
|
@@ -160,7 +195,7 @@ $(function () {
|
|
|
news = formatDuring(times) - formatDuring(thisdata.releaseDate);
|
|
|
theArrs.push(`
|
|
|
<li>
|
|
|
- <a href="${globalConfig.context}/portal/service/serviceDetail?id=${thisdata.id?thisdata.id:''}">
|
|
|
+ <a href="${globalConfig.context}/portal/service/serviceDetail?id=${thisdata.id}">
|
|
|
<div class="img serviceImg">
|
|
|
${thisdata.maxImgUrl&&thisdata.maxImgUrl!=null?'<img src="'+globalConfig.avatarHost+'/upload'+thisdata.maxImgUrl+'"/>':''}
|
|
|
</div>
|
|
@@ -169,7 +204,11 @@ $(function () {
|
|
|
<h5>${thisdata.name}</h5>
|
|
|
</div>
|
|
|
<div class="btnTxt">
|
|
|
- <p><span class="companyImg"></span><span class="companyName">${thisdata.companyName}</span><span class="number">销量 : ${thisdata.dealCount?thisdata.dealCount:0}</span></p>
|
|
|
+ <p>
|
|
|
+ <span class="companyImg"></span>
|
|
|
+ <a href="${globalConfig.context}/portal/companyProfile?uid=${thisdata.companyId}" class="companyName">${thisdata.companyName}</a>
|
|
|
+ <span class="number">销量 : ${thisdata.dealCount?thisdata.dealCount:0}</span>
|
|
|
+ </p>
|
|
|
</div>
|
|
|
</div>
|
|
|
</a>
|
|
@@ -184,7 +223,7 @@ $(function () {
|
|
|
$('.inp').css('display', 'block');
|
|
|
if (data.data.list.length === 0) {
|
|
|
$('.achievementHot .hotList').html("<div class='list_none'></div>");
|
|
|
- $('.pagination_box').css('display', 'none')
|
|
|
+ $('.pagination_box').css('display', 'none');
|
|
|
$('.inp').css('display', 'none');
|
|
|
};
|
|
|
thePageLength = data.data.totalCount ? Math.ceil(data.data.totalCount / pageSize) : 1;
|
|
@@ -269,26 +308,32 @@ $(function () {
|
|
|
dataList.name = '';
|
|
|
let txt = $(this).text();
|
|
|
$('.onSelect .preFirst').css('display', 'block').html(`
|
|
|
- <span>${txt}</span>
|
|
|
+ <span>${txt}</span>
|
|
|
`)
|
|
|
loadDate();
|
|
|
});
|
|
|
+
|
|
|
//更多
|
|
|
+
|
|
|
$('.industryList .more').click(function () {
|
|
|
- let ulH = $('.industryList ul').height();
|
|
|
- if ($(this).parents('.industry').hasClass('activeH')) {
|
|
|
- $(this).parents('.industry').removeClass('activeH');
|
|
|
- $(this).parents('.industry').height(52);
|
|
|
- $(this).text('更多+')
|
|
|
- $(this).parents('.industry').find('p').css({'height':'52px','line-height':'52px'})
|
|
|
- }else{
|
|
|
- $(this).text('收起')
|
|
|
- $(this).parents('.industry').addClass('activeH');
|
|
|
- $(this).parents('.industry').height(ulH);
|
|
|
- $(this).parents('.industry').find('p').css({'height':ulH+'px','line-height':ulH+'px'})
|
|
|
- }
|
|
|
+ let index = $(this).parents('.industry').index();
|
|
|
+ heigFun(index);
|
|
|
})
|
|
|
}
|
|
|
+ function heigFun(index){
|
|
|
+ let ulH = $('.industryList ul').height();
|
|
|
+ if ($('.industry').eq(index).hasClass('activeH')) {
|
|
|
+ $('.industry').eq(index).removeClass('activeH');
|
|
|
+ $('.industry').eq(index).height(52);
|
|
|
+ $('.industry').eq(index).find('.more').text('更多+')
|
|
|
+ $('.industry').eq(index).find('p').css({'height':'52px','line-height':'52px'})
|
|
|
+ }else{
|
|
|
+ $('.industry').eq(index).find('.more').text('收起')
|
|
|
+ $('.industry').eq(index).addClass('activeH');
|
|
|
+ $('.industry').eq(index).height(ulH);
|
|
|
+ $('.industry').eq(index).find('p').css({'height':ulH+'px','line-height':ulH+'px'})
|
|
|
+ }
|
|
|
+ }
|
|
|
//搜索
|
|
|
function search() {
|
|
|
$('.hot ul li span').click(function(){
|