Browse Source

修改企业没有数据的时候显示的缺省状态
修改搜索页面页码加载俩次的bug

luyanan 7 years ago
parent
commit
c572102694
5 changed files with 52 additions and 34 deletions
  1. 13 4
      cmpInforShow.html
  2. 20 18
      js/cmpInforShow.js
  3. 13 6
      js/searchNew.js
  4. 5 5
      js/userInforShow.js
  5. 1 1
      userInforShow.html

+ 13 - 4
cmpInforShow.html

@ -64,13 +64,22 @@
64 64
			</div>
65 65
			<div class="leftconBox floatL" style="padding-bottom: 40px;">
66 66
				<div id="item1user" class="leftconItem">
67
					<div class="coninfobox">
67
					<!--无搜索结果-->
68
					<div class="nodatabox">
69
				        <div class="nodata">
70
				            <div class="picbox picNull"></div>
71
				            <div class="txtbox">
72
				            	<p class="noContip">企业尚未发布任何内容</p>
73
				            </div>
74
				        </div>
75
				    </div>
76
					<div class="coninfobox displayNone">
68 77
						<div class="coninfotit">企业简介</div>
69 78
						<div class="coninfocon" id="descpS">
70 79
							
71 80
						</div>
72 81
					</div>
73
					<div class="coninfobox">
82
					<div class="coninfobox displayNone">
74 83
						<div class="coninfotit">专注领域</div>
75 84
						<div class="coninfocon listArea">
76 85
							<ul id="subjectShow">
@ -78,7 +87,7 @@
78 87
							</ul>
79 88
						</div>
80 89
					</div>
81
					<div class="coninfobox form-item otherShow">
90
					<div class="coninfobox form-item otherShow displayNone">
82 91
						<div class="coninfotit">资源<span class="seeMore" id="seeMoreR">查看全部<em></em></span></div>
83 92
						<div class="coninfocon form-result aboutRes">
84 93
							<ul id="showResource">
@ -86,7 +95,7 @@
86 95
							</ul>
87 96
						</div>
88 97
					</div>
89
					<div class="coninfobox form-item otherShow">
98
					<div class="coninfobox form-item otherShow displayNone"> 
90 99
						<div class="coninfotit">文章<span class="seeMore" id="seeMoreA">查看全部<em></em></span></div>
91 100
						<div class="coninfocon form-result aboutRes">
92 101
							<ul id="showArticle">

+ 20 - 18
js/cmpInforShow.js

@ -194,7 +194,7 @@ $(function() {
194 194
						$("#proAddress").html($info.city + "<span style='margin-right:10px;'></span>");
195 195
					}
196 196
					var proOther = "";
197
					if($info.industry) {
197
					if($info.industry.length!=0 || $info.industry!=undefined) {
198 198
						proOther = $info.industry.replace(/,/gi, " | ");
199 199
					}
200 200
					$("#proOther").text(proOther);
@ -205,16 +205,17 @@ $(function() {
205 205
					document.title = llqtitle;
206 206
					//简介
207 207
					if($info.descp) {
208
						$("#descpS").parents(".coninfobox").removeClass("displayNone");
208 209
						$("#descpS").text($info.descp);
209 210
					} else {
210
						$("#descpS").parents(".coninfobox").hide();
211
						$("#descpS").parents(".coninfobox").addClass("displayNone");
211 212
					}
212 213
					//学术领域		
213
					console.log($info.subject)
214 214
					if($info.subject) {
215
						$("#subjectShow").parents(".coninfobox").removeClass("displayNone");
215 216
						subjectShow($info.subject);
216 217
					} else {
217
						$("#subjectShow").parents(".coninfobox").hide();
218
						$("#subjectShow").parents(".coninfobox").addClass("displayNone");
218 219
					}
219 220
					//企业资质
220 221
					if($info.qualification) {
@ -290,6 +291,8 @@ $(function() {
290 291
				if(data.success) {
291 292
					$("#proResource").html("");
292 293
					if(data.data.data.length > 0) {
294
						$("#showResource").parents(".coninfobox").removeClass("displayNone");
295
						$("#item1user>.nodatabox").addClass("displayNone");
293 296
						for(var i = 0; i < data.data.data.length; i++) {
294 297
							var madiaHead = '';
295 298
							if(data.data.data[i].images.length) {
@ -321,8 +324,7 @@ $(function() {
321 324
						}
322 325
					} else {
323 326
						$("#item2user .nodatabox").show();
324
						$("#item2user .nodatabox").find(".noContip").text("主人尚未发布任何资源");
325
						$("#showResource").parents(".coninfobox").hide();
327
						$("#item2user .nodatabox").find(".noContip").text("企业尚未发布任何资源");
326 328
					}
327 329
				}
328 330
			},
@ -347,8 +349,8 @@ $(function() {
347 349
				if(data.success) {
348 350
					$("#proArticel").html("");
349 351
					if(data.data.data.length > 0) {
350
						$(".navconBox").find("li:contains('文章')").show();
351
						$(".navconBox").find("li:contains('主页')").show();
352
						$("#showArticle").parents(".coninfobox").removeClass("displayNone");
353
						$("#item1user>.nodatabox").addClass("displayNone");
352 354
						for(var i = 0; i < data.data.data.length; i++) {
353 355
							var madiaHead = '/images/default-artical.jpg';
354 356
							if(data.data.data[i].articleImg) {
@ -388,17 +390,17 @@ $(function() {
388 390
						}
389 391
					} else {
390 392
						$("#item3user  .nodatabox").show();
391
						$("#item3user  .nodatabox").find(".noContip").text("主人尚未发布任何文章");
392
						$("#showArticle").parents(".coninfobox").hide();
393
						var i = 0;
394
						$("#item1user").find('.coninfobox').each(function() {
395
							if($(this).css("display") == "none") {
396
								i++;
397
							}
398
						})
393
						$("#item3user  .nodatabox").find(".noContip").text("企业尚未发布任何文章");
394
						var i = 0;
395
						$("#item1user").find('.coninfobox').each(function() {
396
							if($(this).css("display") == "none") {
397
								i++;
398
							}
399
						})
399 400
						if(i == 4) {
400
							$(".navconBox ul>li").eq(3).addClass("liNow").siblings().removeClass("liNow");
401
							$("#item6user").show()
401
							$("#item1user").hide();
402
							$(".navconBox ul>li").eq(3).addClass("liNow").siblings().removeClass("liNow");
403
							$("#item6user").show();
402 404
						}
403 405
					}
404 406
				}

+ 13 - 6
js/searchNew.js

@ -9,32 +9,39 @@ $(function() {
9 9
	var tagnum = $.trim(GetQueryString("tagflag"));
10 10
	if(tagnum==""){
11 11
		num = 1;
12
		expertListVal(keyt,subject,industry,address,authType,20,1,true);
12 13
	}else{
13 14
		num = tagnum;
14 15
		if(num==1){
15 16
			$(".choosediv.filterdiv li").eq(0).addClass("liactive").siblings().removeClass("liactive");
16 17
			$(".listdiv .listbox").eq(0).show().siblings().hide();
17 18
			$(".searchsome").attr("placeholder","请输入专家姓名、机构、研究方向");
19
			expertListVal(keyt,subject,industry,address,authType,20,1,true);
18 20
		}else if(num==2){
19 21
			$(".choosediv.filterdiv li").eq(2).addClass("liactive").siblings().removeClass("liactive");
20 22
			$(".listdiv .listbox").eq(2).show().siblings().hide();
21 23
			$(".searchsome").attr("placeholder","请输入资源名称、用途、机构");
24
			resourceListVal(20, 1,true);
22 25
		}else if(num==3){
23 26
			$(".choosediv.filterdiv li").eq(5).addClass("liactive").siblings().removeClass("liactive");
24 27
			$(".listdiv .listbox").eq(5).show().siblings().hide();
25 28
			$(".searchsome").attr("placeholder","请输入文章标题、作者");
29
			articalListVal(20, 1,true);
26 30
		}else if(num==4){
27 31
			$(".choosediv.filterdiv li").eq(1).addClass("liactive").siblings().removeClass("liactive");
28 32
			$(".listdiv .listbox").eq(1).show().siblings().hide();
29 33
			$(".searchsome").attr("placeholder","输入企业名称、产品名称或相关关键词");
34
			companyListVal(20,1,true);
30 35
		}else if(num==5){
31 36
			$(".choosediv.filterdiv li").eq(3).addClass("liactive").siblings().removeClass("liactive");
32 37
			$(".listdiv .listbox").eq(3).show().siblings().hide();
33 38
			$(".searchsome").attr("placeholder","输入专利名称、发明人、专利号或相关关键词");
39
			patentListVal(20, 1,true);
34 40
		}else if(num==6){
35 41
			$(".choosediv.filterdiv li").eq(4).addClass("liactive").siblings().removeClass("liactive");
36 42
			$(".listdiv .listbox").eq(4).show().siblings().hide();
37 43
			$(".searchsome").attr("placeholder","输入论文题目、作者或相关关键词");
44
			paperListVal(20, 1,true);
38 45
		}
39 46
	}
40 47
	
@ -49,12 +56,12 @@ $(function() {
49 56
		keyt=searchContent;
50 57
		$(".searchsome").val(searchContent);
51 58
	}
52
	expertListVal(keyt,subject,industry,address,authType,20,1,true);
53
	companyListVal(20,1,true);
54
	articalListVal(20, 1,true);
55
	resourceListVal(20, 1,true);
56
	patentListVal(20, 1,true);
57
	paperListVal(20, 1,true);
59
//	expertListVal(keyt,subject,industry,address,authType,20,1,true);
60
//	companyListVal(20,1,true);
61
//	articalListVal(20, 1,true);
62
//	resourceListVal(20, 1,true);
63
//	patentListVal(20, 1,true);
64
//	paperListVal(20, 1,true);
58 65
	
59 66
	academicFieldVal(subjectText);
60 67
	applicationIndustryVal();

+ 5 - 5
js/userInforShow.js

@ -557,7 +557,7 @@ $(function() {
557 557
					
558 558
					if($info.honors.length == 0 && $info.projects.length == 0 && $info.jobs.length == 0 && $info.edus.length == 0){
559 559
						$("#item6user>.nodatabox").show();
560
						$("#item6user>.nodatabox").find(".noContip").text("主人尚未完善详细资料")
560
						$("#item6user>.nodatabox").find(".noContip").text("用户尚未完善详细资料")
561 561
					}
562 562
					
563 563
					var weibotitle = $info.name;
@ -673,7 +673,7 @@ $(function() {
673 673
						}
674 674
					}else{
675 675
						$("#proResource + .nodatabox").show();
676
						$("#proResource + .nodatabox").find(".noContip").text("主人尚未发布任何资源");
676
						$("#proResource + .nodatabox").find(".noContip").text("用户尚未发布任何资源");
677 677
					}
678 678
				}
679 679
			},
@ -740,7 +740,7 @@ $(function() {
740 740
						}
741 741
					}else{
742 742
						$("#proArticel + .nodatabox").show();
743
						$("#proArticel + .nodatabox").find(".noContip").text("主人尚未发布任何文章");
743
						$("#proArticel + .nodatabox").find(".noContip").text("用户尚未发布任何文章");
744 744
					}
745 745
					
746 746
@ -803,7 +803,7 @@ $(function() {
803 803
						}
804 804
					}else{
805 805
						$("#proPatent + .nodatabox").show();
806
						$("#proPatent + .nodatabox").find(".noContip").text("主人尚未导入任何专利");
806
						$("#proPatent + .nodatabox").find(".noContip").text("用户尚未发布任何专利");
807 807
					}
808 808
				}
809 809
			},
@ -872,7 +872,7 @@ $(function() {
872 872
						}
873 873
					}else{
874 874
						$("#proPaper + .nodatabox").show();
875
						$("#proPaper + .nodatabox").find(".noContip").text("主人尚未导入任何论文");
875
						$("#proPaper + .nodatabox").find(".noContip").text("用户尚未发布任何论文");
876 876
					}
877 877
				}
878 878
			},

+ 1 - 1
userInforShow.html

@ -81,7 +81,7 @@
81 81
				        <div class="nodata">
82 82
				            <div class="picbox picNull"></div>
83 83
				            <div class="txtbox">
84
				            	<p class="noContip">主人尚未填写基础信息</p>
84
				            	<p class="noContip">用户尚未发布任何内容</p>
85 85
				            </div>
86 86
				        </div>
87 87
				    </div>