Browse Source

Merge branch 'dev' of http://121.42.53.174:3000/jiapeng/portal-front.git
into dev

Conflicts:
cmp-portal/js/cmpInformation.js

111

luyanan 7 years ago
parent
commit
413ce4d357

+ 36 - 2
cmp-portal/articalIssue.html

@ -124,7 +124,7 @@
124 124
							</ul>
125 125
						</div>
126 126
					</div>
127
					<div class="form-item otherBlock">
127
					<!--<div class="form-item otherBlock">
128 128
						<div class="aboutTit">相关资源<span class="frmconmsg"></span></div>
129 129
						<input type="text" class="frmtype frmcontype" placeholder="请输入资源名称" id="checkZy" value="" />
130 130
						<div class="form-drop displayNone">
@ -135,11 +135,45 @@
135 135
						<div class="form-result">
136 136
							<ul class="addexpert" id="resources">
137 137
								
138
							</ul>
139
						</div>
140
					</div>-->
141
					
142
				</div>
143
				<div class="conItem">
144
					<div class="form-item otherBlock">
145
						<div class="aboutTit">本文相关服务<span class="frmconmsg"></span></div>
146
						<input type="text" class="frmtype frmcontype" placeholder="请输入服务名称" id="sevrice" value="">
147
						<div class="form-drop">
148
							<ul class="expertlist" id="sevricelist">
149
							</ul>
150
						</div>
151
						<div class="form-result">
152
							<ul class="addexpert" id="sevriceli">
138 153
							</ul>
139 154
						</div>
140 155
					</div>
156
				</div>
157
				<div class="conItem">
158
					<div class="form-item otherBlock">
159
						<div class="aboutTit">本文相关资源<span class="frmconmsg"></span></div>
160
						<input type="text" class="frmtype frmcontype" placeholder="请输入资源名称" id="checkZy" value="">
161
						<div class="form-drop">
162
							<ul class="expertlist" id="resouselist">
163
								<!--<li id="usid" class="flexCenter" data-id="4558F24B922E4FF9A5062AA9869808F8"><p class="h1Font ellipsisSty-2 childElement" style="width:95%;"id="resourceName">但渐渐地就的解决的记得记得就到家但渐渐地就但渐渐地就的解决的记得记得就到家但渐渐地就</p><div class="deleteThis"></div></li>-->
164
							</ul>
165
						</div>
166
						<div class="form-result">
167
							<ul class="addexpert" id="resources">
168
								
169
							<!--<li id="usid" class="flexCenter" data-id="4558F24B922E4FF9A5062AA9869808F8"><p class="h1Font ellipsisSty-2 childElement" style="width:78%;"id="resourceName">但渐渐地就的解决的记得记得就到家但渐渐地就但渐渐地就的解决的记得记得就到家但渐渐地就</p><div class="deleteThis"></div></li>-->
170
							</ul>
171
						</div>
172
					</div>
173
				</div>
174
				<div class="conItem">
141 175
					<div class="form-item otherBlock">
142
						<div class="aboutTit">相关企业<span class="frmconmsg"></span></div>
176
						<div class="aboutTit">本文相关企业<span class="frmconmsg"></span></div>
143 177
						<input type="text" class="frmtype frmcontype" placeholder="请输入企业名称" id="company" value="" />
144 178
						<div class="form-drop displayNone">
145 179
							<ul class="expertlist" id="companylist">

+ 37 - 4
cmp-portal/articalModify.html

@ -126,7 +126,7 @@
126 126
							</ul>
127 127
						</div>
128 128
					</div>
129
					<div class="form-item otherBlock">
129
					<!--<div class="form-item otherBlock">
130 130
						<div class="aboutTit">相关资源<span class="frmconmsg"></span></div>
131 131
						<input type="text" class="frmtype frmcontype" placeholder="请输入资源名称" id="checkZy" value="" />
132 132
						<div class="form-drop displayNone">
@ -137,11 +137,45 @@
137 137
						<div class="form-result">
138 138
							<ul class="addexpert" id="resources">
139 139
								
140
							</ul>
141
						</div>
142
					</div>-->
143
					
144
				</div>
145
				<div class="conItem">
146
					<div class="form-item otherBlock">
147
						<div class="aboutTit">本文相关服务<span class="frmconmsg"></span></div>
148
						<input type="text" class="frmtype frmcontype" placeholder="请输入服务名称" id="sevrice" value="">
149
						<div class="form-drop">
150
							<ul class="expertlist" id="sevricelist">
151
							</ul>
152
						</div>
153
						<div class="form-result">
154
							<ul class="addexpert" id="sevriceli">
140 155
							</ul>
141 156
						</div>
142 157
					</div>
158
				</div>
159
				<div class="conItem">
143 160
					<div class="form-item otherBlock">
144
						<div class="aboutTit">相关企业<span class="frmconmsg"></span></div>
161
						<div class="aboutTit">本文相关资源<span class="frmconmsg"></span></div>
162
						<input type="text" class="frmtype frmcontype" placeholder="请输入资源名称" id="checkZy" value="">
163
						<div class="form-drop">
164
							<ul class="expertlist" id="resouselist">
165
								<!--<li id="usid" class="flexCenter" data-id="4558F24B922E4FF9A5062AA9869808F8"><p class="h1Font ellipsisSty-2 childElement" style="width:95%;"id="resourceName">但渐渐地就的解决的记得记得就到家但渐渐地就但渐渐地就的解决的记得记得就到家但渐渐地就</p><div class="deleteThis"></div></li>-->
166
							</ul>
167
						</div>
168
						<div class="form-result">
169
							<ul class="addexpert" id="resources">
170
								
171
							<!--<li id="usid" class="flexCenter" data-id="4558F24B922E4FF9A5062AA9869808F8"><p class="h1Font ellipsisSty-2 childElement" style="width:78%;"id="resourceName">但渐渐地就的解决的记得记得就到家但渐渐地就但渐渐地就的解决的记得记得就到家但渐渐地就</p><div class="deleteThis"></div></li>-->
172
							</ul>
173
						</div>
174
					</div>
175
				</div>
176
				<div class="conItem">
177
					<div class="form-item otherBlock">
178
						<div class="aboutTit">本文相关企业<span class="frmconmsg"></span></div>
145 179
						<input type="text" class="frmtype frmcontype" placeholder="请输入企业名称" id="company" value="" />
146 180
						<div class="form-drop displayNone">
147 181
							<ul class="expertlist" id="companylist">
@ -154,8 +188,7 @@
154 188
							</ul>
155 189
						</div>
156 190
					</div>
157
				</div>
158
			</div>
191
				</div>	</div>
159 192
		</div>
160 193
	</div>
161 194
</div>

+ 10 - 34
cmp-portal/cmpInformation.html

@ -14,6 +14,7 @@
14 14
<script type="text/javascript" src="js/public/jquery-1.11.1.js"></script>
15 15
<style type="text/css">
16 16
	.form-result>ul>li{padding:12px 30px}
17
	.establishments{display: none;}
17 18
</style>
18 19
</head>
19 20
@ -80,24 +81,17 @@
80 81
								</ul>
81 82
							</div>
82 83
						</div>
83
						<div class="coninfobox needinfobox establishments">
84
							<div class="form-item otherShow">
84
						<div class="coninfobox splitBlock clearfix displayNone">
85
							<div class="form-item otherShow displayNone">
85 86
								<div class="coninfotit">可提供服务<span class="seeMore" id="seeMoreS">查看全部<em></em></span></div>
86 87
								<div class="coninfocon form-result aboutRes">
87 88
									<ul id="showService">
88
										<li><a href="resourceShow.html" class="flexCenter urlgo">
89
											<div class="madiaHead resouseHead" id="userimg"></div>
90
											<div class="madiaInfo">
91
												<p class="h1Font ellipsisSty-2" id="resourceName">习近平将对哈萨克斯坦进行国事访问并出席活动习近平将对哈萨克斯坦进行国事访问并出席活动习近平将对哈萨克斯坦进行国事访问并出席活动</p>
92
												<p class="h2Font ellipsisSty">应用用途:习近平将对哈萨克斯坦进行国事访问并出席活动习近平将对哈萨克斯坦进行国事访问并出席活动习近平将对哈萨克斯坦进行国事访问并出席活动</p>
93
											</div>
94
										</a>
95
										</li>
89
										
96 90
									</ul>
97 91
								</div>
98 92
							</div>
99
							<div class="form-item otherShow">
100
								<div class="coninfotit" style="margin-top:30px">可共享资源<span class="seeMore" id="seeMoreR">查看全部<em></em></span></div>
93
							<div class="form-item otherShow displayNone">
94
								<div class="coninfotit">可共享资源<span class="seeMore" id="seeMoreR">查看全部<em></em></span></div>
101 95
								<div class="coninfocon form-result aboutRes">
102 96
									<ul id="showResource">
103 97
										
@ -143,16 +137,7 @@
143 137
								<ul id="proResource">
144 138
									
145 139
								</ul>
146
								<!--无搜索结果-->
147
								<button class="js-load-more resoucePageCode"></button>
148
						      	<div class="nodatabox displayNone">
149
							        <div class="nodata">
150
							            <div class="picbox picNull"></div>
151
							            <div class="txtbox">
152
							            	<p class="noContip"></p>
153
							            </div>
154
							        </div>
155
							    </div>
140
								<button class="js-load-more"></button>
156 141
							</div>
157 142
						</div>
158 143
					</div>
@ -162,16 +147,7 @@
162 147
								<ul id="proArticel">
163 148
									
164 149
								</ul>
165
								<!--无搜索结果-->	
166
								<button class="js-load-more expertPageCode"></button>
167
							    <div class="nodatabox displayNone">
168
							        <div class="nodata">
169
							            <div class="picbox picNull"></div>
170
							            <div class="txtbox">
171
							            	<p class="noContip"></p>
172
							            </div>
173
							        </div>
174
							    </div>
150
								<button class="js-load-more"></button>
175 151
							</div>
176 152
						</div>
177 153
					</div>
@ -199,7 +175,7 @@
199 175
								</ul>
200 176
							</div>
201 177
						</div>
202
						<div class="coninfobox">
178
						<div class="coninfobox displayNone">
203 179
							<div class="coninfotit">工商信息</div>
204 180
							<div class="coninfocon">
205 181
								<ul id="comMes">
@ -274,7 +250,7 @@
274 250
	<script type="text/javascript" src="js/public/cmpFooter.js"></script>
275 251
</footer>
276 252
277
<script type="text/javascript" src="../../js/tabCom.js"></script>
253
<script type="text/javascript" src="../js/tabCom.js"></script>
278 254
<script type="text/javascript" src="js/public/jquery.cookie.js"></script>
279 255
<script type="text/javascript" src="js/public/jquery.similar.msgbox.js"></script>
280 256
<script type="text/javascript" src="../js/weixinshare/qrcode.min.js"></script>

+ 17 - 3
cmp-portal/css/common.css

@ -174,6 +174,11 @@ button.btnModelBig:hover{
174 174
.authicon-staff-no{width:44px;height:16px;background-image:url(../images/porfile_icon_yuangong_nor.png);background-size: cover;}/*企业未认证员工*/
175 175
.authicon-real{width: 24px;height:16px;background-image:url(../images/porfile_icon_shimin_nor.png);background-size: cover;}/*实名认证用户*/
176 176

177
/*点击加载更多*/
178
.js-load-more{position:relative;outline:0;background:#28b8fa;border:none;height: 40px;border-radius: 5px;width:200px;margin:20px auto 10px;left: 50%;margin-left: -100px;cursor: pointer;}
179
.js-load-more:before{position:absolute;content:"点击加载更多";top:0;left:29%;font-size: 15px;line-height: 40px;color:#fff;}
180
.js-load-more.active{background:buttonface;}
181
.js-load-more.active:before{content:"加载中...";left:38%;}
177 182
/*----------------------------分页-----------------------------*/
178 183
.tcdPageCode{ padding: 20px; margin: 10px 0;text-align: left;color: #333;text-align:center;font-size:14px;line-height:24px; }
179 184
.tcdPageCode a{display: inline-block;height: 30px;line-height: 30px;padding: 0 10px;border: 1px solid #CCCCCC;margin: 0 8px;color:#333;}
@ -187,14 +192,23 @@ button.btnModelBig:hover{
187 192
/*----------------------------分页------------------------*/
188 193

189 194
/***********************缺省页面*******************/
190
.nodatatip{width:40%;margin:100px auto;overflow:hidden;height:100px; font-size:16px; text-align:center;color:#aaa;}
191
.nodatabox{/*width:100%;*/height: 100%;padding:40px; margin:20px auto;text-align: center;}
195
/***********************缺省页面*******************/
196
.picbox{margin:8px auto;display:inline-block;width:140px;height:140px;background-position: center;background-repeat: no-repeat;background-size:cover;}
197
.picbox.picNull{background-image:url(../../images/points_icon_ku_nor.png);}
198
.txtbox { margin:6px auto;font-size:18px;color: #999;line-height:40px;}
199

200
.con-kong{line-height:20px;color: #aaa;font-size: 16px;text-align: center;padding:15% 0;background:#fff;}
201
.nodatabox{line-height:20px;color: #aaa;font-size: 16px;text-align: center;padding:15% 0;}
202

203
/***********************缺省页面*******************/
204
/*.nodatatip{width:40%;margin:100px auto;overflow:hidden;height:100px; font-size:16px; text-align:center;color:#aaa;}
205
.nodatabox{height: 100%;padding:40px; margin:20px auto;text-align: center;}
192 206
.nodatabox .nodata{overflow:hidden; width:50%; margin:20px auto;}
193 207
.nodatabox .picbox{margin:8px auto;display:inline-block;width:140px;height:140px;background-position: center;background-repeat: no-repeat;background-size:cover;}
194 208
.nodatabox .picbox.picNull{background-image:url(../../images/points_icon_ku_nor.png);}
195 209
.nodatabox .txtbox { margin:6px auto;}
196 210
.nodatabox .noContip{font-size:18px;color: #999;line-height:40px;}
197
.nodatabox .keyword{font-size:22px; padding:0 6px;color:#555555;}
211
.nodatabox .keyword{font-size:22px; padding:0 6px;color:#555555;}*/
198 212
/***********************缺省页面*******************/
199 213
#container{padding-top:90px;}
200 214
.containerCon{width:1120px;padding:0 10px;position:relative; margin:auto;}

+ 103 - 36
cmp-portal/js/articalIssue.js

@ -5,7 +5,14 @@ $(function() {
5 5
	var articleId;
6 6
	var fa = false;
7 7
    var orgId = $.cookie("orgId");
8
    var colMgr = $.cookie("colMgr");  
8
   var colMgr = $.cookie("colMgr");
9
	var resMgr = $.cookie("resMgr");
10
	if(colMgr =='false' && resMgr=='false') {
11
		$(".conItem").hide().eq(0).show();
12
	}else if(resMgr=='true') {
13
		$(".conItem").eq(1).hide();
14
		$(".conItem").eq(4).hide();
15
	}
9 16
    var hbur,hburEnd;
10 17
  	var pr,prEnd;
11 18
  	var re,reEnd;
@ -52,7 +59,10 @@ $(function() {
52 59
	$("#checkZy").on("focus", function() {
53 60
		$(this).prev().find("span").text("最多选择5个资源");
54 61
	})
55
	$("#checkZj,#checkZy").on("blur", function() {
62
	$("#sevrice").on("focus", function() {
63
		$(this).prev().find("span").text("最多选择5个服务");
64
	})
65
	$("#checkZj,#checkZy,#sevrice").on("blur", function() {
56 66
		$(this).prev().find("span").text("");
57 67
		//$(this).val("");
58 68
		//$(this).parents(".otherBlock").find(".form-drop").addClass("displayNone");
@ -89,7 +99,22 @@ $(function() {
89 99
			},500)
90 100
		
91 101
	})
92

102
	var se,seEnd;
103
	$("#sevrice").on("keyup", function() {
104
		var ti=$(this).val();
105
		se=ti;
106
		if($(this).val()=="") {
107
			return;
108
		}
109
		var _this = this;
110
		setTimeout(function(){
111
				if( ti===se && ti!== seEnd) {
112
					checkSy(_this,ti);
113
				}
114
				
115
			},500)
116
		
117
	})
93 118
	$("#expertlist").on("click", "li", function() {
94 119
		var _this = this;
95 120
		expertlist(_this, "该专家已选择");
@ -98,7 +123,10 @@ $(function() {
98 123
		var _this = this;
99 124
		expertlist(_this, "该资源已选择");
100 125
	});
101

126
	$("#sevricelist").on("click", "li", function() {
127
		var _this = this;
128
		expertlist(_this, "该服务已选择");
129
	});
102 130
	//点击右侧搜索出的专家和资源列表
103 131
	function expertlist(_this, title) {
104 132
		var liId = $(_this).html();
@ -111,7 +139,7 @@ $(function() {
111 139
				return;
112 140
			}
113 141
		}
114
		if(plength.length > 3) {
142
		if(plength.length > 5) {
115 143
			$(_this).parents(".otherBlock").find("input").hide();
116 144
			$(_this).parents(".otherBlock").find(".addexpert").append($(_this).clone());
117 145
			$(_this).parents(".otherBlock").find("input").val("");
@ -181,12 +209,13 @@ $(function() {
181 209
		});
182 210
	}
183 211

184
	function checkZy(_this,prd) {
185
		reEnd=prd;
212
	function checkZy(_this, prd) {
213
		reEnd = prd;
186 214
		$.ajax({
187
			"url": "/ajax/resource/qaByName",
215
			"url": "/ajax/resource/lq/publish/org",
188 216
			"type": "get",
189 217
			"data": {
218
				"orgid": orgId,
190 219
				"resourceName": $("#checkZy").val(),
191 220
				"rows": 3
192 221
			},
@ -194,32 +223,63 @@ $(function() {
194 223
				console.log(data);
195 224
				if(data.success) {
196 225
					if(data.data != "") {
197
						if(reEnd==prd) {
198
								$(_this).next().removeClass("displayNone");
199
								var itemlist = '';
200
								$("#resouselist").html("");
201
								for(var i = 0; i < data.data.length; i++) {
202
									var itemlist = '<li id="usid" class="flexCenter">';
203
									itemlist += '<div class="madiaHead resouseHead" id="userimg"></div>/li>';
204
									itemlist += '<div class="madiaInfo">';
205
									itemlist += '<p class="h1Font ellipsisSty" id="resourceName"></p>';
206
									itemlist += '<p class="h2Font ellipsisSty" id="name"></p>';
207
									itemlist += '</div><div class="deleteThis"></div></li>';
208
									$itemlist = $(itemlist);
209
									$("#resouselist").append($itemlist);
210
									var datalist = data.data[i];
211
									$itemlist.attr("data-id", datalist.resourceId);
212
									$itemlist.find("#resourceName").text(datalist.resourceName);
213
									if(datalist.resourceType==1){
214
										$itemlist.find("#name").text(datalist.professor.name);
215
									}else{
216
										$itemlist.find("#name").text(datalist.organization.name);
217
									}
218
									if(datalist.images.length > 0) {
219
										$itemlist.find("#userimg").attr("style", "background-image: url(/data/resource/" + datalist.images[0].imageSrc + ");");
220
									}
221
								}
222
							}	
226
						if(reEnd == prd) {
227
							$(_this).next().removeClass("displayNone");
228
							$("#resouselist").html("");
229
							for(var i = 0; i < data.data.length; i++) {
230
								var itemlist = '<li id="usid" class="flexCenter" >' +
231
									'<p class="h1Font ellipsisSty-2 childElement" id="resourceName"></p>' +
232
									'<div class="deleteThis"></div></li>/li>'
233
								$itemlist = $(itemlist);
234
								$("#resouselist").append($itemlist);
235
								var datalist = data.data[i];
236
								$itemlist.attr("data-id", datalist.resourceId);
237
								$itemlist.find("#resourceName").text(datalist.resourceName);
238

239
							}
240
						}
241
					} else {
242
						$(_this).next().addClass("displayNone");
243
					}
244
				} else {
245
					$(_this).next().addClass("displayNone");
246
				}
247
			},
248
			"error": function() {
249
				$.MsgBox.Alert('提示', '链接服务器超时')
250
			}
251
		});
252
	}
253
	function checkSy(_this, prd) {
254
		seEnd = prd;
255
		$.ajax({
256
			"url": "../ajax/ware/publish",
257
			"type": "get",
258
			"data": {
259
				category:2,
260
				owner:orgId,
261
				rows:5
262
			},
263
			"success": function(data) {
264
				console.log(data);
265
				if(data.success) {
266
					if(data.data != "") {
267
						if(seEnd == prd) {
268
							$(_this).next().removeClass("displayNone");
269
							$("#sevricelist").html("");
270
							for(var i = 0; i < data.data.length; i++) {
271
								
272
								var itemlist = '<li id="usid" class="flexCenter" >' +
273
									'<p class="h1Font ellipsisSty-2 childElement" id="resourceName"></p>' +
274
									'<div class="deleteThis"></div></li>'
275
								$itemlist = $(itemlist);
276
								$("#sevricelist").append($itemlist);
277
								var datalist = data.data[i];
278
								$itemlist.attr("data-id", datalist.id);
279
								$itemlist.find("#resourceName").text(datalist.name);
280

281
							}
282
						}
223 283
					} else {
224 284
						$(_this).next().addClass("displayNone");
225 285
					}
@ -232,7 +292,6 @@ $(function() {
232 292
			}
233 293
		});
234 294
	}
235
	
236 295
	var titleflase = false;
237 296
	var imgflase = false;
238 297
	//交验图片和标题不能为空
@ -276,7 +335,14 @@ $(function() {
276 335
		});
277 336
		return $.unique(resourcesarray);
278 337
	}
279
	
338
	function seli() {
339
		var arr=[];
340
		$("#sevriceli li").each(function(i) {
341
			var liid = $(this).attr("data-id");
342
			arr.push(liid);
343
		});
344
		return $.unique(arr);
345
	}
280 346
	var seleClum ='<div class="mb-list mb-listL"><p>请选择文章发布的栏目:</p>'+
281 347
		'<select class="form-control form-column" id="seletColum"></select></div>';
282 348
	var seleTime = '<div class="mb-list mb-listR"><p>请设置文章发布的时间:</p>'+
@ -395,6 +461,7 @@ function getAttrId() {
395 461
		$data.articleContent = ue.getContent();
396 462
		$data.professors = experarray;
397 463
		$data.resources = resourcesarray;
464
		$data.wares=seli();
398 465
		if(colMgr=="true"){
399 466
			$data.colNum = $("#seletColum").val();
400 467
			if(publishTime!="") {

+ 164 - 48
cmp-portal/js/articalModify.js

@ -7,6 +7,13 @@ $(function() {
7 7
    var settime = false;
8 8
	var orgId = $.cookie("orgId");
9 9
	var colMgr = $.cookie("colMgr");
10
	var resMgr = $.cookie("resMgr");
11
	if(colMgr =='false' && resMgr=='false') {
12
		$(".conItem").hide().eq(0).show();
13
	}else if(resMgr=='true') {
14
		$(".conItem").eq(1).hide();
15
		$(".conItem").eq(4).hide();
16
	}
10 17
	if(orgId == "" || orgId == null || orgId == "null"){
11 18
    	location.href = "cmp-settled-log.html";
12 19
    }
@ -74,7 +81,10 @@ $(function() {
74 81
	$("#checkZy").on("focus",function(){
75 82
		$(this).prev().find("span").text("最多选择5个资源");
76 83
	})
77
	$("#checkZj,#checkZy").on("blur",function(){
84
	$("#sevrice").on("focus", function() {
85
		$(this).prev().find("span").text("最多选择5个服务");
86
	})
87
	$("#checkZj,#checkZy,#sevrice").on("blur",function(){
78 88
		$(this).prev().find("span").text("");
79 89
	})
80 90
	
@ -109,7 +119,22 @@ $(function() {
109 119
			},500)
110 120
		
111 121
	})
112
	
122
	var se,seEnd;
123
	$("#sevrice").on("keyup", function() {
124
		var ti=$(this).val();
125
		se=ti;
126
		if($(this).val()=="") {
127
			return;
128
		}
129
		var _this = this;
130
		setTimeout(function(){
131
				if( ti===se && ti!== seEnd) {
132
					checkSy(_this,ti);
133
				}
134
				
135
			},500)
136
		
137
	})
113 138
	$("#expertlist").on("click","li",function(){
114 139
		var _this = this;
115 140
		expertlist(_this,"该专家已选择");
@ -118,7 +143,10 @@ $(function() {
118 143
		var _this = this;
119 144
		expertlist(_this,"该资源已选择");
120 145
	});
121
	
146
	$("#sevricelist").on("click", "li", function() {
147
		var _this = this;
148
		expertlist(_this, "该服务已选择");
149
	});
122 150
	//点击右侧搜索出的专家和资源列表
123 151
	function expertlist(_this,title){
124 152
		var liId = $(_this).html();
@ -201,12 +229,13 @@ $(function() {
201 229
		});
202 230
	}
203 231

204
	function checkZy(_this,prd) {
205
		reEnd=prd;
232
	function checkZy(_this, prd) {
233
		reEnd = prd;
206 234
		$.ajax({
207
			"url": "/ajax/resource/qaByName",
235
			"url": "/ajax/resource/lq/publish/org",
208 236
			"type": "get",
209 237
			"data": {
238
				"orgid": orgId,
210 239
				"resourceName": $("#checkZy").val(),
211 240
				"rows": 3
212 241
			},
@ -214,32 +243,63 @@ $(function() {
214 243
				console.log(data);
215 244
				if(data.success) {
216 245
					if(data.data != "") {
217
						if(reEnd==prd) {
218
								$(_this).next().removeClass("displayNone");
219
								var itemlist = '';
220
								$("#resouselist").html("");
221
								for(var i = 0; i < data.data.length; i++) {
222
									var itemlist = '<li id="usid" class="flexCenter">';
223
									itemlist += '<div class="madiaHead resouseHead" id="userimg"></div>/li>';
224
									itemlist += '<div class="madiaInfo">';
225
									itemlist += '<p class="h1Font ellipsisSty" id="resourceName"></p>';
226
									itemlist += '<p class="h2Font ellipsisSty" id="name"></p>';
227
									itemlist += '</div><div class="deleteThis"></div></li>';
228
									$itemlist = $(itemlist);
229
									$("#resouselist").append($itemlist);
230
									var datalist = data.data[i];
231
									$itemlist.attr("data-id", datalist.resourceId);
232
									$itemlist.find("#resourceName").text(datalist.resourceName);
233
									if(datalist.resourceType==1){
234
										$itemlist.find("#name").text(datalist.professor.name);
235
									}else{
236
										$itemlist.find("#name").text(datalist.organization.name);
237
									}
238
									if(datalist.images.length > 0) {
239
										$itemlist.find("#userimg").attr("style", "background-image: url(/data/resource/" + datalist.images[0].imageSrc + ");");
240
									}
241
								}
242
							}	
246
						if(reEnd == prd) {
247
							$(_this).next().removeClass("displayNone");
248
							$("#resouselist").html("");
249
							for(var i = 0; i < data.data.length; i++) {
250
								var itemlist = '<li id="usid" class="flexCenter" >' +
251
									'<p class="h1Font ellipsisSty-2 childElement" id="resourceName"></p>' +
252
									'<div class="deleteThis"></div></li>/li>'
253
								$itemlist = $(itemlist);
254
								$("#resouselist").append($itemlist);
255
								var datalist = data.data[i];
256
								$itemlist.attr("data-id", datalist.resourceId);
257
								$itemlist.find("#resourceName").text(datalist.resourceName);
258

259
							}
260
						}
261
					} else {
262
						$(_this).next().addClass("displayNone");
263
					}
264
				} else {
265
					$(_this).next().addClass("displayNone");
266
				}
267
			},
268
			"error": function() {
269
				$.MsgBox.Alert('提示', '链接服务器超时')
270
			}
271
		});
272
	}
273
	function checkSy(_this, prd) {
274
		seEnd = prd;
275
		$.ajax({
276
			"url": "../ajax/ware/publish",
277
			"type": "get",
278
			"data": {
279
				category:2,
280
				owner:orgId,
281
				rows:5
282
			},
283
			"success": function(data) {
284
				console.log(data);
285
				if(data.success) {
286
					if(data.data != "") {
287
						if(seEnd == prd) {
288
							$(_this).next().removeClass("displayNone");
289
							$("#sevricelist").html("");
290
							for(var i = 0; i < data.data.length; i++) {
291
								
292
								var itemlist = '<li id="usid" class="flexCenter" >' +
293
									'<p class="h1Font ellipsisSty-2 childElement" id="resourceName"></p>' +
294
									'<div class="deleteThis"></div></li>'
295
								$itemlist = $(itemlist);
296
								$("#sevricelist").append($itemlist);
297
								var datalist = data.data[i];
298
								$itemlist.attr("data-id", datalist.id);
299
								$itemlist.find("#resourceName").text(datalist.name);
300

301
							}
302
						}
243 303
					} else {
244 304
						$(_this).next().addClass("displayNone");
245 305
					}
@ -375,21 +435,70 @@ $(function() {
375 435
			"success" : function(data) {
376 436
				console.log(data);
377 437
				if (data.success && data.data){
378
					var itemlist = '<li id="usid">';
379
						itemlist += '<div class="madiaHead resouseHead" id="userimg"></div>';
380
						itemlist += '<div class="madiaInfo" style="padding-right:42px">';
381
						itemlist += '<p class="h1Font ellipsisSty" id="resourceName"></p>';
382
						itemlist += '<p class="h2Font" id="name"></p>';
383
						itemlist += '</div><div class="deleteThis"></div></li>';
384
						$itemlist = $(itemlist);
385
						$("#resources").append($itemlist);
386
						var datalist = data.data;
387
						$itemlist.attr("data-id", datalist.resourceId);
388
						$itemlist.find("#resourceName").text(datalist.resourceName);
389
						$itemlist.find("#name").text(datalist.editProfessor.name);
390
						if(datalist.images.length > 0) {
391
							$itemlist.find("#userimg").attr("style", "background-image: url(/data/resource/" + datalist.images[0].imageSrc + ");");
438
					
439
								var itemlist = '<li id="usid" class="flexCenter" >' +
440
									'<p class="h1Font ellipsisSty-2 childElement" id="resourceName"></p>' +
441
									'<div class="deleteThis"></div></li>'
442
								$itemlist = $(itemlist);
443
								$("#resources").append($itemlist);
444
								var datalist = data.data;
445
								$itemlist.attr("data-id", datalist.resourceId);
446
								$itemlist.find("#resourceName").text(datalist.resourceName);
447

448
							
449
					
450
				}
451
			},
452
			"error":function(){
453
				$.MsgBox.Alert('提示','链接服务器超时')
454
			}
455
		});
456
	}
457
//相关资源
458
releventService()
459
	function releventService(){
460
		$.ajax({
461
			"url": "/ajax/article/ware",
462
			"type": "get",
463
			"dataType" : "json",
464
			"data" :{"id":articleId},
465
			"success": function(data) {
466
				if(data.success && data.data) {
467
					var arr=[];
468
					for(var i = 0; i < data.data.length; i++) {
469
						arr.push(data.data[i].ware);
470
						if(i==data.data.length-1) {
471
							relevantServiceList(arr);
392 472
						}
473
					}
474
					
475
				}
476
			},
477
			"error": function() {
478
				$.MsgBox.Alert('提示', '链接服务器超时')
479
			}
480
		});
481
	}
482
	function relevantServiceList(arr) {
483
		$.ajax({
484
			"url" : "/ajax/ware/qm",
485
			"type" :  "GET" ,
486
			"dataType" : "json",
487
			"data" :{"id":arr},
488
			"traditional":true,
489
			"success" : function(data) {
490
				console.log(data);
491
				if (data.success && data.data){
492
					for(var i=0;i<data.data.length;i++) {
493
						var itemlist = '<li id="usid" class="flexCenter" >' +
494
									'<p class="h1Font ellipsisSty-2 childElement" id="resourceName"></p>' +
495
									'<div class="deleteThis"></div></li>'
496
								$itemlist = $(itemlist);
497
								$("#sevriceli").append($itemlist);
498
								var datalist = data.data[i];
499
								$itemlist.attr("data-id", datalist.id);
500
								$itemlist.find("#resourceName").text(datalist.name);
501
					}
393 502
				}
394 503
			},
395 504
			"error":function(){
@ -397,7 +506,6 @@ $(function() {
397 506
			}
398 507
		});
399 508
	}
400

401 509
	var titleflase = false;
402 510
	//交验图片和标题不能为空
403 511
	function noTitleImg(){
@ -438,7 +546,14 @@ $(function() {
438 546
		});
439 547
		return $.unique(resourcesarray);
440 548
	}
441

549
	function seli() {
550
		var arr=[];
551
		$("#sevriceli li").each(function(i) {
552
			var liid = $(this).attr("data-id");
553
			arr.push(liid);
554
		});
555
		return $.unique(arr);
556
	}
442 557
	var seleClum ='<div class="mb-list mb-listL"><p>请选择文章发布的栏目:</p>'+
443 558
		'<select class="form-control form-column" id="seletColum"></select></div>';
444 559
	var seleTime = '<div class="mb-list mb-listR"><p>请设置文章发布的时间:</p>'+
@ -565,6 +680,7 @@ $(function() {
565 680
		$data.articleContent = ue.getContent();
566 681
		$data.professors = experarray;
567 682
		$data.resources = resourcesarray;
683
		$data.wares=seli();
568 684
		if(colMgr=="true"){
569 685
			$data.colNum = $("#seletColum").val();
570 686
			if(publishTime!="") {

+ 1 - 1
cmp-portal/js/cmp-serviceIssue.js

@ -537,7 +537,7 @@ $(function() {
537 537
			"data": {
538 538
				"orgid": orgId,
539 539
				"resourceName": $("#checkZy").val(),
540
				"rows": 3
540
				"rows": 5
541 541
			},
542 542
			"success": function(data) {
543 543
				console.log(data);

+ 15 - 56
cmpInforShow.html

@ -59,12 +59,12 @@
59 59
			<div class="leftconBox floatL" style="padding-bottom: 40px;">
60 60
				<div class="navconBox">
61 61
					<ul class="mainNavUl clearfix">
62
						<li rel="item1user" class="liNow" rel="item1user">主页</li>
63
						<li class="establishments" rel="item9user">服务 <span class="counts" id="serCount"></span></li>
64
						<li class="establishments" rel="item2user">资源 <span class="counts" id="resCount"></span></li>
65
						<li rel="item3user">文章 <span class="counts" id="artCount"></span></li>
66
						<li rel="item6user">资料</li>
67
						<li rel="item8user" tmp="item8more" class="rightbtn">更多<em class="foldtr"></em></li>
62
						<li rel="item1user" class="liNow" id="tab1user">主页</li>
63
						<li class="establishments" rel="item9user" id="tab9user">服务 <span class="counts" id="serCount"></span></li>
64
						<li class="establishments" rel="item2user" id="tab2user">资源 <span class="counts" id="resCount"></span></li>
65
						<li rel="item3user" id="tab3user">文章 <span class="counts" id="artCount"></span></li>
66
						<li rel="item6user" id="tab6user">资料</li>
67
						<li rel="item8user" id="tab8user" tmp="item8more" class="rightbtn">更多<em class="foldtr"></em></li>
68 68
					</ul>
69 69
					<div class="moreNav" id="item8more">
70 70
						<ul class="moreNavUl clearfix">
@ -81,24 +81,17 @@
81 81
								</ul>
82 82
							</div>
83 83
						</div>
84
						<div class="coninfobox needinfobox establishments">
85
							<div class="form-item otherShow">
84
						<div class="coninfobox splitBlock clearfix displayNone">
85
							<div class="form-item otherShow displayNone">
86 86
								<div class="coninfotit">可提供服务<span class="seeMore" id="seeMoreS">查看全部<em></em></span></div>
87 87
								<div class="coninfocon form-result aboutRes">
88 88
									<ul id="showService">
89
										<li><a href="resourceShow.html" class="flexCenter urlgo">
90
											<div class="madiaHead resouseHead" id="userimg"></div>
91
											<div class="madiaInfo">
92
												<p class="h1Font ellipsisSty-2" id="resourceName">习近平将对哈萨克斯坦进行国事访问并出席活动习近平将对哈萨克斯坦进行国事访问并出席活动习近平将对哈萨克斯坦进行国事访问并出席活动</p>
93
												<p class="h2Font ellipsisSty">应用用途:习近平将对哈萨克斯坦进行国事访问并出席活动习近平将对哈萨克斯坦进行国事访问并出席活动习近平将对哈萨克斯坦进行国事访问并出席活动</p>
94
											</div>
95
										</a>
96
										</li>
89
										
97 90
									</ul>
98 91
								</div>
99 92
							</div>
100
							<div class="form-item otherShow">
101
								<div class="coninfotit" style="margin-top:30px">可共享资源<span class="seeMore" id="seeMoreR">查看全部<em></em></span></div>
93
							<div class="form-item otherShow displayNone">
94
								<div class="coninfotit">可共享资源<span class="seeMore" id="seeMoreR">查看全部<em></em></span></div>
102 95
								<div class="coninfocon form-result aboutRes">
103 96
									<ul id="showResource">
104 97
										
@ -144,16 +137,7 @@
144 137
								<ul id="proResource">
145 138
									
146 139
								</ul>
147
								<!--无搜索结果-->
148
								<button class="js-load-more resoucePageCode"></button>
149
						      	<div class="nodatabox displayNone">
150
							        <div class="nodata">
151
							            <div class="picbox picNull"></div>
152
							            <div class="txtbox">
153
							            	<p class="noContip"></p>
154
							            </div>
155
							        </div>
156
							    </div>
140
								<button class="js-load-more"></button>
157 141
							</div>
158 142
						</div>
159 143
					</div>
@ -163,16 +147,7 @@
163 147
								<ul id="proArticel">
164 148
									
165 149
								</ul>
166
								<!--无搜索结果-->	
167
								<button class="js-load-more expertPageCode"></button>
168
							    <div class="nodatabox displayNone">
169
							        <div class="nodata">
170
							            <div class="picbox picNull"></div>
171
							            <div class="txtbox">
172
							            	<p class="noContip"></p>
173
							            </div>
174
							        </div>
175
							    </div>
150
								<button class="js-load-more"></button>
176 151
							</div>
177 152
						</div>
178 153
					</div>
@ -200,7 +175,7 @@
200 175
								</ul>
201 176
							</div>
202 177
						</div>
203
						<div class="coninfobox">
178
						<div class="coninfobox displayNone">
204 179
							<div class="coninfotit">工商信息</div>
205 180
							<div class="coninfocon">
206 181
								<ul id="comMes">
@ -215,14 +190,7 @@
215 190
								<ul id="attendMy">
216 191
									
217 192
								</ul>
218
								<div class="nodatabox displayNone">
219
							        <div class="nodata">
220
							            <div class="picbox picNull"></div>
221
							            <div class="txtbox">
222
							            	<p class="noContip">用户暂时还没被其他任何人关注</p>
223
							            </div>
224
							        </div>
225
							    </div>
193
								<button class="js-load-more"></button>
226 194
							</div>
227 195
						</div>
228 196
					</div>
@ -232,15 +200,6 @@
232 200
								<ul id="proService">
233 201
									
234 202
								</ul>
235
								<!--无搜索结果-->
236
								<div class="nodatabox displayNone">
237
							        <div class="nodata">
238
							            <div class="picbox picNull"></div>
239
							            <div class="txtbox">
240
							            	<p class="noContip"></p>
241
							            </div>
242
							        </div>
243
							    </div>
244 203
								<button class="js-load-more"></button>
245 204
							</div>
246 205
						</div>

+ 1 - 1
css/common.css

@ -93,7 +93,7 @@ input{ outline:none;}
93 93

94 94
/*------------------------------------------------------------------------------------*/
95 95
/*点击加载更多*/
96
.js-load-more{position:relative;outline:0;background:rgba(255,153,0,1);border:none;height: 40px;border-radius: 5px;width:200px;margin:20px auto 10px;left: 50%;margin-left: -100px;cursor: pointer;}
96
.js-load-more{position:relative;outline:0;background:#ff9900;border:none;height: 40px;border-radius: 5px;width:200px;margin:20px auto 10px;left: 50%;margin-left: -100px;cursor: pointer;}
97 97
.js-load-more:before{position:absolute;content:"点击加载更多";top:0;left:29%;font-size: 15px;line-height: 40px;color:#fff;}
98 98
.js-load-more.active{background:buttonface;}
99 99
.js-load-more.active:before{content:"加载中...";left:38%;}

+ 4 - 0
css/genindex.css

@ -880,6 +880,10 @@ div.zoomMask{position:absolute;background:url("../images/g-resource-mask.png") r
880 880
.aboutPa .form-result ul.authorBox>li>a{max-width:80%;}
881 881
882 882
/*--------------新版需求相关--------------*/
883
.splitBlock{padding-top:0;padding-bottom:30px;margin-bottom:20px; clear: both;}
884
.splitBlock:before,.splitBlock:after {display: table;content: " ";}
885
.splitBlock:after {clear: both;}
886
.splitBlock .coninfotit{margin-top:30px}
883 887
.needinfobox.coninfobox{margin-bottom:20px;padding-bottom: 30px;}
884 888
.needList.form-item ul .h1Font{font-size: 18px;margin-bottom: 10px;line-height:24px;}
885 889
.needList.form-item ul .h2Font{font-size: 14px;line-height:24px;margin:8px 0;}

+ 3 - 3
information.html

@ -59,10 +59,10 @@
59 59
								<span class="col-w-2 lableSpan">性别:</span>
60 60
								<div class="col-w-4">
61 61
									<label class="radiolabel">
62
										<input type="radio" name="sex" value="" />男
62
										<input type="radio" name="sex" value="1" />男
63 63
									</label>
64 64
									<label class="radiolabel">
65
										<input type="radio" name="sex" value="" />女
65
										<input type="radio" name="sex" value="2" />女
66 66
									</label>
67 67
								</div>
68 68
							</li>
@ -71,7 +71,7 @@
71 71
								<div class="col-w-4" style="position: relative;">
72 72
									<div class="input-append date form_date dateBtn" data-date="" data-date-format="yyyy-mm-dd" data-link-field="dtp_input2" data-link-format="yyyy-mm-dd">
73 73
										<em class="mr_sj"></em>
74
										<input size="16" type="text" value="" readonly class="frmtype frmcontype fColor" placeholder="请选择出生日期" id="createTime" style="background:#ffffff;">
74
										<input size="16" type="text" value="" readonly class="frmtype frmcontype fColor" placeholder="请选择出生日期" id="birthTime" style="background:#ffffff;">
75 75
										<span class="dateIcon"><i class="icon-calendar"></i></span>
76 76
										<span class="add-on"><i class="icon-th displayNone"></i></span>
77 77
									</div>

+ 648 - 743
js/cmpInforShow.js

@ -5,556 +5,458 @@ $(function() {
5 5
	if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){
6 6
	 	location.href="http://" + window.location.host + "/e/c.html?id="+orgId;
7 7
	}
8
	var oName = "";
9
	var watchType=0;
10
	var pageSize=10;
11
	if(orgId) {
12
		getCmpInfo(orgId); //获取详细信息
13
		getResource(1, true); //获取发布的资源
14
		getArticle(1, true); //获取发布的文章
15
		getDemands(1,true)//获取发布的需求
16
		relevantarticalList();//相关文章
17
		likeExperts();//感兴趣专家
18
		attentMy();
19
		pageViewLog(orgId,6)
20
		ifcollectionAbout(orgId,$(".goSpan").find(".attenSpan"),6);
21
		
22
//		$(".navconBox").on("click","li",function(){
23
//			$(this).addClass("liNow").siblings().removeClass("	");
24
//			$(".leftconBox .leftconItem").eq($(".navconBox li").index(this)).show().siblings().hide();
25
//		})
26
//		$(".navconBox>.mainNavUl").on("click","li:not('.rightbtn')",function(){
27
//			$(".moreNav").hide();
28
//		})
29
//		$(".navconBox>.mainNavUl").on("click","li.rightbtn",function(){
30
//			$(".moreNav").show();
31
//		})
32
//		$(".moreNavUl").on("click","li",function(){//获取关注对象类型标志
33
//			watchType=$(this).attr("data-num");
34
//			$("#item7user>.coninfobox").show();
35
//			attentMy()
36
//		})
37
		$("#attendmyGo").on("click",function(){
38
			$(".mainNavUl li.rightbtn").addClass("liNow").siblings().removeClass("liNow");
39
			$(".navconBox .moreBu").show();
40
			$("#item8user").show().siblings().hide();
41
			$(".moreBuUl li.attendMy").addClass("liNow").siblings().removeClass("liNow");
42
			$("#item8drop1").show().siblings().hide();
43
			attentMy();
44
		})
45
		//点击关注按钮
46
		$("#attentBtn").on('click', function() {
47
			if(userid && userid != null && userid != "null") {
48
				if($(this).is('.attenedSpan')){
49
					cancelCollectionAbout(orgId,$(this),6)
50
				} else {
51
					collectionAbout(orgId,$(this), 6);
52
				}
53
				guanzhuNum();
54
				attentMy();
55
			}else{
56
				quickLog();
57
				operatTab();
58
				closeLog();
59
			}
60
		});	
61

62
		//点击查看全部资源
63
		$(".coninfobox").on("click", "#seeMoreR", function() {
64
			document.body.scrollTop = document.documentElement.scrollTop = 0;
65
			$(".navconBox ul>li").eq(1).addClass("liNow").siblings().removeClass("liNow");
66
			$("#item1user").hide();
67
			$("#item2user").show();
68
		})
69
		//点击查看全部文章
70
		$(".coninfobox").on("click", "#seeMoreA", function() {
71
			document.body.scrollTop = document.documentElement.scrollTop = 0;
72
			$(".navconBox ul>li").eq(2).addClass("liNow").siblings().removeClass("liNow");
73
			$("#item1user").hide();
74
			$("#item3user").show();
75
		})
76
	}
8
	var rows = 20,
9
		dataO = {
10
			artPublishTime:"",
11
			artShareId:"",
12
			
13
			resPublishTime:"",
14
			resShareId:"",
15
			
16
			serModifyTime: "",
17
			serId: "",
18
		},
19
		watchO={
20
			beiTime:"",
21
			beiProId:"",
22
		};
23
	var oAjax = function(url, dataS, otype, oFun,beforeFun,completeFun) {
24
			$.ajax({
25
				url:url,
26
				dataType: 'json',
27
				type: otype,
28
				data: dataS,
29
				traditional: true,
30
				beforeSend: beforeFun,
31
				success: function(res) {
32
					if(res.success) {
33
						oFun(res)
34
					}
35
				},
36
				complete:completeFun
37
	            
38
			});
39
		},	
40
		insertNodata = function (targetE,newStr) {
41
            var parent = document.getElementById(targetE).parentNode;
42
            var kong = document.createElement("div");
43
            kong.className = "con-kong";
44
            kong.innerHTML ='<div class="picbox picNull"></div>'+
45
			            '<div class="txtbox">暂时没有符合该搜索条件的内容</div>'
46
            if(newStr){
47
            	kong.querySelector(".txtbox").innerHTML = newStr;
48
            }
49
            if (parent.firstChild.className == "con-kong") {
50
                return
51
            } else {
52
                parent.insertBefore(kong,parent.firstChild);
53
            }
77 54

78
	//企业详细信息
79
	function getCmpInfo(orgId) {
80
		$.ajax({
81
			type: "get",
82
			url: "/ajax/org/" + orgId,
83
			async: false,
84
			success: function(data) {
55
        },
56
        removeNodata = function (targetE) {
57
            var parent = document.getElementById(targetE).parentNode;
58
            if (parent.firstChild.className == "con-kong") {
59
                parent.removeChild(parent.firstChild);
60
            } else {
61
                return
62
            }
63
        },
64
       	getCmpInfo=function() {
65
       		oAjax("/ajax/org/" + orgId,{}, "get", function(data){
85 66
				var $info = data.data;
86
				console.log($info)
87
				if(data.success) {
88
//					if($info.resMgr){
89
						$(".establishments").show()
90
//					}
91
					if($info.hasOrgLogo) {
92
						$("#proHead").attr("src", "/images/org/" + $info.id + ".jpg");
93
					}else{
94
						$("#proHead").attr("src", "/images/default-icon.jpg");
95
					}
96
					if($info.forShort) {
97
						$("#proName").text($info.forShort);
98
					} else {
99
						$("#proName").text($info.name);
100
					}
101
					oName = $info.name;
102
					if($info.authStatus == "3") {
103
						$("#proAuth").addClass("authicon-com-ok");
104
						$("#proAuth").attr("title", "科袖认证企业");
105
					}
106
					if($info.city) {
107
						$("#proAddress").html($info.city + "<span style='margin-right:10px;'></span>");
108
					}
109
					var proOther = "";
110
					if($info.industry) {
111
						proOther = $info.industry.replace(/,/gi, " | ");
67
				if($info.resMgr){
68
					resourceListVal(true);
69
					serviceListVal(true);
70
					$(".establishments").show()
71
				}
72
				if($info.hasOrgLogo) {
73
					$("#proHead").attr("src", "/images/org/" + $info.id + ".jpg");
74
				}else{
75
					$("#proHead").attr("src", "/images/default-icon.jpg");
76
				}
77
				if($info.forShort) {
78
					$("#proName").text($info.forShort);
79
				} else {
80
					$("#proName").text($info.name);
81
				}
82
				commerceInfo($info.name);//工商信息
83
				if($info.authStatus == "3") {
84
					$("#proAuth").addClass("authicon-com-ok");
85
					$("#proAuth").attr("title", "科袖认证企业");
86
				}
87
				if($info.city) {
88
					$("#proAddress").html($info.city + "<span style='margin-right:10px;'></span>");
89
				}
90
				var proOther = "";
91
				if($info.industry) {
92
					proOther = $info.industry.replace(/,/gi, " | ");
93
				}
94
				$("#proOther").text(proOther);
95
				if($info.orgType == "2") {
96
					$("#proTit").html(orgTypeShow[$info.orgType] + "<span style='margin-right:10px;'></span>");
97
				}
98
				var llqtitle = $info.name + "-" + proOther + "科袖网"; //修改浏览器title信息
99
				document.title = llqtitle;
100
				//简介
101
				if($info.descp) {
102
					$("#item1user>.nodatabox").addClass("displayNone");
103
					$("#descpS").parents(".coninfobox").removeClass("displayNone");
104
					$("#descpS").text($info.descp);
105
				} else {
106
					$("#descpS").parents(".coninfobox").addClass("displayNone");
107
				}
108
				//学术领域		
109
				if($info.subject) {
110
					$("#item1user>.nodatabox").addClass("displayNone");
111
					$("#subjectShow").parents(".coninfobox").removeClass("displayNone");
112
					
113
					var subs=strToAry($info.subject)
114
					if(subs.length > 0) {
115
						for(var i = 0; i < subs.length; i++) {
116
							$("#subjectShow").append("<li>" + subs[i] + "</li>");
117
						};
112 118
					}
113
					$("#proOther").text(proOther);
114
					if($info.orgType == "2") {
115
						$("#proTit").html(orgTypeShow[$info.orgType] + "<span style='margin-right:10px;'></span>");
119
				} else {
120
					$("#subjectShow").parents(".coninfobox").addClass("displayNone");
121
				}
122
				//企业资质
123
				if($info.qualification) {
124
					var subs=strToAry($info.qualification)
125
					if(subs.length > 0) {
126
						for(var i = 0; i < subs.length; i++) {
127
							$("#qualification").append("<li><div class='h4tit'>" + subs[i] + "</div></li>");
128
						};
116 129
					}
117
					var llqtitle = $info.name + "-" + proOther + "科袖网"; //修改浏览器title信息
118
					document.title = llqtitle;
119
					//简介
120
					if($info.descp) {
121
						$("#item1user>.nodatabox").addClass("displayNone");
122
						$("#descpS").parents(".coninfobox").removeClass("displayNone");
123
						$("#descpS").text($info.descp);
124
					} else {
125
						$("#descpS").parents(".coninfobox").addClass("displayNone");
130
				} else {
131
					$("#qualification").parents(".coninfobox").hide();
132
				}
133

134
				//企业详情
135
				$("#orgName").text($info.name);
136
				if($info.orgSize) {
137
					$("#orgSize").text(orgSizeShow[$info.orgSize]);
138
				} else {
139
					$("#orgSize").parent("li").hide();
140
				}
141
				if($info.industry) {
142
					$("#orgIndustry").text($info.industry);
143
				} else {
144
					$("#orgIndustry").parent("li").hide();
145
				}
146
				if($info.city) {
147
					$("#orgCity").text($info.city);
148
				} else {
149
					$("#orgCity").parent("li").hide();
150
				}
151
				if($info.orgType) {
152
					$("#orgType").text(orgTypeShow[$info.orgType]);
153
				} else {
154
					$("#orgType").parent("li").hide();
155
				}
156

157
				if($info.foundTime) {
158
					$("#foundTime").text(TimeTr($info.foundTime));
159
				} else {
160
					$("#foundTime").parent("li").hide();
161
				}
162
				if($info.orgUrl) {
163
					$("#orgUrl").text($info.orgUrl);
164
				} else {
165
					$("#orgUrl").parent("li").hide();
166
				}
167
				if($info.addr) {
168
					$("#cmpAddress").text($info.addr);
169
				} else {
170
					$("#cmpAddress").parent("li").hide();
171
				}
172

173
				var weibotitle = $info.name;
174
				var weibourl = window.location.href;
175
				var weibopic = "http://" + window.location.host + "/images/org/" + $info.id + ".jpg";
176
				$("#weibo").attr("href", "http://service.weibo.com/share/share.php?appkey=3677230589&title=" + encodeURIComponent(weibotitle) + "&url=" + encodeURIComponent(weibourl) + "&pic=" + encodeURIComponent(weibopic) + "&content=utf-8" + "&ralateUid=6242830109&searchPic=false&style=simple");
177
			});
178
		},
179
        commerceInfo=function(oName){
180
			oAjax("/ajax/org/regInfo",{
181
				"name": oName
182
			}, "get", function(data){
183
				if(data.data) {
184
					$("#comMes").parents(".coninfobox").show();
185
					var $data = data.data;
186
					var str = "";
187
					if($data.num) {
188
						str += "<li>工商注册号:" + $data.num + "</li>"
126 189
					}
127
					//学术领域		
128
					if($info.subject) {
129
						$("#item1user>.nodatabox").addClass("displayNone");
130
						$("#subjectShow").parents(".coninfobox").removeClass("displayNone");
131
						
132
						var subs=strToAry($info.subject)
133
						if(subs.length > 0) {
134
							for(var i = 0; i < subs.length; i++) {
135
								$("#subjectShow").append("<li>" + subs[i] + "</li>");
136
							};
137
						}
138
					} else {
139
						$("#subjectShow").parents(".coninfobox").addClass("displayNone");
190
					if($data.code) {
191
						str += "<li>组织机构代码:" + $data.code + "</li>"
140 192
					}
141
					//企业资质
142
					if($info.qualification) {
143
						var subs=strToAry($info.qualification)
144
						if(subs.length > 0) {
145
							for(var i = 0; i < subs.length; i++) {
146
								$("#qualification").append("<li><div class='h4tit'>" + subs[i] + "</div></li>");
147
							};
148
						}
149
					} else {
150
						$("#qualification").parents(".coninfobox").hide();
193
					if($data.creditCode) {
194
						str += "<li>统一信用代码:" + $data.creditCode + "</li>"
151 195
					}
152

153
					//企业详情
154
					$("#orgName").text($info.name);
155
					if($info.orgSize) {
156
						//console.log(typeof($info.orgSize),orgSizeShow[$info.orgSize])
157
						$("#orgSize").text(orgSizeShow[$info.orgSize]);
158
					} else {
159
						$("#orgSize").parent("li").hide();
196
					if($data.type) {
197
						str += "<li>企业类型:" + $data.type + "</li>"
160 198
					}
161
					if($info.industry) {
162
						$("#orgIndustry").text($info.industry);
163
					} else {
164
						$("#orgIndustry").parent("li").hide();
199
					if($data.industry) {
200
						str += "<li>行业:" + $data.industry + "</li>"
165 201
					}
166
					if($info.city) {
167
						$("#orgCity").text($info.city);
168
					} else {
169
						$("#orgCity").parent("li").hide();
202
					if($data.operatingPeriod) {
203
						str += "<li>营业期限:" + $data.operatingPeriod + "</li>"
170 204
					}
171
					if($info.orgType) {
172
						$("#orgType").text(orgTypeShow[$info.orgType]);
173
					} else {
174
						$("#orgType").parent("li").hide();
205
					if($data.dayOfApproval) {
206
						str += "<li>核准日期:" + $data.dayOfApproval + "</li>"
175 207
					}
176

177
					if($info.foundTime) {
178
						$("#foundTime").text(TimeTr($info.foundTime));
179
					} else {
180
						$("#foundTime").parent("li").hide();
208
					if($data.manager) {
209
						str += "<li>登记机关:" + $data.manager + "</li>"
181 210
					}
182
					if($info.orgUrl) {
183
						$("#orgUrl").text($info.orgUrl);
184
					} else {
185
						$("#orgUrl").parent("li").hide();
211
					if($data.addr) {
212
						str += "<li>注册地址:" + $data.addr + "</li>"
186 213
					}
187
					if($info.addr) {
188
						$("#cmpAddress").text($info.addr);
189
					} else {
190
						$("#cmpAddress").parent("li").hide();
214
					if($data.scopeOfBusiness) {
215
						str += "<li>经营范围:" + $data.scopeOfBusiness + "</li>"
191 216
					}
192

193
					var weibotitle = $info.name;
194
					var weibourl = window.location.href;
195
					var weibopic = "http://" + window.location.host + "/images/org/" + $info.id + ".jpg";
196
					$("#weibo").attr("href", "http://service.weibo.com/share/share.php?appkey=3677230589&title=" + encodeURIComponent(weibotitle) + "&url=" + encodeURIComponent(weibourl) + "&pic=" + encodeURIComponent(weibopic) + "&content=utf-8" + "&ralateUid=6242830109&searchPic=false&style=simple");
217
					$("#comMes").html(str);
197 218
				}
198
			}
199
		});
200
	}
201
	//获取资源
202
	function getResource( pageNo, isbind) {
203
		$.ajax({
204
			"url": "/ajax/resource/pqOrgPublish",
205
			"type": "get",
206
			"async": false,
207
			"data": {
208
				"orgId": orgId,
209
				"pageSize": pageSize,
210
				"pageNo": pageNo
211
			},
212
			beforeSend: function() {
213
				$(".resourcePageCode").addClass("active").attr("disabled",true)
214
            },
215
            complete:function () {
216
            	$(".resourcePageCode").removeClass("active").removeAttr("disabled")
217
            },
218
			"success": function(data) {
219
				if(data.success) {
220
					if(data.data.total>0){
221
						$("#resCount").html(data.data.total)
222
					}else if(data.data.total>99){
223
						$("#resCount").html("99+")
224
					}
225
					if(data.data.data.length > 0) {
226
						$("#showResource").parents(".coninfobox").removeClass("displayNone");
227
						$("#item1user>.nodatabox").addClass("displayNone");
228
						for(var i = 0; i < data.data.data.length; i++) {
229
							var madiaHead = '';
230
							if(data.data.data[i].images.length) {
231
								madiaHead = '/data/resource/' + data.data.data[i].images[0].imageSrc;
232
							} else {
233
								madiaHead = '/images/default-resource.jpg';
234
							}
235
							var strAdd = '';
236
							strAdd += '<li><a href="resourceShow.html?resourceId=' + data.data.data[i].resourceId + '" class="flexCenter urlgo">';
237
							strAdd += '<div class="madiaHead resouseHead" style="background-image:url(' + madiaHead + ')"></div>';
238
							strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">' + data.data.data[i].resourceName + '</p><p class="h2Font ellipsisSty">应用用途:' + data.data.data[i].supportedServices + '</p></div>';
239
							strAdd += '</a></li>';
240

241
							var $strAdd = $(strAdd);
242
							$("#proResource").append(strAdd);
243
							if(isbind==true && i==0){
244
								var $strAddO=$(strAdd);
245
								$("#showResource").html("");
246
								$("#showResource").append($strAddO);
247
							}
248
						}
249
						if(isbind){
250
							$(".resoucePageCode").on("click", function () {
251
								getResource(++pageNo,false);
252
                            });
219
			});
220
		},
221
       	demandListVal=function(isbind) {
222
			oAjax("/ajax/demand/pq",{
223
				"state":'1',
224
				"oid":orgId,
225
				"pageSize":5
226
			}, "get", function(data){
227
				var $info = data.data.data;
228
				if($info.length > 0){
229
					$("#showDemand").parents(".coninfobox").removeClass("displayNone");
230
					$("#item1user>.nodatabox").addClass("displayNone");
231
					for(var i = 0; i < $info.length; i++) {
232
						var liStr=$("<li></li>").appendTo("#showDemand");
233
						var $data=$info[i];
234
						var sowU="";
235
						if($data.pageViews!=0){
236
							sowU='<li><span>浏览量 '+$data.pageViews +'</span></li>'
253 237
						}
254
						if (pageNo >= Math.ceil(data.data.total /pageSize)) {
255
                            $(".resoucePageCode").unbind("click");
256
                            $(".resoucePageCode").hide();
257
                        }
258
						
259
					} else {
260
						$(".resoucePageCode").hide();
261
						$("#item2user .nodatabox").show();
262
						$("#item2user .nodatabox").find(".noContip").text("企业尚未发布任何资源");
238
						var strCon='';
239
							strCon+='<a class="" target="_blank" href="demandShow.html?demandId='+$data.id+'" class="madiaInfo">'
240
							strCon+='<p class="h1Font ellipsisSty">'+ $data.title +'</p>'
241
							strCon+='<ul class="showliTop h3Font clearfix">'
242
							strCon+='<li><span>发布于 '+TimeTr($data.createTime)+'</span></li>'
243
							strCon+= sowU
244
							strCon+='</ul>'
245
							strCon+='<p class="h2Font ellipsisSty-2">'+$data.descp+'</p>'
246
							strCon+='<ul class="showli clearfix h3Font">'
247
							
248
							if($data.city){ strCon+='<li>所在城市:'+$data.city+'</li>' }
249
							if($data.duration!=0){ strCon+='<li>预期时长:'+demandDuration[$data.duration]+'</li>' }
250
							if($data.cost!=0){ strCon+='<li>费用预算:'+demandCost[$data.cost]+'</li>' }
251
							if($data.invalidDay){ strCon+='<li>有效期至:'+TimeTr($data.invalidDay)+'</li>' }
252
							
253
							strCon+='</ul>'
254
							strCon+='</a>'
255
						$(strCon).appendTo(liStr);
263 256
					}
257
				}else{
258
					$("#showDemand").parents(".needinfobox").addClass("displayNone");
264 259
				}
265
						if($data.duration!=0){ strCon+='<li>预期时长:'+demandDuration[$data.duration]+'</li>' },
266
			"error": function() {
267
				$.MsgBox.Alert("提示", "服务器连接超时")
268
			}
269
		});
270
	}
271
	//获取文章
272
	function getArticle(pageNo, isbind) {
273
		$.ajax({
274
			url: "/ajax/article/pqOrgPublish",
275
			dataType: 'json', //数据格式类型
276
			type: 'GET', //http请求类型
277
			data: {
278
				"orgId": orgId,
279
				"pageSize": pageSize,
280
				"pageNo": pageNo
281
			},
282
			timeout: 10000, //超时设置
283
			beforeSend: function() {
284
				$(".expertPageCode").addClass("active").attr("disabled",true)
285
            },
286
            complete:function () {
287
            	$(".expertPageCode").removeClass("active").removeAttr("disabled")
288
            },
289
			success: function(data) {
290
				if(data.success) {
291
					if(data.data.total>0){
292
						$("#artCount").html(data.data.total)
293
					}
294
					if(data.data.total>99){
295
						$("#artCount").html("99+")
296
					}
297
					if(data.data.data.length > 0) {
298
						$("#showArticle").parents(".coninfobox").removeClass("displayNone");
299
						$("#item1user>.nodatabox").addClass("displayNone");
300
						for(var i = 0; i < data.data.data.length; i++) {
301
							var madiaHead = '/images/default-artical.jpg';
302
							if(data.data.data[i].articleImg) {
303
								madiaHead = '/data/article/' + data.data.data[i].articleImg;
304
							}
305
							var sowU='';
306
							if(data.data.data[i].pageViews!=0){
307
								if(data.data.data[i].articleAgree!=0){
308
									sowU='<li><span>阅读量 '+data.data.data[i].pageViews+'</span></li><li><span>赞 '+data.data.data[i].articleAgree+'</span></li>'
309
								}else{
310
									sowU='<li><span>阅读量 '+data.data.data[i].pageViews+'</span></li>'
311
								}
312
							}
313
							
314
							var strAdd = '';
315
							strAdd += '<li><a href="/' + pageUrl('a',data.data.data[i]) + '" class="flexCenter urlgo">';
316
							strAdd += '<div class="madiaHead artHead" style="background-image:url(' + madiaHead + ')"></div>';
317
							strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">' + data.data.data[i].articleTitle + '</p>';
318
							strAdd += '<ul class="h2Font clearfix">';
319
							strAdd += '<li><span class="time">' + commenTime(data.data.data[i].publishTime) + '</span></li>';
320
							strAdd += sowU
321
							strAdd += '<li><span class="leaveMsgCount"></span></li>';
322
							strAdd += '</ul></div>';
323
							strAdd += '</a></li>';
324

325
							var $strAdd = $(strAdd);
326
							$("#proArticel").append($strAdd);
327
							leaveMsgCount(data.data.data[i].articleId,1,$strAdd);
328
							if(isbind==true && i==0){
329
								var $strAddO = $(strAdd);
330
								$("#showArticle").append($strAddO);
331
								leaveMsgCount(data.data.data[0].articleId,1,$strAddO);
332
							}
333

334
						}
335
						if(isbind){
336
							$(".expertPageCode").on("click", function () {
337
								getArticle(++pageNo,false);
338
                            });
260
			})
261
		},
262
        articalListVal=function(isbind){
263
			var aimId="proArticel",aimIdF="showArticle",newStr="企业尚未发布任何文章"
264
			oAjax("/ajax/article/publish",{
265
				"category": "2",
266
				"owner":orgId,
267
				"publishTime":dataO.artPublishTime,
268
				"shareId": dataO.artShareId,
269
				"rows": rows
270
			}, "get", function(res){
271
				var $info = res.data;
272
				if($info.length > 0) {
273
					$("#"+aimId).show()
274
					$("#"+aimIdF).parents(".coninfobox").removeClass("displayNone");
275
					dataO.artPublishTime = $info[$info.length - 1].publishTime;
276
					dataO.artShareId = $info[$info.length - 1].shareId;
277
			
278
					for(var i = 0; i < $info.length; i++) {
279
						var sowU="",hasImg="/images/default-artical.jpg"
280
						if($info[i].articleImg) {
281
							hasImg="/data/article/" + $info[i].articleImg
339 282
						}
340
						if (pageNo >= Math.ceil(data.data.total / pageSize)) {
341
                            $(".expertPageCode").unbind("click");
342
                            $(".expertPageCode").hide();
343
                        }
344
					} else {
345
						$(".expertPageCode").hide();
346
						$("#item3user  .nodatabox").show();
347
						$("#item3user  .nodatabox").find(".noContip").text("企业尚未发布任何文章");
348
						var i = 0;
349
						$("#item1user").find('.coninfobox').each(function() {
350
							if($(this).css("display") == "none") {
351
								i++;
283
						if($info[i].pageViews!=0){
284
							if($info[i].articleAgree!=0){
285
								sowU='<li><span>阅读量 '+$info[i].pageViews+'</span></li><li><span>赞 '+$info[i].articleAgree+'</span></li>'
286
							}else{
287
								sowU='<li><span>阅读量 '+$info[i].pageViews+'</span></li>'
352 288
							}
353
						})
354
						if(i == 4) {
355
							$("#item1user").hide();
356
							$(".navconBox ul>li").eq(3).addClass("liNow").siblings().removeClass("liNow");
357
							$("#item6user").show();
289
						}
290
						var itemlist = '<li>';
291
							itemlist += '<a href="/'+pageUrl('a',$info[i])+'" class="flexCenter urlgo">';
292
							itemlist += '<div class="madiaHead artHead" style="background-image:url(' + hasImg + ')"></div>';
293
							itemlist += '<div class="madiaInfo">';
294
							itemlist += '<p class="h1Font ellipsisSty-2">'+$info[i].articleTitle+'</p>';
295
							itemlist += '<ul class="h2Font clearfix">';
296
							itemlist += '<li><span class="time">' + commenTime($info[i].publishTime) + '</span></li>';
297
							itemlist += sowU
298
							itemlist += '<li><span class="leaveMsgCount"></span></li>';
299
							itemlist += '</ul></div>';
300
							itemlist += '</a></li>';
301
						var $itemlist = $(itemlist);
302
						$("#"+aimId).append($itemlist)
303
						leaveMsgCount($info[i].articleId,1,$itemlist);
304
						
305
						if(isbind && i==0){
306
							var $itemlist = $(itemlist);
307
							$("#"+aimIdF).append($itemlist);
308
							leaveMsgCount($info[0].articleId,1,$itemlist);
358 309
						}
359 310
					}
360 311
				}
361
			},
362
			error: function() {
363
				return;
364
			}
365
		});
366

367
	}
368
	//获取服务
369
	function getService(isbind) {
370
		$.ajax({
371
			url: "/ajax/ware/publish",
372
			dataType: 'json', //数据格式类型
373
			type: 'GET', //http请求类型
374
			data: {
375
				"catagory":2, 
312
				var liLen=document.getElementById(aimId).querySelectorAll("li").length;
313
                removeNodata(aimId);
314
                if($info.length == 0 && liLen == 0 ){
315
                	$("#"+aimId).hide()
316
                    insertNodata(aimId,newStr);
317
                }
318
                if(isbind){
319
                	$("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
320
					 	articalListVal(false)
321
					})
322
                }
323
				if ($info.length < rows) {
324
                    $("#"+aimId).parent().find(".js-load-more").unbind("click");
325
                    $("#"+aimId).parent().find(".js-load-more").hide();
326
                }
327
			},function(){
328
				$("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
329
	       		$("#"+aimId).parent().find(".js-load-more").addClass("active");
330
			},function(){
331
				$("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
332
	        	$("#"+aimId).parent().find(".js-load-more").removeClass("active");
333
			})
334
		},
335
		resourceListVal=function(isbind){
336
			var aimId="proResource",aimIdF="showResource",newStr="企业尚未发布任何资源"
337
			oAjax("/ajax/resource/publish",{
338
				"category": "2",
376 339
				"owner":orgId,
377
				"modifyTime":"" ,
378
				"rows":rows,
379
			},
380
			timeout: 10000, //超时设置
381
			beforeSend: function() {
382
				$(".expertPageCode").addClass("active").attr("disabled",true)
383
            },
384
            complete:function () {
385
            	$(".expertPageCode").removeClass("active").removeAttr("disabled")
386
            },
387
			success: function(data) {
388
				if(data.success) {
389
					if(data.data.total>0){
390
						$("#artCount").html(data.data.total)
391
					}
392
					if(data.data.total>99){
393
						$("#artCount").html("99+")
394
					}
395
					if(data.data.data.length > 0) {
396
						$("#showArticle").parents(".coninfobox").removeClass("displayNone");
397
						$("#item1user>.nodatabox").addClass("displayNone");
398
						for(var i = 0; i < data.data.data.length; i++) {
399
							var madiaHead = '/images/default-artical.jpg';
400
							if(data.data.data[i].articleImg) {
401
								madiaHead = '/data/article/' + data.data.data[i].articleImg;
402
							}
403
							var sowU='';
404
							if(data.data.data[i].pageViews!=0){
405
								if(data.data.data[i].articleAgree!=0){
406
									sowU='<li><span>阅读量 '+data.data.data[i].pageViews+'</span></li><li><span>赞 '+data.data.data[i].articleAgree+'</span></li>'
407
								}else{
408
									sowU='<li><span>阅读量 '+data.data.data[i].pageViews+'</span></li>'
409
								}
410
							}
411
							
412
							var strAdd = '';
413
							strAdd += '<li><a href="/' + pageUrl('a',data.data.data[i]) + '" class="flexCenter urlgo">';
414
							strAdd += '<div class="madiaHead artHead" style="background-image:url(' + madiaHead + ')"></div>';
415
							strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">' + data.data.data[i].articleTitle + '</p>';
416
							strAdd += '<ul class="h2Font clearfix">';
417
							strAdd += '<li><span class="time">' + commenTime(data.data.data[i].publishTime) + '</span></li>';
418
							strAdd += sowU
419
							strAdd += '<li><span class="leaveMsgCount"></span></li>';
420
							strAdd += '</ul></div>';
421
							strAdd += '</a></li>';
422

423
							var $strAdd = $(strAdd);
424
							$("#proArticel").append($strAdd);
425
							leaveMsgCount(data.data.data[i].articleId,1,$strAdd);
426
							if(isbind==true && i==0){
427
								var $strAddO = $(strAdd);
428
								$("#showArticle").append($strAddO);
429
								leaveMsgCount(data.data.data[0].articleId,1,$strAddO);
430
							}
431

432
						}
433
						if(isbind){
434
							$(".expertPageCode").on("click", function () {
435
								getArticle(++pageNo,false);
436
                            });
340
				"publishTime":dataO.resPublishTime,
341
				"shareId": dataO.resShareId,
342
				"rows": rows
343
			}, "get", function(res){
344
				var $info = res.data;
345
				if($info.length > 0) {
346
					$("#"+aimId).show()
347
					$("#"+aimIdF).parents(".form-item").removeClass("displayNone");
348
					$("#"+aimIdF).parents(".coninfobox").show();
349
					dataO.resPublishTime = $info[$info.length - 1].publishTime;
350
					dataO.resShareId = $info[$info.length - 1].shareId;
351
			
352
					for(var i = 0; i < $info.length; i++) {
353
						var hasImg='/images/default-resource.jpg'
354
						if($info[i].images.length) {
355
							hasImg="/data/resource/" + $info[i].images[0].imageSrc
437 356
						}
438
						if (pageNo >= Math.ceil(data.data.total / pageSize)) {
439
                            $(".expertPageCode").unbind("click");
440
                            $(".expertPageCode").hide();
441
                        }
442
					} else {
443
						$(".expertPageCode").hide();
444
						$("#item3user  .nodatabox").show();
445
						$("#item3user  .nodatabox").find(".noContip").text("企业尚未发布任何文章");
446
						var i = 0;
447
						$("#item1user").find('.coninfobox').each(function() {
448
							if($(this).css("display") == "none") {
449
								i++;
450
							}
451
						})
452
						if(i == 4) {
453
							$("#item1user").hide();
454
							$(".navconBox ul>li").eq(3).addClass("liNow").siblings().removeClass("liNow");
455
							$("#item6user").show();
357
						
358
						var itemlist = '<li>';
359
							itemlist += '<a href="resourceShow.html?resourceId=' + $info[i].resourceId + '" class="flexCenter urlgo">';
360
							itemlist += '<div class="madiaHead resouseHead" style="background-image:url(' + hasImg + ')"></div>';
361
							itemlist += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">' + $info[i].resourceName + '</p><p class="h2Font ellipsisSty">应用用途:' + $info[i].supportedServices + '</p></div>';
362
							itemlist += '</a></li>';
363
						var $itemlist = $(itemlist);
364
						$("#"+aimId).append($itemlist)
365
						
366
						if(isbind && i==0){
367
							var $itemlist = $(itemlist);
368
							$("#"+aimIdF).append($itemlist);
456 369
						}
457 370
					}
458 371
				}
459
			},
460
			error: function() {
461
				return;
462
			}
463
		});
464

465
	}
466

467
	//关注企业数量
468
	function guanzhuNum() {
469
		$.ajax({
470
			"url": "/ajax/watch/countProfessor",
471
			"type": "GET",
472
			"dataType": "json",
473
			"async": true,
474
			"data": {
475
				"id": orgId,
476
				"type": 6
477
			},
478
			"success": function(data) {
479
				if(data.success) {
480
					$("#attenNum").text(data.data);
481
				}
482
			},
483
			"error": function() {
484
				$.MsgBox.Alert('提示', '链接服务器超时')
485
			}
486
		});
487
	}
488
	guanzhuNum();
489
	function comNum() {
490
		$.ajax({
491
			"url": "/ajax/org/regInfo", 
492
			"type": "get",
493
			"dataType": "json",
494
			"data": {
495
				"name": oName
496
			},
497
			"success": function(data) {
498
				if(data.success) {
499
					if(data.data) {
500
						var $data = data.data;
501
						var str = "";
502
						if($data.num) {
503
							str += "<li>工商注册号:" + $data.num + "</li>"
504
						}
505
						if($data.code) {
506
							str += "<li>组织机构代码:" + $data.code + "</li>"
507
						}
508
						if($data.creditCode) {
509
							str += "<li>统一信用代码:" + $data.creditCode + "</li>"
510
						}
511
						if($data.type) {
512
							str += "<li>企业类型:" + $data.type + "</li>"
513
						}
514
						if($data.industry) {
515
							str += "<li>行业:" + $data.industry + "</li>"
516
						}
517
						if($data.operatingPeriod) {
518
							str += "<li>营业期限:" + $data.operatingPeriod + "</li>"
519
						}
520
						if($data.dayOfApproval) {
521
							str += "<li>核准日期:" + $data.dayOfApproval + "</li>"
522
						}
523
						if($data.manager) {
524
							str += "<li>登记机关:" + $data.manager + "</li>"
525
						}
526
						if($data.addr) {
527
							str += "<li>注册地址:" + $data.addr + "</li>"
372
				var liLen=document.getElementById(aimId).querySelectorAll("li").length;
373
                removeNodata(aimId);
374
                if($info.length == 0 && liLen == 0 ){
375
                	$("#"+aimId).hide()
376
                    insertNodata(aimId,newStr);
377
                }
378
                if(isbind){
379
                	$("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
380
					 	resourceListVal(false)
381
					})
382
                }
383
				if ($info.length < rows) {
384
                    $("#"+aimId).parent().find(".js-load-more").unbind("click");
385
                    $("#"+aimId).parent().find(".js-load-more").hide();
386
                }
387
			},function(){
388
				$("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
389
	       		$("#"+aimId).parent().find(".js-load-more").addClass("active");
390
			},function(){
391
				$("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
392
	        	$("#"+aimId).parent().find(".js-load-more").removeClass("active");
393
			})
394
		},
395
		serviceListVal=function(isbind){
396
			var aimId="proService",aimIdF="showService",newStr="企业尚未发布任何服务"
397
			oAjax("/ajax/ware/publish",{
398
				"category":"2",
399
				"owner":orgId,
400
				"modifyTime":dataO.serModifyTime,
401
				"rows": rows
402
			}, "get", function(res){
403
				var $info = res.data;
404
				if($info.length > 0) {
405
					$("#"+aimId).show()
406
					$("#"+aimIdF).parents(".form-item").removeClass("displayNone");
407
					$("#"+aimIdF).parents(".coninfobox").show();
408
					dataO.serModifyTime = $info[$info.length - 1].modifyTime;
409
			
410
					for(var i = 0; i < $info.length; i++) {
411
						var cnt="", hasImg="../images/default-service.jpg"
412
						if($info[i].images) {
413
							var subs = strToAry($info[i].images)
414
							if(subs.length > 0) {
415
								hasImg="/data/ware" + subs[0]
416
							}
528 417
						}
529
						if($data.scopeOfBusiness) {
530
							str += "<li>经营范围:" + $data.scopeOfBusiness + "</li>"
418
						var itemlist = '<li>';
419
							itemlist += '<a href="serviceShow.html?serviceId=' + $info[i].id + '" class="flexCenter urlgo">';
420
							itemlist += '<div class="madiaHead resouseHead" style="background-image:url(' + hasImg + ')"></div>';
421
							itemlist += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">' + $info[i].name + '</p><p class="h2Font ellipsisSty">' + cnt+ '</p></div>';
422
							itemlist += '</a></li>';
423
						var $itemlist = $(itemlist);
424
						$("#"+aimId).append($itemlist)
425
						
426
						if(isbind && i==0){
427
							var $itemlist = $(itemlist);
428
							$("#"+aimIdF).append($itemlist);
531 429
						}
532
						$("#comMes").html(str);
533
					}else {
534
						$("#comMes").parents(".coninfobox").hide();
535 430
					}
536
				}else{
537
					$("#comMes").parents(".coninfobox").hide();
538 431
				}
539
			},
540
			"error": function() {
541
				$.MsgBox.Alert('提示', '链接服务器超时')
542
			}
543
		});
544
	}
545
	comNum();
546
	//相关文章信息
547
	function relevantarticalList(){
548
		$.ajax({
549
			"url" : "/ajax/article/byAssOrg",
550
			"type" :  "GET" ,
551
			"dataType" : "json",
552
			"data" :{"id":orgId},
553
			//"async":false,
554
			"traditional": true, //传数组必须加这个
555
			"success" : function(data) {
556
				console.log(data);
557
				if (data.success && data.data!=""){
432
				var liLen=document.getElementById(aimId).querySelectorAll("li").length;
433
                removeNodata(aimId);
434
                if($info.length == 0 && liLen == 0 ){
435
                	$("#"+aimId).hide()
436
                    insertNodata(aimId,newStr);
437
                }
438
                if(isbind){
439
                	$("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
440
					 	serviceListVal(false)
441
					})
442
                }
443
				if ($info.length < rows) {
444
                    $("#"+aimId).parent().find(".js-load-more").unbind("click");
445
                    $("#"+aimId).parent().find(".js-load-more").hide();
446
                }
447
			},function(){
448
				$("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
449
	       		$("#"+aimId).parent().find(".js-load-more").addClass("active");
450
			},function(){
451
				$("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
452
	        	$("#"+aimId).parent().find(".js-load-more").removeClass("active");
453
			})
454
		},
455
		relevantarticalList=function(){//相关文章信息
456
			oAjax("/ajax/article/byAssOrg",{
457
				"id":orgId
458
			}, "get", function(data){
459
				if(data.data.length>0){
558 460
					$("#relateArt").parents(".conBlock").removeClass("displayNone");
559 461
					var itemlist = '';
560 462
					$("#relateArt").html("");
@ -566,22 +468,12 @@ $(function() {
566 468
						$("#relateArt").append($itemlist);
567 469
					}
568 470
				}
569
			},
570
			"error":function(){
571
				$.MsgBox.Alert('提示','链接服务器超时')
572
			}
573
		});
574
	}
575
	//感兴趣
576
	function likeExperts(){
577
		$.ajax({
578
			"url": "/ajax/org/ralateOrgs",
579
			"type": "get",
580
			"dataType" : "json",
581
			"data" :{"orgId":orgId},
582
			"success": function(data) {
583
				if(data.success && data.data) {
584
					console.log(data)
471
			});
472
		},
473
		likeExperts=function(){//感兴趣的企业
474
			oAjax("/ajax/org/ralateOrgs",{
475
				"orgId":orgId
476
			}, "get", function(data){
585 477
					var lengthT;
586 478
					if(data.data.length>5){
587 479
						lengthT=5;
@ -590,230 +482,243 @@ $(function() {
590 482
					}
591 483
					for(var i = 0; i < lengthT; i++) {
592 484
						var ExpId = data.data[i].id;
593
						likeExpertsList(ExpId);
485
						(function(Id){
486
							oAjax("/ajax/org/"+Id,{}, "get", function(data){
487
								$("#relateCmp").parents(".conBlock").removeClass("displayNone");
488
								var name="",sty="",styT="",title="",hasImg="images/default-icon.jpg"
489
								if(data.data.forShort){
490
									name=data.data.forShort;
491
								}else{
492
									name=data.data.name;
493
								}
494
								if(data.data.authStatus==3){
495
									sty="authicon-com-ok"
496
									styT="科袖认证企业"
497
								}
498
								if(data.data.industry){
499
									title=data.data.industry.replace(/,/gi, " | ");
500
								}
501
								if(data.data.hasOrgLogo == 1) {
502
									hasImg="/images/org/" + data.data.id + ".jpg";
503
								}
504
								var itemlist = '<li class="flexCenter"><a target="_blank" href="cmpInforShow.html?orgId='+data.data.id+'" class="urlgo">';
505
									itemlist += '<div class="madiaHead cmpHead cmpHead2"><div class="boxBlock">';
506
									itemlist += '<img class="boxBlockimg" src="'+hasImg+'" /></div></div>';
507
									itemlist += '<div class="madiaInfo">';
508
									itemlist += '<p class="clearfix"><span class="h1Font ellipsisSty floatL" style="display:block;max-width:136px">'+name+'</span><em class="authiconNew floatL '+sty+'" title="'+styT+'"></em></p>';
509
									itemlist += '<p class="ellipsisSty h2Font">'+title+'</p>';
510
									itemlist += '</div></a></li>';
511
								$itemlist = $(itemlist);
512
								
513
								$("#relateCmp").append($itemlist);
514
							})
515
						})(ExpId)
594 516
					}
595
					
517
			});
518
		},
519
		queryPubCount=function(){
520
			oAjax("/ajax/watch/countProfessor",{//关注企业数量
521
				"id": orgId,
522
				"type":"6"
523
			}, "GET", function(data){
524
				$("#attenNum").text(data.data);
525
			});
526
			oAjax("/ajax/article/count/publish",{//文章总数
527
				"owner": orgId,
528
				"category":"2"
529
			}, "GET", function(data){
530
				if(data.data>0){
531
					$("#artCount").text(data.data);
596 532
				}
597
			},
598
			"error": function() {
599
				$.MsgBox.Alert('提示', '链接服务器超时')
600
			}
601
		});
602
	}
603
	//感兴趣信息
604
	function likeExpertsList(Id){
605
		$.ajax({
606
			"url" : "/ajax/org/"+Id,
607
			"type" :  "GET" ,
608
			"dataType" : "json",
609
			"success" : function(data) {
610
				if (data.success && data.data!=""){
611
					$("#relateCmp").parents(".conBlock").removeClass("displayNone");
612
					var itemlist = '<li class="flexCenter"><a target="_blank" href="" class="urlgo">';
613
						itemlist += '<div class="madiaHead cmpHead cmpHead2"><div class="boxBlock">';
614
						itemlist += '<img class="boxBlockimg" id="userimg" src="" /></div></div>';
615
						itemlist += '<div class="madiaInfo">';
616
						itemlist += '<p class="clearfix"><span class="h1Font ellipsisSty floatL" style="display:block;max-width:136px" id="userName"></span><em class="authiconNew floatL" title=""></em></p>';
617
						itemlist += '<p class="ellipsisSty h2Font" id="usertitle"></p>';
618
						itemlist += '</div></a></li>';
619
					$itemlist = $(itemlist);
620
					
621
					$("#relateCmp").append($itemlist);
622
					
623
					if(data.data.forShort){
624
						$itemlist.find("#userName").text(data.data.forShort);
625
					}else{
626
						$itemlist.find("#userName").text(data.data.name);
627
					}
628
					
629
					$itemlist.find(".urlgo").attr("href", "cmpInforShow.html?orgId="+data.data.id);
533
				if(data.data>0 && data.data>99){
534
					$("#artCount").text("99+");
535
				}
536
			});
537
			oAjax("/ajax/resource/count/publish",{//资源总数
538
				"owner": orgId,
539
				"category":"2"
540
			}, "GET", function(data){
541
				if(data.data>0){
542
					$("#resCount").text(data.data);
543
				}
544
				if(data.data>0 && data.data>99){
545
					$("#resCount").text("99+");
546
				}
547
			});
548
			oAjax("/ajax/ware/count/publish",{//服务总数
549
				"owner": orgId,
550
				"category":"2"
551
			}, "GET", function(data){
552
				if(data.data>0){
553
					$("#serCount").text(data.data);
554
				}
555
				if(data.data>0 && data.data>99){
556
					$("#serCount").text("99+");
557
				}
558
			});
559
		},
560
		attentMyself=function(isbind){
561
			var aimId="attendMy",newStr="企业尚未被任何人关注"
562
			oAjax("/ajax/watch/watchList",{//关注我的列表
563
				"watchObject": orgId,
564
				"createTime": watchO.beiTime,
565
				"professorId":watchO.beiProId,
566
				"rows":rows
567
			}, "GET", function(res){
568
				var $info = res.data;
569
				if($info.length > 0) {
570
					$("#"+aimId).show()
571
					watchO.beiTime = $info[$info.length - 1].createTime;
572
					watchO.beiProId = $info[$info.length - 1].professorId;
630 573
					
631
					if(data.data.authStatus==3){
632
						$itemlist.find(".authiconNew").addClass("authicon-com-ok");
633
						$itemlist.find(".authiconNew").attr("title","科袖认证企业")
574
					for(var i = 0; i < $info.length; i++) {
575
						var liItem = document.createElement("li");
576
						document.getElementById("attendMy").appendChild(liItem);
577
						detailPro($info[i].professorId,liItem);
634 578
					}
635
					if(data.data.industry){
636
						$itemlist.find("#usertitle").text(data.data.industry.replace(/,/gi, " | "));
579
				}
580
				var liLen=document.getElementById(aimId).querySelectorAll("li").length;
581
                removeNodata(aimId);
582
                if($info.length == 0 && liLen == 0 ){
583
                	$("#"+aimId).hide()
584
                    insertNodata(aimId,newStr);
585
                }
586
                if(isbind){
587
                	$("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
588
					 	attentMyself(false)
589
					})
590
                }
591
				if ($info.length < rows) {
592
                    $("#"+aimId).parent().find(".js-load-more").unbind("click");
593
                    $("#"+aimId).parent().find(".js-load-more").hide();
594
                }
595
			},function(){
596
				$("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
597
	       		$("#"+aimId).parent().find(".js-load-more").addClass("active");
598
			},function(){
599
				$("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
600
	        	$("#"+aimId).parent().find(".js-load-more").removeClass("active");
601
			})
602
		},
603
		detailPro=function(pid,liItem) {
604
			oAjax("/ajax/professor/baseInfo/" + pid,{},"get",function(data){
605
				var datalist=data.data;
606
				var userType = autho(datalist.authType, datalist.orgAuth, datalist.authStatus);
607
				var os = "";
608
				if(datalist.title) {
609
					if(datalist.orgName) {
610
						os = datalist.title + "," + datalist.orgName;
611
					} else {
612
						os = datalist.title;
637 613
					}
638
					
639
					if(data.data.hasOrgLogo == 1) {
640
						$itemlist.find("#userimg").attr("src", "/images/org/" + data.data.id + ".jpg");
641
					}else{
642
						$itemlist.find("#userimg").attr("src","images/default-icon.jpg");
614
				} else {
615
					if(datalist.office) {
616
						if(datalist.orgName) {
617
							os = datalist.office + "," + datalist.orgName;
618
						} else {
619
							os = datalist.office;
620
						}
621
					} else {
622
						if(datalist.orgName) {
623
							os = datalist.orgName;
624
						}
643 625
					}
644
					
645
					
646 626
				}
647
			},
648
			"error":function(){
649
				$.MsgBox.Alert('提示','链接服务器超时')
650
			}
651
		});
652
	}
653
	//获取需求
654
	function getDemands(pageNo,isbind) {
655
		$.ajax({
656
			url: "/ajax/demand/pq",
657
			type: "GET",
658
			timeout: 10000,
659
			dataType: "json",
660
			data: {
661
				"state":'1',
662
				"oid":orgId,
663
				"pageNo": pageNo,
664
				"pageSize":pageSize
665
			},
666
			beforeSend: function() {
667
				$("#showDemand").append('<img src="../images/loading.gif" class="loading" />');
668
			},
669
			success: function(data) {
670
				if(data.success) {
671
					$("#showDemand").html(" ");
672
					var $info = data.data.data;
673
					if($info.length > 0){
674
						$("#showDemand").parents(".needinfobox").removeClass("displayNone");
675
						$("#item1user>.nodatabox").addClass("displayNone");
676
						for(var i = 0; i < $info.length; i++) {
677
							var liStr=$("<li></li>").appendTo("#showDemand");
678
							demandHtml($info[i],liStr);
679
						}
680
					}else{
681
						$("#showDemand").parents(".needinfobox").addClass("displayNone");
627
				var baImg = "../images/default-photo.jpg";
628
				if(datalist.hasHeadImage == 1) {
629
					baImg = "/images/head/" + datalist.id + "_l.jpg";
630
				}
631
				var strAdd = '';
632
					strAdd += '<a target="_blank" href="userInforShow.html?professorId='+ datalist.id +'" class="flexCenter urlgo">';
633
					strAdd += '<div class="madiaHead useHead" style="width: 80px;height: 80px;margin-top: -40px;background-image:url(' + baImg + ')"></div>';
634
					strAdd += '<div class="madiaInfo" style="padding-left:92px"><p class="h1Font ellipsisSty">' + datalist.name + '</span><em class="authicon ' + userType.sty + '" title="'+userType.title+'"></em></p>';
635
					strAdd += '<p class="h2Font ellipsisSty">' + os + '</p>';
636
					strAdd += '</div>';
637
					strAdd += '</a>';
638
				liItem.innerHTML = strAdd
639
			})
640
		},
641
		bindClickFun=function(){
642
			//点击关注按钮
643
			$("#attentBtn").on('click', function() {
644
				if(userid && userid != null && userid != "null") {
645
					if($(this).is('.attenedSpan')){
646
						cancelCollectionAbout(orgId,$(this),6)
647
					} else {
648
						collectionAbout(orgId,$(this), 6);
682 649
					}
650
					guanzhuNum();
651
					attentMy();
652
				}else{
653
					quickLog();
654
					operatTab();
655
					closeLog();
683 656
				}
684
				$(".loading").remove();
685
			},
686
			error: function() {
687
				$.MsgBox.Alert('提示', '链接服务器超时')
688
			}
689
		})
690
	}
691
	function demandHtml($data,liStr) {
692
		var sowU="";
693
		if($data.pageViews!=0){
694
			sowU='<li><span>浏览量 '+$data.pageViews +'</span></li>'
695
		}
696
		var strCon='';
697
			strCon+='<a class="" target="_blank" href="demandShow.html?demandId='+$data.id+'" class="madiaInfo">'
698
			strCon+='<p class="h1Font ellipsisSty">'+ $data.title +'</p>'
699
			strCon+='<ul class="showliTop h3Font clearfix">'
700
			strCon+='<li><span>发布于 '+TimeTr($data.createTime)+'</span></li>'
701
			strCon+= sowU
702
			strCon+='</ul>'
703
			strCon+='<p class="h2Font ellipsisSty-2">'+$data.descp+'</p>'
704
			strCon+='<ul class="showli clearfix h3Font">'
657
			});	
705 658
			
706
			if($data.city){ strCon+='<li>所在城市:'+$data.city+'</li>' }
707
			if($data.duration!=0){ strCon+='<li>预期时长:'+demandDuration[$data.duration]+'</li>' }
708
			if($data.cost!=0){ strCon+='<li>费用预算:'+demandCost[$data.cost]+'</li>' }
709
			if($data.invalidDay){ strCon+='<li>有效期至:'+TimeTr($data.invalidDay)+'</li>' }
659
			//点击查看全部服务
660
			$(".coninfobox").on("click", "#seeMoreS", function() {
661
				document.body.scrollTop = document.documentElement.scrollTop = 0;
662
				$("#tab9user").addClass("liNow").siblings().removeClass("liNow");
663
				$("#item1user").hide();
664
				$("#item9user").show();
665
			})
666
			//点击查看全部资源
667
			$(".coninfobox").on("click", "#seeMoreR", function() {
668
				document.body.scrollTop = document.documentElement.scrollTop = 0;
669
				$("#tab2user").addClass("liNow").siblings().removeClass("liNow");
670
				$("#item1user").hide();
671
				$("#item2user").show();
672
			})
673
			//点击查看全部文章
674
			$(".coninfobox").on("click", "#seeMoreA", function() {
675
				document.body.scrollTop = document.documentElement.scrollTop = 0;
676
				$("#tab3user").addClass("liNow").siblings().removeClass("liNow");
677
				$("#item1user").hide();
678
				$("#item3user").show();
679
			})
710 680
			
711
			strCon+='</ul>'
712
			strCon+='</a>'
713
		$(strCon).appendTo(liStr);	
714
	}
715
	
716
	//收藏与关注
717
	function attentMy(){
718
		var num=watchType;
719
		$.ajax({
720
			url: "/ajax/watch/qaWatch",
721
			dataType: 'json', //数据格式类型
722
			type: 'GET', //http请求类型
723
			data: {
724
				"watchObject": orgId,
725
			},
726
			timeout: 10000, //超时设置
727
			success: function(data) {
728
				if(data.success) {
729
					document.getElementById("attendMy").innerHTML="";
730
					document.getElementById("attendMy").parentNode.querySelector(".nodatabox").classList.add("displayNone");
731
					if(data.data.length>0){
732
						var datalist = data.data;
733
						for(var i = 0; i < datalist.length; i++) {
734
							var liItem = document.createElement("li");
735
							liItem.className="mui-table-view-cell";
736
							document.getElementById("attendMy").appendChild(liItem);
737
							detailPro(datalist[i],liItem);
738
						}
739
					}else{
740
						document.getElementById("attendMy").parentNode.querySelector(".nodatabox").classList.remove("displayNone");
741
					}
742
				}
743
			},
744
			error: function() {
745
				return;
746
			}
747
		});
748
	}
749
	function detailPro(datalist,liItem) {
750
		var userType = autho(datalist.professor.authType, datalist.professor.orgAuth, datalist.professor.authStatus);
751
		var os = "";
752
		if(datalist.professor.title) {
753
			if(datalist.professor.orgName) {
754
				os = datalist.professor.title + "," + datalist.professor.orgName;
755
			} else {
756
				os = datalist.professor.title;
757
			}
758
		} else {
759
			if(datalist.professor.office) {
760
				if(datalist.professor.orgName) {
761
					os = datalist.professor.office + "," + datalist.professor.orgName;
762
				} else {
763
					os = datalist.professor.office;
764
				}
765
			} else {
766
				if(datalist.professor.orgName) {
767
					os = datalist.professor.orgName;
681
			$("#attendmyGo").on("click",function(){
682
				$(".mainNavUl li.rightbtn").addClass("liNow").siblings().removeClass("liNow");
683
				$("#item8more").show();
684
				$("#item8user").show().siblings().hide();
685
				$(".moreBuUl li.attendMy").addClass("liNow").siblings().removeClass("liNow");
686
				$("#item8drop1").show().siblings().hide();
687
				attentMyself();
688
			})
689
			
690
			//纠错反馈
691
			$(".correctSubmit").on("click",function(){
692
				var cntCon=$(this).siblings(".correctCon").val();
693
				var cntUser="";
694
				if(userid && userid != null && userid != "null") {
695
					cntUser = userid;
768 696
				}
769
			}
770
		}
771
		var baImg = "../images/default-photo.jpg";
772
		if(datalist.professor.hasHeadImage == 1) {
773
			baImg = "/images/head/" + datalist.professor.id + "_l.jpg";
774
		}
775
		var strAdd = '';
776
			strAdd += '<a target="_blank" href="userInforShow.html?professorId='+ datalist.professor.id +'" class="flexCenter urlgo">';
777
			strAdd += '<div class="madiaHead useHead" style="width: 80px;height: 80px;margin-top: -40px;background-image:url(' + baImg + ')"></div>';
778
			strAdd += '<div class="madiaInfo" style="padding-left:92px"><p class="h1Font ellipsisSty">' + datalist.professor.name + '</span><em class="authicon ' + userType.sty + '" title="科袖认证专家"></em></p>';
779
			strAdd += '<p class="h2Font ellipsisSty">' + os + '</p>';
780
			strAdd += '</div>';
781
			strAdd += '</a>';
782
		liItem.innerHTML = strAdd
783
	}
784
	
785
	//纠错反馈
786
	$(".correctSubmit").on("click",function(){
787
		var cntCon=$(this).siblings(".correctCon").val();
788
		var cntUser="";
789
		if(userid && userid != null && userid != "null") {
790
			cntUser = userid;
791
		}
792
		if(cntCon.length>500){
793
			$.MsgBox.Alert('提示', '纠错反馈内容不得超过500个字');
794
			return;
795
		}else{
796
			$.ajax({
797
				"url": "/ajax/feedback/error/org",
798
				"type": "POST",
799
				"dataType": "json",
800
				"async": true,
801
				"data": {
802
					"id": orgId,
803
					"cnt":cntCon,
804
					"user":cntUser
805
				},
806
				"success": function(data) {
807
					if(data.success) {
697
				if(cntCon.length>500){
698
					$.MsgBox.Alert('提示', '纠错反馈内容不得超过500个字');
699
					return;
700
				}else{
701
					oAjax("/ajax/feedback/error/org",{
702
						"id": orgId,
703
						"cnt":cntCon,
704
						"user":cntUser
705
					}, "POST", function(data){
808 706
						backSuccessed();
809
					}
810
				},
811
				"error": function() {
812
					$.MsgBox.Alert('提示', '链接服务器超时')
707
					});
813 708
				}
814
			});
709
			})
710
	
815 711
		}
816
	})
817 712
	
713
	pageViewLog(orgId,6)
714
	queryPubCount();
715
	getCmpInfo(); //获取详细信息
716
	ifcollectionAbout(orgId,$(".goSpan").find(".attenSpan"),6);
717
	demandListVal(true);
718
	articalListVal(true);
719
	bindClickFun();
818 720
	
721
	relevantarticalList();//相关文章
722
	likeExperts();//感兴趣
723
	attentMyself(true);
819 724
})

+ 9 - 1
js/information.js

@ -27,6 +27,7 @@ $(function() {
27 27
	function getInfo(InfoId) {
28 28
		$.get("/ajax/professor/editInfo/" + InfoId, function($data) {
29 29
			if($data.success) {
30
				console.log($data)
30 31
				var $info = $data.data;
31 32
				authSD = $info.orgAuth;
32 33
				if($info) {
@ -96,7 +97,12 @@ $(function() {
96 97
					$("#descpS").text($info.descp);
97 98
					//编辑显示专家信息到保存数据
98 99
					$("#name").text($info.name);
99
//					$("input[name='sex']:checked").;
100
					if($info.sex == 1){
101
	                    document.getElementsByName('sex')[0].checked='checked';
102
	                }else{
103
	                    document.getElementsByName('sex')[1].checked='checked';
104
	                }
105
					$("#birthTime").val($info.birthday);
100 106
					$("#title").val($info.title);
101 107
					$("#orgName").val($info.orgName);
102 108
					$("#department").val($info.department);
@ -267,6 +273,8 @@ $(function() {
267 273
		$data.office = $("#officeRevise").val();
268 274
		$data.phone = $("#mobilePhone").val();
269 275
		$data.email = $("#moileMail").val();
276
		$data.sex=$("input[name='sex']:checked").val();
277
		$data.birthday=$("#birthTime").val();
270 278
		if($("#Province input[name=cho_Province]").val() != "请选择省/直辖市") {
271 279
			$data.province = $("#Province input[name=cho_Province]").val(); //省
272 280
		}

+ 1 - 1
js/searchNew.js

@ -107,7 +107,7 @@ $(function() {
107 107
            kong.innerHTML ='<div class="picbox picNull"></div>'+
108 108
			            '<div class="txtbox">暂时没有符合该搜索条件的内容</div>'
109 109
            if(newStr){
110
            	kong.querySelector(".noContip").innerHTML = newStr;
110
            	kong.querySelector(".txtbox").innerHTML = newStr;
111 111
            }
112 112
            if (parent.firstChild.className == "con-kong") {
113 113
                return

+ 2008 - 1843
js/userInforShow.js

@ -8,42 +8,6 @@ $(function() {
8 8
	if(GetQueryString("iLike")){
9 9
		openAttend();
10 10
	}
11
	function researchAlert(cap){
12
			$.ajax({
13
				url: "/ajax/researchAreaLog/ql",
14
				dataType: 'json', //数据格式类型
15
				type: 'GET', //http请求类型
16
				timeout: 10000, //超时设置
17
				data: {
18
					"professorId": professorId,
19
					'caption': cap,
20
					"rows": 1000
21
				},
22
				success: function(data) {
23
					console.log(data)
24
					if(data.success) {
25
						$("#areaCon").html("");
26
						var $info = data.data;
27
						$("#subArea").text(cap);
28
						$(".resAreaCover").fadeIn();
29
						$(".resAreaTip").addClass("displayNone")
30
						$(".resAreaCon").show()
31
						if($info.length == 0) {
32
							$(".resAreaCon").hide();
33
							$(".resAreaTip").removeClass("displayNone")
34
							return;
35
						}
36
						for(var i = 0; i < $info.length; i++) {
37
							var liItem = document.createElement("li");
38
							document.getElementById("areaCon").appendChild(liItem);
39
							detailPro($info[i],liItem);
40
						}
41
					    $("body").css("position", "fixed");
42
					}
43
				},
44
				error: function() {}
45
			});
46
		}
47 11
	if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){
48 12
	 	location.href="http://" + window.location.host + "/e/p.html?id="+professorId;
49 13
	}
@ -54,35 +18,7 @@ $(function() {
54 18
	var QTime,QId,ATime,AId,WTime,WId,rows= 10;
55 19
	
56 20
	if(professorId) {
57
		getUserInfo(professorId);//获取个人详细信息
58
		//historyEvaluate();//获取历史合作及评价
59
		getResource(1,true);//获取个人发布的资源
60
		getService(1,true);//获取个人发布的服务
61
		getArticle(1,true);//获取个人发布的文章
62
		getPaper(1,true);//获取个人发布的论文
63
		getPatent(1,true);//获取个人发布的专利
64
		getDemands(1,true);//获取个人发布的需求
65
		attentCount();
66
        getMyAnswer(professorId,true);//获取个人的回答
67
		if(userid!=professorId){
68
			pageViewLog(professorId,1)
69
			relevantExperts();//合作专家
70
			relevantarticalList();//相关文章
71
			likeExperts();//感兴趣专家
72
			information();
73
			ifcollectionAbout(professorId,$(".goSpan").find(".attenSpan"), 1)
74
			$(".goSpan").show();
75
			$(".moreBuUl li.attentType").hide();
76
			$(".moreBuUl li.attendMy").addClass("liNow").text("关注他的人");
77
			$("#item8drop10").show().siblings().hide();
78
			watchType=0;
79
			attentMy();
80
		}else{
81
			collAttent(1,true);
82
            getMyQuestion(userid,true);//获取个人的提问
83
			$(".goSpanTo").show();
84
			$(".myoneself").show();
85
		}
21
		
86 22
		
87 23
		$("#collectArtTab").on('click',function(){
88 24
			
@ -145,195 +81,7 @@ $(function() {
145 81
//			$(".table-drop").fadeOut(1000);
146 82
//		})
147 83
//		
148
		$("#myAttends").on("click",function(){
149
			openAttend()
150
		})
151
		$("#attendmyGo").on("click",function(){
152
			$(".mainNavUl li.rightbtn").addClass("liNow").siblings().removeClass("liNow");
153
			$(".navconBox .moreBu").show();
154
			$("#item8user").show().siblings().hide();
155
			$(".moreBuUl li.attendMy").addClass("liNow").siblings().removeClass("liNow");
156
			$("#item8drop10").show().siblings().hide();
157
			watchType=0
158
			attentMy();
159
		})
160
		//点击联系按钮
161
		$("#conbtn").on('click', function(){
162
			if(userid && userid != null && userid != 'null' && userid != undefined && userid != 'undefined') {
163
				location.href="tidings.html?id="+professorId
164
			} else {
165
				quickLog();
166
				operatTab();
167
				closeLog();
168
			}
169
		});
170
		//点击关注按钮
171
		$("#attentBtn").on('click', function() {
172
			if(userid && userid != null && userid != "null") {
173
				if($(this).is('.attenedSpan')){
174
					cancelCollectionAbout(professorId,$(this), 1)
175
				} else {
176
					collectionAbout(professorId,$(this), 1);
177
				}
178
				attentCount();//关注者数量刷新
179
				attentMy();
180
			}else{
181
				quickLog();
182
				operatTab();
183
				closeLog();
184
			}
185
		});
186
		/*研究方向点赞*/
187
		var clFlag = 1;
188
		$("#researchAreaShow").on("click", ".plus", function() {
189
			if(userid && userid != null && userid != "null") {
190
				//点赞变化样式
191
				if(clFlag) {
192
					clFlag = 0;
193
				} else {
194
					return;
195
				}
196
				if($(this).data("isagree") > -1) {
197
					$(this).stop(true, true).animate({
198
						backgroundPositionY: 0
199
					}, 300); //变成未点赞样式
200
				} else {
201
					$(this).stop(true, true).animate({
202
						backgroundPositionY: -26
203
					}, 300); //变成点赞样式
204
				}
205
206
				$.ajax({
207
					"url": $(this).data("isagree") > -1 ? "/ajax/researchArea/unAgree" : "/ajax/researchArea/agree",
208
					"type": "POST",
209
					"data": {
210
						"targetId": $(this).data("pid"),
211
						"targetCaption": oArray[$(this).data("caption")],
212
						"opId": userid,
213
						"uname":$.cookie("userName")
214
					},
215
					"contentType": "application/x-www-form-urlencoded",
216
					"success": function(dataStr) {
217
						if(dataStr.success) {
218
							$.get("/ajax/professor/info/" + professorId, function(dataStr) {
219
								if(dataStr.success) {
220
									clFlag = 1;
221
									var $info = dataStr.data;
222
									if($info) {
223
										$("#researchAreaShow").empty("")
224
										if($info.researchAreas) {
225
											researchAreaShow($info.researchAreas, $info.editResearchAreaLogs);
226
										}
227
									}
228
								}
229
							})
230
						} else {
231
							$.MsgBox.Alert("提示", dataStr.msg);
232
						}
233
					}
234
				});
235
			} else {
236
				quickLog();
237
				operatTab();
238
				closeLog();
239
			}
240
241
		})
242
		function information(){
243
			$.ajax({
244
				url: "/ajax/baseUserInfo",
245
				dataType: 'json', //数据格式类型
246
				type: 'GET', //http请求类型
247
				timeout: 10000, //超时设置
248
				data: {
249
					"id": professorId
250
				},
251
				"success": function(data) {
252
					if(data.success){
253
						console.log(data);
254
						if(!data.data.activeTime){
255
							$(".last_meg").removeClass("displayNone");
256
							$(".message_b").on("click",function(){
257
								$(".meg_md5").toggle();
258
								if(data.data.email && data.data.mobilePhone){
259
								 	$("#wayTel").text('尾号为 '+data.data.mobilePhone+' 的手机号或邮箱 '+data.data.email);
260
								}else if(data.data.mobilePhone && !data.data.email){
261
									$("#wayTel").text('尾号为 '+data.data.mobilePhone+' 的手机号');
262
								}else if(data.data.email && !data.data.mobilePhone){
263
									$("#wayTel").text('邮箱 '+data.data.email);
264
								}
265
							})
266
						}else{
267
							$(".last_meg").addClass("displayNone");
268
						}
269
					}
270
271
				},
272
				"error": function() {
273
					$.MsgBox.Alert('提示', '链接服务器超时')
274
				}
275
			});
276 84
		}
277
		//点击每个研究方向弹出研究方向详情窗口
278
		$("#researchAreaShow").on("click", ".favorBox,.favorCount", function() {
279
			var cap = $(this).attr("caption");
280
			researchAlert(cap)
281
		});
282
		
283
		//关闭按钮
284
		$("#workclose").click(function() {
285
			$(".resAreaCover").fadeOut();
286
		    $("body").css("position", "");
287
		});
288
		
289
		//点击查看全部资源
290
		$(".coninfobox").on("click","#seeMoreR",function(){
291
			document.body.scrollTop = document.documentElement.scrollTop = 0;
292
			$(".navconBox ul>li").eq(1).addClass("liNow").siblings().removeClass("liNow");
293
			$("#item1user").hide();
294
			$("#item2user").show();
295
		})
296
		//点击查看全部服务
297
		$(".coninfobox").on("click","#seeMoreS",function(){
298
			document.body.scrollTop = document.documentElement.scrollTop = 0;
299
			$(".navconBox ul>li").eq(1).addClass("liNow").siblings().removeClass("liNow");
300
			$("#item1user").hide();
301
			$("#item9user").show();
302
		})
303
		//点击查看全部文章
304
		$(".coninfobox").on("click","#seeMoreA",function(){
305
			document.body.scrollTop = document.documentElement.scrollTop = 0;
306
			$(".navconBox ul>li").eq(2).addClass("liNow").siblings().removeClass("liNow");
307
			$("#item1user").hide();
308
			$("#item3user").show();
309
		})
310
		//点击查看全部专利
311
		$(".coninfobox").on("click","#seeMoreP",function(){
312
			document.body.scrollTop = document.documentElement.scrollTop = 0;
313
			$(".navconBox ul>li").eq(3).addClass("liNow").siblings().removeClass("liNow");
314
			$("#item1user").hide();
315
			$("#item4user").show();
316
		})
317
		//点击查看全部论文
318
		$(".coninfobox").on("click","#seeMoreL",function(){
319
			document.body.scrollTop = document.documentElement.scrollTop = 0;
320
			$(".navconBox ul>li").eq(4).addClass("liNow").siblings().removeClass("liNow");
321
			$("#item1user").hide();
322
			$("#item5user").show();
323
		})
324
		//点击查看全部问题
325
        $(".coninfobox").on("click","#seeMoreQA",function(){
326
            document.body.scrollTop = document.documentElement.scrollTop = 0;
327
            $(".navconBox ul>li").eq(5).addClass("liNow").siblings().removeClass("liNow");
328
            $("#item1user").hide();
329
            $("#item6user").show();
330
            if(userid === professorId) {
331
                $(".wendaNav").show();
332
            }else{
333
                $("#item6user .coninfobox").eq(0).addClass("displayNone").siblings().removeClass("displayNone");
334
			}
335
        })
336
	}
337 85
	function openAttend(){//打开收藏与关注
338 86
		$(".mainNavUl li.rightbtn").addClass("liNow").siblings().removeClass("liNow");
339 87
		$(".navconBox .moreBu").show();
@ -342,184 +90,8 @@ $(function() {
342 90
		$(".moreBuUl li.attentType").eq(0).addClass("liNow").siblings().removeClass("liNow");
343 91
		$("#item8drop1").show().siblings().hide();
344 92
	}
345
	function attentCount(){
346
		$.ajax({//我关注的
347
			type:"get",
348
			url:"/ajax/watch/countObject",
349
			data: {
350
				id: professorId,
351
				type: 1, //1:专家 2:资源 3:文章
352
			},
353
			async:true,
354
			success:function(data){
355
				if(data.success){
356
					if(data.data){
357
						$("#myFocus").html(data.data)
358
					}else{
359
						$("#myFocus").html("0")
360
					}
361
				}
362
			}
363
		});
364
		$.ajax({//关注我的
365
			type:"get",
366
			url:"/ajax/watch/countProfessor",
367
			data: {
368
				id: professorId,
369
				type: 1,
370
			},
371
			async:true,
372
			success:function(data){
373
				if(data.success){
374
					if(data.data){
375
						$("#focusMe").html(data.data)
376
					}else{
377
						$("#focusMe").html("0")
378
					}
379
				}
380
			}
381
		});
382
		$.ajax({//总获赞
383
			type:"get",
384
			url:"/ajax/professor/agree/sum",
385
			data: {
386
				id: professorId,
387
			},
388
			async:true,
389
			success:function(data){
390
				if(data.success){
391
					if(data.data){
392
						$("#agreeMecount").html(data.data)
393
					}else{
394
						$("#agreeMecount").html("0")
395
					}
396
				}
397
			}
398
		});
399
	}
400
	//用户详细信息
401
	function getUserInfo(professorId){
402
		$.ajax({
403
			type:"get",
404
			url:"/ajax/professor/info/"+ professorId,
405
			async:true,
406
			success: function(data) {
407
				var $info = data.data;
408
				if(data.success) {
409
					console.log(data)
410
					if($info.hasHeadImage){
411
						$("#proHead").css("background-image","url(/images/head/"+ $info.id +"_l.jpg)");
412
					}
413
					$("#proName").text($info.name);
414
					var oStyS=autho($info.authType,$info.orgAuth,$info.authStatus);
415
					$("#proAuth").addClass(oStyS.sty); $("#proAuth").attr("title",oStyS.title);
416
					if($info.address){
417
						$("#proAddress").html($info.address + "<span style='margin-right:10px;'></span>");
418
					}
419
					var proOther="";
420
					if($info.orgName){
421
						if($info.department){
422
							if($info.office){
423
								proOther = $info.orgName + "," + $info.department + "," + $info.office
424
							}else{
425
								proOther = $info.orgName + "," + $info.department
426
							}
427
						}else{
428
							if($info.office){
429
								proOther = $info.orgName +"," + $info.office
430
							}else{
431
								proOther = $info.orgName
432
							}
433
						}
434
					}else{
435
						if($info.department){
436
							if($info.office){
437
								proOther =  $info.department + "," + $info.office
438
							}else{
439
								proOther =  $info.department
440
							}
441
						}else{
442
							if($info.office){
443
								proOther = $info.office
444
							}
445
						}
446
					}
447
					$("#proOther").text(proOther);
448
					var llqtitle=$info.name + "-" + proOther.replace(/,/gi,"-") + "-科袖网";//修改浏览器title信息
449
					if($info.title){
450
						$("#proTit").html($info.title + "<span style='margin-right:10px;'></span>");
451
						llqtitle = $info.name + "-" + $info.title + "-" + proOther.replace(/,/gi,"-") + "-科袖网";
452
					}
453
					document.title = llqtitle;
454
					
455
					//主页浏览量
456
					$("#viewNums").text($info.pageViews);
457
					//个人简介
458
					if($info.descp) {
459
						$("#descpS").parents(".coninfobox").removeClass("displayNone");
460
						$("#item1user>.nodatabox").addClass("displayNone");
461
						$("#descpS").text($info.descp);
462
					}
463
					//学术领域					
464
					if($info.subject) {
465
						$("#subjectShow").parents(".coninfobox").removeClass("displayNone");
466
						$("#item1user>.nodatabox").addClass("displayNone");
467
						subjectShow($info.subject);
468
					}
469
					//研究方向
470
					if($info.researchAreas.length) {
471
						$("#researchAreaShow").parents(".coninfobox").removeClass("displayNone");
472
						$("#item1user>.nodatabox").addClass("displayNone");
473
						researchAreaShow($info.researchAreas, $info.editResearchAreaLogs);
474
					}
475
					//行业领域	
476
					if($info.industry) {
477
						$("#industryShow").parents(".coninfobox").removeClass("displayNone");
478
						$("#item1user>.nodatabox").addClass("displayNone");
479
						industryShow($info.industry);
480
					}
481
					//教育背景					
482
					if($info.edus.length) {
483
						eduBgShow($info.edus);
484
					} else {
485
						$("#eduBgShow").parents(".coninfobox").hide();
486
					}
487
					//兼职
488
					if($info.jobs.length) {
489
						timeJobShow($info.jobs);
490
					} else {
491
						$("#timeJobShow").parents(".coninfobox").hide();
492
					}
493
					//项目
494
					if($info.projects.length) {
495
						projectShow($info.projects)
496
					} else {
497
						$("#projectShow").parents(".coninfobox").hide();
498
					}
499
					//荣誉
500
					if($info.honors.length) {
501
						honorShow($info.honors);
502
					} else {
503
						$("#honorShow").parents(".coninfobox").hide();
504
					}
505
					
506
					if($info.honors.length == 0 && $info.projects.length == 0 && $info.jobs.length == 0 && $info.edus.length == 0){
507
						$("#item7user>.nodatabox").show();
508
						$("#item7user>.nodatabox").find(".noContip").text("用户尚未完善详细资料")
509
					}
510
					
511
					var weibotitle = $info.name;
512
					var weibourl = window.location.href;
513
					var weibopic ="http://"+window.location.host+"/images/head/"+ $info.id +"_l.jpg";
514
					$("#weibo").attr("href","http://service.weibo.com/share/share.php?appkey=3677230589&title="+weibotitle+"&url="+weibourl+"&pic="+weibopic+"&ralateUid=6242830109&searchPic=false&style=simple");
515
				
516
				}
517
			},
518
			error: function() {
519
				$.MsgBox.Alert('提示', '链接服务器超时')
520
			}
521
		});
522
	}
93
	
94
523 95
	function subjectShow(data) {
524 96
		if(data != undefined && data.length != 0) {
525 97
			var subs=strToAry(data)
@ -717,370 +289,268 @@ $(function() {
717 289
		}
718 290
		return ret;
719 291
	}
292
720 293
	
721
	//合作历史及评价
722
	function historyEvaluate(){
723
		$.ajax({
724
			"url": "/ajax/consult/pqAssessHis",
725
			"type": "get",
726
			"data": {
727
				"professorId": professorId,
728
				"pageSize": 1000
729
			},
730
			"async": false,
731
			"success": function(response) {
732
				if(response.success) {
733
					var dataStr = response.data.data;
734
					if(dataStr.length>0){
735
						$("#historyEvaluate").parents(".coninfobox").removeClass("displayNone");
736
						$("#item1user>.nodatabox").addClass("displayNone");
737
						for(var i = 0; i < dataStr.length; i++) {
738
							var assessTime = commenTime(dataStr[i].assessTime);
739
							var assessContant ="";
740
							if(dataStr[i].assessContant) {
741
								assessContant = dataStr[i].assessContant;
742
							}
743
							var userhed='';
744
							if(dataStr[i].professor.hasHeadImage) {
745
								userhed = 'background-image:url(/images/head/' + dataStr[i].professor.id + '_l.jpg)';
746
							} else {
747
								userhed = 'background-image:url(/images/default-photo.jpg)';
748
							}
749
							var add = "";
750
							add += '<li class="flexCenter">';
751
							add += '<a href="userInforShow.html?professorId='+ dataStr[i].professor.id +'" class="userhref"><div class="madiaHead useHead useHeadMsg" style="'+ userhed +'"></div></a>'
752
							add += '<div class="madiaInfo"><div style="position: relative;">';			
753
							add += '<a href="userInforShow.html?professorId='+ dataStr[i].professor.id +'" class="userhref"><span class="h1Font messageName">'+ dataStr[i].professor.name +'</span></a>';
754
							add += '<em class="authiconNew authicon-pro" title=" "></em><span class="commenttime">'+ assessTime +'</span>';				
755
							add += '<ul class="starShow">';					
756
							add += '<li></li> <li></li> <li></li> <li></li> <li></li>';
757
							add += '</ul></div>';		
758
							add += '<p class="h2Font messageContent">'+ assessContant +'</p>';			
759
							add += '</div></li>';
760
							
761
							var $add = $(add);
762
							$("#historyEvaluate").append($add);
763
							$add.find(".starShow>li:lt(" + dataStr[i].assessStar + ")").addClass('evastar');
764
						}
765
					}else{
766
						
767
					}
768
					
769
				}
770
			}
771
		})
772
	}
773
	//获取资源
774
	function getResource(pageNo,isbind){
775
		$.ajax({
776
			"url": "/ajax/resource/pqProPublish",
777
			"type": "get",
778
			"async": false,
779
			"data": {
780
				"professorId": professorId,
781
				"pageSize": pageSize,
782
				"pageNo": pageNo
783
			},
294
//  // 获取问题
295
//  function getMyQuestion(id,isbind) {
296
//      $.ajax({
297
//          url: "/ajax/question/my",
298
//          dataType: 'json',
299
//          type: 'GET',
300
//          data: {
301
//              "time":QTime,
302
//              "id":QId,
303
//              "rows":rows,
304
//              "uid":id
305
//          },
306
//          beforeSend: function() {
307
//              $("#proQ").parent().find(".js-load-more").attr("disabled",true);
308
//              $("#proQ").parent().find(".js-load-more").addClass("active");
309
//          },
310
//          complete:function () {
311
//              $("#proQ").parent().find(".js-load-more").removeAttr("disabled");
312
//              $("#proQ").parent().find(".js-load-more").removeClass("active");
313
//          },
314
//          success: function(data) {
315
//              if(data.success) {
316
//                  var dataStr=data.data;
317
//                  if(dataStr.length > 0){
318
//                      QTime = dataStr[dataStr.length - 1].createTime;
319
//                      QId = dataStr[dataStr.length - 1].id;
320
//                      for(var i = 0; i < dataStr.length; i++) {
321
//                          var listLi = $('<li class="mui-table-view-cell">').appendTo($("#proQ"));
322
//                          question(dataStr[i], listLi);
323
//                          if(isbind==true && i==0){
324
//                              $("#proQ").html();
325
//                          }
326
//                      }
327
//                      if(isbind==true){
328
//                          $("#proQ").parent().find(".js-load-more").on("click", function () {
329
//                              getMyQuestion(id,false);
330
//                          });
331
//                      }
332
//                      if (dataStr.length < rows) {
333
//                          $("#proQ").parent().find(".js-load-more").unbind("click");
334
//                          $("#proQ").parent().find(".js-load-more").hide();
335
//                      }
336
//                  }else{
337
//                  	$("#proQ").parent().find(".js-load-more").hide()
338
//                      $("#proQ + .nodatabox").show();
339
//                      $("#proQ + .nodatabox").find(".noContip").text("用户尚未提出任何问题");
340
//                  }
341
//              }
342
//          },
343
//          error: function() {
344
//              return;
345
//          }
346
//      });
347
//  }
348
    //我关注的问题
349
	function getMyWatchQ(id,isbind) {
350
        $.ajax({
351
            url: "/ajax/question/watch",
352
            dataType: 'json',
353
            type: 'GET',
354
            data: {
355
                "time":WTime,
356
                "id":WId,
357
                "rows":rows,
358
                "uid":id
359
            },
784 360
            beforeSend: function() {
785
                $("#proResource").parent().find(".js-load-more").attr("disabled",true);
786
                $("#proResource").parent().find(".js-load-more").addClass("active");
361
787 362
            },
788 363
            complete:function () {
789
                $("#proResource").parent().find(".js-load-more").removeAttr("disabled");
790
                $("#proResource").parent().find(".js-load-more").removeClass("active");
364
                $("#item8user").find(".js-load-more").removeAttr("disabled");
365
                $("#item8user").find(".js-load-more").removeClass("active");
791 366
            },
792
			"success": function(data) {
793
				console.log(data);
794
				if(data.success) {
795
					var madiaHead ='';
796
					if(data.data.total>0){
797
						$("#resCount").html(data.data.total)
798
					}else if(data.data.total>99){
799
						$("#resCount").html("99+")
800
					}
801
					var dataStr=data.data.data;
802
					if(dataStr.length > 0){
803
						$("#showResource").parents(".coninfobox").removeClass("displayNone");
804
						$("#item1user>.nodatabox").addClass("displayNone");
805
						for(var i = 0; i < dataStr.length; i++) {
806
							if(dataStr[i].images.length) {
807
								madiaHead ='/data/resource/' + dataStr[i].images[0].imageSrc ;
808
							}else{
809
								madiaHead ='/images/default-resource.jpg';
810
							}
811
							var strAdd = '';
812
							strAdd += '<li><a  target="_blank" href="resourceShow.html?resourceId='+ dataStr[i].resourceId +'" class="flexCenter urlgo">';
813
							strAdd += '<div class="madiaHead resouseHead" style="background-image:url('+ madiaHead +')"></div>';
814
							strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty">'+ dataStr[i].resourceName +'</p><p class="h2Font ellipsisSty-2">用途:'+ dataStr[i].supportedServices+'</p></div>';				
815
							strAdd += '</a></li>';
816
							var $strAdd = $(strAdd);
817
							$("#proResource").append(strAdd);
818
							if(isbind==true && i==0){
819
								var $strAddO=$(strAdd);
820
								$("#showResource").html("");
821
								$("#showResource").append($strAddO);
822
							}
823
						}
824
						//分页
825
						if(isbind){
826
                            $("#proResource").parent().find(".js-load-more").on("click", function () {
827
                                getResource(++pageNo,false);
367
            success: function(data) {
368
                if(data.success) {
369
                    var dataStr=data.data;
370
                    if(dataStr.length > 0){
371
                        WTime = dataStr[dataStr.length - 1].createTime;
372
                        WId = dataStr[dataStr.length - 1].id;
373
                        for(var i = 0; i < dataStr.length; i++) {
374
                            var listLi = $('<li class="mui-table-view-cell">').appendTo($("#attendQuestion"));
375
                            question(dataStr[i], listLi);
376
                            if(isbind==true && i==0){
377
                                var li = listLi.clone();
378
                                $("#showAnswer").html();
379
                                $("#showAnswer").append(li);
380
                                questioninfo(dataStr[i].qid, li);
381
                                proinfo(dataStr[i].uid, li);
382
                                leaveMsgCount(dataStr[i].id,4, li);
383
384
                            }
385
                        }
386
                        if(isbind==true){
387
                            $("#item8user").append('<button class="js-load-more"></button>');
388
                            $("#item8user").find(".js-load-more").on("click", function () {
389
                                getMyWatchQ(id,false);
828 390
                            });
829
						}
830
                        if (pageNo >= Math.ceil(data.data.total /pageSize)) {
831
                            $("#proResource").parent().find(".js-load-more").unbind("click");
832
                            $("#proResource").parent().find(".js-load-more").hide();
833 391
                        }
834
					}else{
835
						$("#proResource + .nodatabox").show();
836
						$("#proResource + .nodatabox").find(".noContip").text("用户尚未发布任何资源");
837
						if(isbind) {
838
                            $("#proResource").parent().find(".js-load-more").hide();
392
                        if (dataStr.length < rows) {
393
                            $("#item8user").find(".js-load-more").unbind("click");
394
                            $("#item8user").find(".js-load-more").hide();
839 395
                        }
840
					}
841
				}
842
			},
843
			"error": function() {
844
				$.MsgBox.Alert("提示", "服务器连接超时")
845
			}
846
		});
847
	}
848
	//获取资源
849
	function getService(pageNo,isbind){
850
		$.ajax({
851
			"url": "/ajax/resource/pqProPublish",
852
			"type": "get",
853
			"async": false,
854
			"data": {
855
				"professorId": professorId,
856
				"pageSize": pageSize,
857
				"pageNo": pageNo
858
			},
859
            beforeSend: function() {
860
                $("#proService").parent().find(".js-load-more").attr("disabled",true);
861
                $("#proService").parent().find(".js-load-more").addClass("active");
862
            },
863
            complete:function () {
864
                $("#proService").parent().find(".js-load-more").removeAttr("disabled");
865
                $("#proService").parent().find(".js-load-more").removeClass("active");
396
                    }else{
397
                        $("#attendQuestion + .nodatabox").show();
398
                        $("#attendQuestion + .nodatabox").find(".noContip").text("用户尚未回答任何问题");
399
                    }
400
                }
866 401
            },
867
			"success": function(data) {
868
				console.log(data);
869
				if(data.success) {
870
					var madiaHead ='';
871
					if(data.data.total>0){
872
						$("#serCount").html(data.data.total)
873
					}else if(data.data.total>99){
874
						$("#serCount").html("99+")
875
					}
876
					var dataStr=data.data.data;
877
					if(dataStr.length > 0){
878
						$("#showService").parents(".coninfobox").removeClass("displayNone");
879
						$("#item1user>.nodatabox").addClass("displayNone");
880
						for(var i = 0; i < dataStr.length; i++) {
881
							if(dataStr[i].images.length) {
882
								madiaHead ='/data/resource/' + dataStr[i].images[0].imageSrc ;
883
							}else{
884
								madiaHead ='/images/default-resource.jpg';
885
							}
886
							var strAdd = '';
887
							strAdd += '<li><a  target="_blank" href="resourceShow.html?resourceId='+ dataStr[i].resourceId +'" class="flexCenter urlgo">';
888
							strAdd += '<div class="madiaHead resouseHead" style="background-image:url('+ madiaHead +')"></div>';
889
							strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty">'+ dataStr[i].resourceName +'</p><p class="h2Font ellipsisSty-2">用途:'+ dataStr[i].supportedServices+'</p></div>';				
890
							strAdd += '</a></li>';
891
							var $strAdd = $(strAdd);
892
							$("#proService").append(strAdd);
893
							if(isbind==true && i==0){
894
								var $strAddO=$(strAdd);
895
								$("#showService").html("");
896
								$("#showService").append($strAddO);
897
							}
898
						}
899
						//分页
900
						if(isbind){
901
                            $("#proService").parent().find(".js-load-more").on("click", function () {
902
                                getResource(++pageNo,false);
903
                            });
904
						}
905
                        if (pageNo >= Math.ceil(data.data.total /pageSize)) {
906
                            $("#proService").parent().find(".js-load-more").unbind("click");
907
                            $("#proService").parent().find(".js-load-more").hide();
908
                        }
909
					}else{
910
						$("#proService + .nodatabox").show();
911
						$("#proService + .nodatabox").find(".noContip").text("用户尚未发布任何资源");
912
						if(isbind) {
913
                            $("#proService").parent().find(".js-load-more").hide();
914
                        }
915
					}
916
				}
917
			},
918
			"error": function() {
919
				$.MsgBox.Alert("提示", "服务器连接超时")
920
			}
921
		});
922
	}
923
	//获取文章
924
	function getArticle(pageNo,isbind){
402
            error: function() {
403
                return;
404
            }
405
        });
406
    }
407
    //我关注的回答
408
//  function getMyWatchA(id,isbind) {
409
//      $.ajax({
410
//          url: "/ajax/question/answer/byWatch",
411
//          dataType: 'json',
412
//          type: 'GET',
413
//          data: {
414
//              "time":WTime,
415
//              "id":WId,
416
//              "rows":rows,
417
//              "uid":id
418
//          },
419
//          beforeSend: function() {
420
//              $("#item8user").find(".js-load-more").attr("disabled",true);
421
//              $("#item8user").find(".js-load-more").addClass("active");
422
//          },
423
//          complete:function () {
424
//              $("#item8user").find(".js-load-more").removeAttr("disabled");
425
//              $("#item8user").find(".js-load-more").removeClass("active");
426
//          },
427
//          success: function(data) {
428
//              if(data.success) {
429
//                  var dataStr=data.data;
430
//                  if(dataStr.length > 0){
431
//                      WTime = dataStr[dataStr.length - 1].createTime;
432
//                      WId = dataStr[dataStr.length - 1].id;
433
//                      for(var i = 0; i < dataStr.length; i++) {
434
//                          var listLi = $('<li class="mui-table-view-cell">').appendTo($("#attendAnswer"));
435
//                          answer(dataStr[i], listLi);
436
//                      }
437
//                      if(isbind==true){
438
//                          $("#item8user").append('<button class="js-load-more"></button>');
439
//                          $("#item8user").find(".js-load-more").on("click", function () {
440
//                              getMyWatchA(id,false);
441
//                          });
442
//                      }
443
//                      if (dataStr.length < rows) {
444
//                          $("#item8user").find(".js-load-more").unbind("click");
445
//                          $("#item8user").find(".js-load-more").hide();
446
//                      }
447
//                  }else{
448
//                      $("#attendAnswer + .nodatabox").show();
449
//                      $("#attendAnswer + .nodatabox").find(".noContip").text("用户尚未回答任何问题");
450
//                  }
451
//              }
452
//          },
453
//          error: function() {
454
//              return;
455
//          }
456
//      });
457
//  }
458
459
460
	function collAttent(pageNo,isbind,num){
461
		if(!num){
462
			var num=watchType;
463
		}
925 464
		$.ajax({
926
			url: "/ajax/article/pqProPublish",
465
			url: "/ajax/watch/qaPro",
927 466
			dataType: 'json', //数据格式类型
928 467
			type: 'GET', //http请求类型
929 468
			data: {
930 469
				"professorId": professorId,
931
				"pageSize": pageSize,
932
				"pageNo": pageNo
470
				"watchType": num,
471
				"pageNo": pageNo,
472
				"pageSize":pageSize
933 473
			},
934 474
            beforeSend: function() {
935
                $("#proArticel").parent().find(".js-load-more").attr("disabled",true);
936
                $("#proArticel").parent().find(".js-load-more").addClass("active");
475
                $("#item8user").find(".js-load-more").attr("disabled",true);
476
                $("#item8user").find(".js-load-more").addClass("active");
937 477
            },
938 478
            complete:function () {
939
                $("#proArticel").parent().find(".js-load-more").removeAttr("disabled");
940
                $("#proArticel").parent().find(".js-load-more").removeClass("active");
479
                $("#item8user").find(".js-load-more").removeAttr("disabled");
480
                $("#item8user").find(".js-load-more").removeClass("active");
941 481
            },
942 482
			timeout: 10000, //超时设置
943 483
			success: function(data) {
944
				if(data.success) {
945
					var madiaHead ='/images/default-artical.jpg';
946
					if(data.data.total>0){
947
						$("#artCount").html(data.data.total)
948
					}else if(data.data.total>99){
949
						$("#artCount").html("99+")
950
					}
951
					var dataStr=data.data.data;
952
					if(dataStr.length > 0){
953
						$("#showArticle").parents(".coninfobox").removeClass("displayNone");
954
						$("#item1user>.nodatabox").addClass("displayNone");
955
						for(var i = 0; i < dataStr.length; i++) {
956
							if(dataStr[i].articleImg) {
957
								madiaHead ='/data/article/' + dataStr[i].articleImg ;
958
							}
959
							var sowU="";
960
							if(dataStr[i].pageViews!=0){
961
								if(dataStr[i].articleAgree!=0){
962
									sowU='<li><span>阅读量 '+dataStr[i].pageViews+'</span></li><li><span>赞 '+dataStr[i].articleAgree+'</span></li>'
963
								}else{
964
									sowU='<li><span>阅读量 '+dataStr[i].pageViews+'</span></li>'
965
								}
966
							}
967
							
968
							var strAdd = '';
969
							strAdd += '<li><a  target="_blank" href="/'+ pageUrl('a',dataStr[i]) +'" class="flexCenter urlgo">';
970
							strAdd += '<div class="madiaHead artHead" style="background-image:url('+ madiaHead +')"></div>';
971
							strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">'+ dataStr[i].articleTitle +'</p>';
972
							strAdd += '<ul class="h2Font clearfix">';
973
							strAdd += '<li><span class="time">'+ commenTime(dataStr[i].publishTime) +'</span></li>';
974
							strAdd += sowU
975
							strAdd += '<li><span class="leaveMsgCount"></span></li>';
976
							strAdd += '</ul></div>';
977
							strAdd += '</a></li>';
978
							
979
							var $strAdd = $(strAdd);
980
							$("#proArticel").append( $strAdd);
981
							leaveMsgCount(dataStr[i].articleId,1,$strAdd);
982
							if(isbind==true && i==0){
983
								var $strAddO = $(strAdd);
984
								$("#showArticle").html("");
985
								$("#showArticle").append($strAddO);
986
								leaveMsgCount(dataStr[0].articleId,1,$strAddO);
987
							}
988
						}
989
						//分页
990
						if(isbind){
991
                            $("#proArticel").parent().find(".js-load-more").on("click", function () {
992
                                getArticle(++pageNo,false);
993
                            });
484
				console.log(data)
485
				var tcdPage;
486
				if(data.success && data.data.data != "") {
487
					var datalist = data.data.data;
488
					if(num==1){
489
						// document.getElementById("attendPro").innerHTML="";
490
						for(var i = 0; i < datalist.length; i++) {
491
							var liItem = document.createElement("li");
492
							liItem.className="mui-table-view-cell";
493
							document.getElementById("attendPro").appendChild(liItem);
494
							//detailPro(datalist[i],liItem);
994 495
						}
995
                        if (pageNo >= Math.ceil(data.data.total / pageSize)) {
996
                            $("#proArticel").parent().find(".js-load-more").unbind("click");
997
                            $("#proArticel").parent().find(".js-load-more").hide();
496
					}else if(num==2){
497
						detailRes(datalist);
498
					}else if(num==3){
499
						detailArt(datalist);
500
					}else if(num==4){
501
						detailPat(datalist);
502
					}else if(num==5){
503
						detailPer(datalist);
504
					}else if(num==6){
505
						detailCmp(datalist);
506
					}else if(num==7){
507
						detailDemand(datalist);
508
					}
509
					if(isbind){
510
                        $("#item8user").append('<button class="js-load-more"></button>');
511
                        $("#item8user").find(".js-load-more").on("click", function () {
512
                            collAttent(++pageNo,false,num);
513
                        });
514
					}
515
                    if (pageNo >= Math.ceil(data.data.total / pageSize)) {
516
                        $("#item8user").find(".js-load-more").unbind("click");
517
                        $("#item8user").find(".js-load-more").hide();
518
                    }
519
				}else{
520
					if(num==1){
521
						document.getElementById("attendPro").parentNode.querySelector(".nodatabox").classList.remove("displayNone");
522
						if(isbind) {
523
                            $("#attendPro").parent().find(".js-load-more").hide()
998 524
                        }
999
					}else{
1000
						$("#proArticel + .nodatabox").show();
1001
						$("#proArticel + .nodatabox").find(".noContip").text("用户尚未发布任何文章");
525
					}else if(num==2){
526
						document.getElementById("attendRes").parentNode.querySelector(".nodatabox").classList.remove("displayNone");
1002 527
						if(isbind) {
1003
                            $("#proArticel").parent().find(".js-load-more").hide();
528
                            $("#attendRes").parent().find(".js-load-more").hide()
1004 529
                        }
1005
					}
1006
					
1007
1008
				}
1009
			},
1010
			error: function() {
1011
				return;
1012
			}
1013
		});
1014
		
1015
	}
1016
	//获取专利
1017
	function getPatent(pageNo,isbind){
1018
		$.ajax({
1019
			url: "/ajax/ppatent/byProfessor",
1020
			dataType: 'json', //数据格式类型
1021
			type: 'GET', //http请求类型
1022
			data: {
1023
				"id": professorId,
1024
				"pageSize": pageSize,
1025
				"pageNo": pageNo
1026
			},
1027
            beforeSend: function() {
1028
                $("#proPatent").parent().find(".js-load-more").attr("disabled",true);
1029
                $("#proPatent").parent().find(".js-load-more").addClass("active");
1030
            },
1031
            complete:function () {
1032
                $("#proPatent").parent().find(".js-load-more").removeAttr("disabled");
1033
                $("#proPatent").parent().find(".js-load-more").removeClass("active");
1034
            },
1035
			timeout: 10000, //超时设置
1036
			success: function(data) {
1037
				if(data.success) {
1038
					if(data.data.total>0){
1039
						$("#patCount").html(data.data.total)
1040
					}else if(data.data.total>99){
1041
						$("#patCount").html("99+")
1042
					}
1043
					var dataStr=data.data.data;
1044
					if(dataStr.length > 0){
1045
						$("#showPatent").parents(".coninfobox").removeClass("displayNone");
1046
						$("#item1user>.nodatabox").addClass("displayNone");
1047
						for(var i = 0; i < dataStr.length; i++) {
1048
							if(!dataStr[i].reqPerson){
1049
								dataStr[i].reqPerson="";
1050
							}
1051
							var strAdd = '';
1052
							strAdd += '<li><a  target="_blank" href="/'+ pageUrl("pt",dataStr[i]) +'" class="flexCenter urlgo">';
1053
							strAdd += '<div class="madiaHead patentHead"></div>';
1054
							strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty">'+ dataStr[i].name +'</p>';
1055
							strAdd += '<p class="h2Font ellipsisSty">发明人:'+ dataStr[i].authors.substring(0, dataStr[i].authors.length - 1) +'</p>';
1056
							strAdd += '<p class="h2Font ellipsisSty">申请人:'+ dataStr[i].reqPerson +'</p>';
1057
							strAdd += '</div>';
1058
							strAdd += '</a></li>';
1059
							
1060
							var $strAdd = $(strAdd);
1061
							$("#proPatent").append( $strAdd);
1062
							if(isbind==true && i==0){
1063
								var $strAddO=$(strAdd);
1064
								$("#showPatent").html("");
1065
								$("#showPatent").append($strAddO);
1066
							}
1067
						}
1068
						//分页
1069
						if(isbind){
1070
                            $("#proPatent").parent().find(".js-load-more").on("click", function () {
1071
                                getPatent(++pageNo,false);
1072
                            });
1073
						}
1074
                        if (pageNo >= Math.ceil(data.data.total / pageSize)) {
1075
                            console.log("xmtt");
1076
                            $("#proPatent").parent().find(".js-load-more").unbind("click");
1077
                            $("#proPatent").parent().find(".js-load-more").hide();
530
					}else if(num==3){
531
						document.getElementById("attendArt").parentNode.querySelector(".nodatabox").classList.remove("displayNone");
532
						if(isbind) {
533
                            $("#attendArt").parent().find(".js-load-more").hide()
1078 534
                        }
1079
					}else{
1080
						$("#proPatent + .nodatabox").show();
1081
						$("#proPatent + .nodatabox").find(".noContip").text("用户尚未发布任何专利");
535
					}else if(num==4){
536
						document.getElementById("attendPatent").parentNode.querySelector(".nodatabox").classList.remove("displayNone");
537
						if(isbind) {
538
                            $("#attendPatent").parent().find(".js-load-more").hide()
539
                        }
540
					}else if(num==5){
541
						document.getElementById("attendPaper").parentNode.querySelector(".nodatabox").classList.remove("displayNone");
542
						if(isbind) {
543
                            $("#attendPaper").parent().find(".js-load-more").hide()
544
                        }
545
					}else if(num==6){
546
						document.getElementById("attendCmp").parentNode.querySelector(".nodatabox").classList.remove("displayNone");
547
						if(isbind) {
548
                            $("#attendCmp").parent().find(".js-load-more").hide()
549
                        }
550
					}else if(num==7){
551
						document.getElementById("attendDemand").parentNode.querySelector(".nodatabox").classList.remove("displayNone");
1082 552
						if(isbind) {
1083
                            $("#proPatent").parent().find(".js-load-more").hide();
553
                            $("#attendDemand").parent().find(".js-load-more").hide()
1084 554
                        }
1085 555
					}
1086 556
				}
@ -1090,448 +560,965 @@ $(function() {
1090 560
			}
1091 561
		});
1092 562
	}
1093
	//获取论文
1094
	function getPaper(pageNo,isbind){
1095
		$.ajax({
1096
			url: "/ajax/ppaper/byProfessor",
1097
			dataType: 'json', //数据格式类型
1098
			type: 'GET', //http请求类型
1099
			data: {
1100
				"id": professorId,
1101
				"pageSize": pageSize,
1102
				"pageNo": pageNo
1103
			},
1104
            beforeSend: function() {
1105
                $("#proPaper").parent().find(".js-load-more").attr("disabled",true);
1106
                $("#proPaper").parent().find(".js-load-more").addClass("active");
1107
            },
1108
            complete:function () {
1109
                $("#proPaper").parent().find(".js-load-more").removeAttr("disabled");
1110
                $("#proPaper").parent().find(".js-load-more").removeClass("active");
1111
            },
1112
			timeout: 10000, //超时设置
1113
			success: function(data) {
1114
				if(data.success) {
1115
					if(data.data.total>0){
1116
						$("#parCount").html(data.data.total)
1117
					}else if(data.data.total>99){
1118
						$("#parCount").html("99+")
563
564
//	function detailCmp(datalist) {
565
//		// document.getElementById("attendCmp").innerHTML="";
566
//		var arr=[];
567
//		for(var i in datalist) {
568
//			arr[i]=datalist[i].watchObject;
569
//		}
570
//		$.ajax({
571
//			url:"/ajax/org/qm",
572
//			data: {
573
//				id:arr,
574
//			},
575
//			dataType: 'json', //数据格式类型
576
//			type: 'get', //http请求类型
577
//			traditional: true,
578
//			success: function(data) {
579
//				if(data.success && data.data != "") {
580
//					var dataStr=data.data;
581
//					for(var i = 0; i < dataStr.length; i++) {
582
//						var li = document.createElement("li");
583
//						li.setAttribute("data-id", dataStr[i].id);
584
//						var oimg = (dataStr[i].hasOrgLogo) ?"/images/org/" + dataStr[i].id + ".jpg" : "../images/default-icon.jpg";
585
//						var oAuth = (dataStr[i].authStatus == 3) ? 'authicon-com-ok' : '';
586
//						var orgName = (dataStr[i].forShort) ? dataStr[i].forShort : dataStr[i].name;
587
//						var orgType = (dataStr[i].orgType == '2') ? "上市企业" : "";
588
//						var orgOther = (dataStr[i].industry) ? dataStr[i].industry.replace(/,/gi, " | ") : "";
589
//						li.className = "mui-table-view-cell";
590
//						var itemlist=''
591
//							itemlist += '<a class="flexCenter" target="_blank" href="cmpInforShow.html?orgId='+dataStr[i].id+'"><div class="madiaHead cmpHead">';
592
//							itemlist += '<div class="boxBlock"><img class="boxBlockimg" src="' + oimg + '"></div></div>';
593
//							itemlist += '<div class="madiaInfo">';
594
//							itemlist += '<p class="h1Font"><span>' + orgName + '</span><em class="authiconNew ' + oAuth + '" title="科袖认证企业"></em></p>';
595
//	                		itemlist += '<p class="h2Font ellipsisSty"><span>' + orgType + '</span> <span>' + orgOther + '</span></p>';
596
//							itemlist += '</div></a>';
597
//						li.innerHTML = itemlist
598
//						document.getElementById("attendCmp").appendChild(li);
599
//					}
600
//				}
601
//			},
602
//			error:  function() {
603
//			}
604
//		});
605
//	}
606
//	function detailPat(datalist) {
607
//		// document.getElementById("attendPatent").innerHTML="";
608
//		if(datalist.length<0){
609
//			$("#attendPatent + .nodatabox").removeClass("displayNone");
610
//			return;
611
//		}
612
//		var arr=[];
613
//		for(var i in datalist) {
614
//			arr[i]=datalist[i].watchObject;
615
//		}
616
//		$.ajax({
617
//			url:"/ajax/ppatent/qm",
618
//			data: {
619
//				id:arr,
620
//			},
621
//			dataType: 'json', //数据格式类型
622
//			type: 'get', //http请求类型
623
//			traditional: true,
624
//			success: function(data) {
625
//				if(data.success && data.data != "") {
626
//					var dataStr=data.data;
627
//					for(var i = 0; i < dataStr.length; i++) {
628
//						var li = document.createElement("li");
629
//						li.className = "mui-table-view-cell";
630
//						var strAdd = '';
631
//							strAdd += '<a  target="_blank" href="/'+ pageUrl("pt",dataStr[i]) +'" class="flexCenter urlgo">';
632
//							strAdd += '<div class="madiaHead patentHead"></div>';
633
//							strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty">'+ dataStr[i].name +'</p>';
634
//							strAdd += '<p class="h2Font ellipsisSty">发明人:'+ dataStr[i].authors.substring(0, dataStr[i].authors.length - 1) +'</p>';
635
//							strAdd += '<p class="h2Font ellipsisSty">申请人:'+ dataStr[i].reqPerson +'</p>';
636
//							strAdd += '</div>';
637
//							strAdd += '</a>';
638
//						li.innerHTML = strAdd
639
//						document.getElementById("attendPatent").appendChild(li);
640
//					}
641
//				}
642
//			},
643
//			error:  function() {
644
//			}
645
//		});
646
//	}
647
//	function detailPer(datalist) {
648
//		// document.getElementById("attendPaper").innerHTML="";
649
//		var arr=[];
650
//		for(var i in datalist) {
651
//			arr[i]=datalist[i].watchObject;
652
//		}
653
//		$.ajax({
654
//			url:"/ajax/ppaper/qm",
655
//			data: {
656
//				id:arr,
657
//			},
658
//			dataType: 'json', //数据格式类型
659
//			type: 'get', //http请求类型
660
//			traditional: true,
661
//			success: function(data) {
662
//				if(data.success && data.data != "") {
663
//					var dataStr=data.data;
664
//					for(var i = 0; i < dataStr.length; i++) {
665
//						var moreInf=""
666
//						if(!dataStr[i].cn4periodical){
667
//							dataStr[i].cn4periodical="";
668
//						}
669
//						if(!dataStr[i].en4periodical){
670
//							dataStr[i].en4periodical="";
671
//						}
672
//						if(!dataStr[i].pubDay){
673
//							dataStr[i].pubDay="";
674
//						}
675
//						moreInf = dataStr[i].cn4periodical+ " " +dataStr[i].en4periodical+ " " +dataStr[i].pubDay
676
//						
677
//						var li = document.createElement("li");
678
//						li.className = "mui-table-view-cell";
679
//						var strAdd = '';
680
//							strAdd += '<a  target="_blank" href="/'+ pageUrl("pp",dataStr[i]) +'" class="flexCenter urlgo">';
681
//							strAdd += '<div class="madiaHead paperHead"></div>';
682
//							strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty">'+ dataStr[i].name +'</p>';
683
//							strAdd += '<p class="h2Font ellipsisSty">作者:'+ dataStr[i].authors.substring(0, dataStr[i].authors.length - 1) +'</p>';
684
//							strAdd += '<p class="h2Font ellipsisSty">期刊:'+ moreInf +'</p>';
685
//							strAdd += '</div>';
686
//							strAdd += '</a>';
687
//						li.innerHTML = strAdd
688
//						document.getElementById("attendPaper").appendChild(li);
689
//					}
690
//				}
691
//			},
692
//			error:  function() {
693
//			}
694
//		});
695
//	}
696
//	function detailRes(datalist) {
697
//		// document.getElementById("attendRes").innerHTML="";
698
//		for(var i = 0; i < datalist.length; i++) {
699
//			var dataStr = datalist[i].resource;
700
//			var namepo, userType;
701
//			if(dataStr.resourceType == 1) {
702
//				namepo = dataStr.editProfessor.name;
703
//				userType = autho(dataStr.editProfessor.authType, dataStr.editProfessor.orgAuth, dataStr.editProfessor.authStatus);
704
//			} else {
705
//				if(dataStr.organization.forShort){
706
//					namepo = dataStr.organization.forShort;
707
//				}else{
708
//					namepo = dataStr.organization.name;
709
//				}
710
//				userType={}
711
//				if(dataStr.organization.authStatus==3){
712
//					userType.sty="authicon-com-ok"
713
//					userType.title="科袖认证企业"
714
//				}
715
//			}
716
//			var rImg = "../images/default-resource.jpg";
717
//			if(dataStr.images.length) {
718
//				rImg = "/data/resource/" + dataStr.images[0].imageSrc;
719
//			}
720
//			var li = document.createElement("li");
721
//			li.className = "mui-table-view-cell";
722
//			var strAdd = '';
723
//				strAdd += '<a target="_blank" href="resourceShow.html?resourceId='+ dataStr.resourceId +'" class="flexCenter urlgo">';
724
//				strAdd += '<div class="madiaHead resouseHead" style="background-image:url('+ rImg +')"></div>';
725
//				strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty">'+ dataStr.resourceName +'</p>';
726
//				strAdd += '<p class="h1Font ellipsisSty">'+ namepo +'<em class="authiconNew ' + userType.sty + '" title="'+userType.title+'"></em></p>';
727
//				strAdd += '<p class="h2Font ellipsisSty-2">用途:'+ dataStr.supportedServices+'</p></div>';
728
//				strAdd += '</a>';
729
//			li.innerHTML =strAdd
730
//			document.getElementById("attendRes").appendChild(li);
731
//		}
732
//	}
733
//	function detailArt(datalist) {
734
//		// document.getElementById("attendArt").innerHTML="";
735
//		for(var i = 0; i < datalist.length; i++) {
736
//			var dataItem = datalist[i].article;
737
//			var arImg = "../images/default-artical.jpg";
738
//			if(dataItem.articleImg) {
739
//				arImg ="/data/article/" + dataItem.articleImg
740
//			}
741
//			var title = dataItem.articleTitle;
742
//			var name = ""
743
//			var li = document.createElement("li");
744
//			if( dataItem.articleType == 1) {
745
//				name = dataItem.professor.name;
746
//			} else {
747
//				if(dataItem.organization.forShort){
748
//					name = dataItem.organization.forShort;
749
//				}else{
750
//					name = dataItem.organization.name;
751
//				}
752
//			}
753
//			li.className = "mui-table-view-cell";
754
//			var strAdd = '';
755
//				strAdd += '<a  target="_blank" href="/'+ pageUrl('a',dataItem) +'" class="flexCenter urlgo">';
756
//				strAdd += '<div class="madiaHead artHead" style="background-image:url('+ arImg +')"></div>';
757
//				strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">'+ dataItem.articleTitle +'</p>';
758
//				strAdd += '<ul class="h2Font clearfix">';
759
//				strAdd += '<li><span>'+ name +'</span></li>';
760
//				strAdd += '<li><span class="time">'+ commenTime(dataItem.publishTime) +'</span></li>';
761
//				strAdd += '<li><span class="comment"></span></li>';
762
//				strAdd += '</ul></div>';
763
//				strAdd += '</a>';
764
//			li.innerHTML = strAdd
765
//			document.getElementById("attendArt").appendChild(li);
766
//
767
//		}
768
//	}
769
//	function detailDemand(datalist) {
770
//		// document.getElementById("attendDemand").innerHTML="";
771
//		var arr=[];
772
//		for(var i in datalist) {
773
//			arr[i]=datalist[i].watchObject;
774
//		}
775
//		$.ajax({
776
//			url:"/ajax/demand/qm",
777
//			data: {
778
//				id:arr,
779
//			},
780
//			dataType: 'json', //数据格式类型
781
//			type: 'get', //http请求类型
782
//			traditional: true,
783
//			success: function(data) {
784
//				if(data.success && data.data != "") {
785
//					var dataStr=data.data;
786
//					for(var i = 0; i < dataStr.length; i++) {
787
//						var li = document.createElement("li");
788
//						li.className = "mui-table-view-cell";
789
//						var strCon='<a  target="_blank" href="demandShow.html?demandId='+ dataStr[i].id +'" class="flexCenter urlgo">';
790
//						strCon+='<div class="madiaInfo" style="padding-left:0">'
791
//						strCon+='<p class="h1Font ellipsisSty">'+ dataStr[i].title +'</p>'
792
//						strCon+='<ul class="showli clearfix h3Font">'
793
//						
794
//						if(dataStr[i].city){ strCon+='<li>'+dataStr[i].city+'</li>' }
795
//						if(dataStr[i].duration!=0){ strCon+='<li>预期 '+demandDuration[dataStr[i].duration]+'</li>' }
796
//						if(dataStr[i].cost!=0){ strCon+='<li>预算 '+demandCost[dataStr[i].cost]+'</li>' }
797
//						if(dataStr[i].invalidDay){ strCon+='<li>有效期至 '+TimeTr(dataStr[i].invalidDay)+'</li>' }
798
//						
799
//						strCon+='</ul></div></a>'
800
//						
801
//						li.innerHTML = strCon
802
//						document.getElementById("attendDemand").appendChild(li);
803
//					}
804
//				}
805
//			},
806
//			error:  function() {
807
//			}
808
//		});
809
//	}
810
811
812
	var rows = 2,
813
		dataO = {
814
			artPublishTime:"",
815
			artShareId:"",
816
			
817
			resPublishTime:"",
818
			resShareId:"",
819
			
820
			serModifyTime: "",
821
			serId: "",
822
			
823
			patTime:"",
824
			patId:"",
825
			
826
			parTime:"",
827
			parId:"",
828
			
829
			AnsTime:"",
830
			AnsId:"",
831
			
832
			QuTime:"",
833
			QuId:"",
834
			
835
		},
836
		watchO={
837
			beiTime:"",
838
			beiProId:"",
839
			
840
			watchTime:"",
841
			watchObjId:""
842
		};
843
	var oAjax = function(url, dataS, otype, oFun,beforeFun,completeFun) {
844
			$.ajax({
845
				url:url,
846
				dataType: 'json',
847
				type: otype,
848
				data: dataS,
849
				traditional: true,
850
				beforeSend: beforeFun,
851
				success: function(res) {
852
					if(res.success) {
853
						oFun(res)
1119 854
					}
1120
					var dataStr=data.data.data;
1121
					if(dataStr.length > 0){
1122
						$("#showPaper").parents(".coninfobox").removeClass("displayNone");
1123
						$("#item1user>.nodatabox").addClass("displayNone");
1124
						for(var i = 0; i < dataStr.length; i++) {
1125
							var moreInf=""
1126
							if(!dataStr[i].cn4periodical){
1127
								dataStr[i].cn4periodical="";
1128
							}
1129
							if(!dataStr[i].en4periodical){
1130
								dataStr[i].en4periodical="";
1131
							}
1132
							if(!dataStr[i].pubDay){
1133
								dataStr[i].pubDay="";
1134
							}
1135
							moreInf = dataStr[i].cn4periodical+ " " +dataStr[i].en4periodical+ " " +dataStr[i].pubDay
1136
							
1137
							var strAdd = '';
1138
							strAdd += '<li><a  target="_blank" href="/'+ pageUrl("pp",dataStr[i]) +'" class="flexCenter urlgo">';
1139
							strAdd += '<div class="madiaHead paperHead"></div>';
1140
							strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty">'+ dataStr[i].name +'</p>';
1141
							strAdd += '<p class="h2Font ellipsisSty">作者:'+ dataStr[i].authors.substring(0, dataStr[i].authors.length - 1) +'</p>';
1142
							strAdd += '<p class="h2Font ellipsisSty">期刊:'+ moreInf +'</p>';
1143
							strAdd += '</div>';
1144
							strAdd += '</a></li>';
1145
							
1146
							var $strAdd = $(strAdd);
1147
							$("#proPaper").append( $strAdd);
1148
							if(isbind==true && i==0){
1149
								var $strAddO=$(strAdd);
1150
								$("#showPaper").html();
1151
								$("#showPaper").append($strAddO);
1152
							}
855
				},
856
				complete:completeFun
857
	            
858
			});
859
		},	
860
		insertNodata = function (targetE,newStr) {
861
            var parent = document.getElementById(targetE).parentNode;
862
            var kong = document.createElement("div");
863
            kong.className = "con-kong";
864
            kong.innerHTML ='<div class="picbox picNull"></div>'+
865
			            '<div class="txtbox">暂时没有符合该搜索条件的内容</div>'
866
            if(newStr){
867
            	kong.querySelector(".txtbox").innerHTML = newStr;
868
            }
869
            if (parent.firstChild.className == "con-kong") {
870
                return
871
            } else {
872
                parent.insertBefore(kong,parent.firstChild);
873
            }
874
875
        },
876
        removeNodata = function (targetE) {
877
            var parent = document.getElementById(targetE).parentNode;
878
            if (parent.firstChild.className == "con-kong") {
879
                parent.removeChild(parent.firstChild);
880
            } else {
881
                return
882
            }
883
        },
884
       	getUserInfo=function() {
885
       		oAjax("/ajax/professor/info/"+ professorId,{}, "get", function(data){
886
				var $info = data.data;
887
				if($info.hasHeadImage){
888
					$("#proHead").css("background-image","url(/images/head/"+ $info.id +"_l.jpg)");
889
				}
890
				$("#proName").text($info.name);
891
				var oStyS=autho($info.authType,$info.orgAuth,$info.authStatus);
892
				$("#proAuth").addClass(oStyS.sty); $("#proAuth").attr("title",oStyS.title);
893
				if($info.address){
894
					$("#proAddress").html($info.address + "<span style='margin-right:10px;'></span>");
895
				}
896
				var proOther="";
897
				if($info.orgName){
898
					if($info.department){
899
						if($info.office){
900
							proOther = $info.orgName + "," + $info.department + "," + $info.office
901
						}else{
902
							proOther = $info.orgName + "," + $info.department
1153 903
						}
1154
						//分页
1155
						if(isbind){
1156
                            $("#proPaper").parent().find(".js-load-more").on("click", function () {
1157
                                getPaper(++pageNo,false);
1158
                            });
904
					}else{
905
						if($info.office){
906
							proOther = $info.orgName +"," + $info.office
907
						}else{
908
							proOther = $info.orgName
909
						}
910
					}
911
				}else{
912
					if($info.department){
913
						if($info.office){
914
							proOther =  $info.department + "," + $info.office
915
						}else{
916
							proOther =  $info.department
1159 917
						}
1160
                        if (pageNo >= Math.ceil(data.data.total / pageSize)) {
1161
                            $("#proPaper").parent().find(".js-load-more").unbind("click");
1162
                            $("#proPaper").parent().find(".js-load-more").hide();
1163
                        }
1164 918
					}else{
1165
						$("#proPaper + .nodatabox").show();
1166
						$("#proPaper + .nodatabox").find(".noContip").text("用户尚未发布任何论文");
1167
						if(isbind) {
1168
                            $("#proPaper").parent().find(".js-load-more").hide();
1169
                        }
919
						if($info.office){
920
							proOther = $info.office
921
						}
1170 922
					}
1171 923
				}
1172
			},
1173
			error: function() {
1174
				return;
1175
			}
1176
		});
1177
	}
1178
	//获取问答
1179
    function getMyAnswer(id,isbind) {
1180
        $.ajax({
1181
            url: "/ajax/question/answer/bySelf",
1182
            dataType: 'json',
1183
            type: 'GET',
1184
            data: {
1185
                "time":ATime,
1186
                "id":AId,
1187
                "rows":rows,
1188
				"uid":id
1189
            },
1190
            beforeSend: function() {
1191
                $("#proA").parent().find(".js-load-more").attr("disabled",true);
1192
                $("#proA").parent().find(".js-load-more").addClass("active");
1193
            },
1194
            complete:function () {
1195
                $("#proA").parent().find(".js-load-more").removeAttr("disabled");
1196
                $("#proA").parent().find(".js-load-more").removeClass("active");
1197
            },
1198
            success: function(data) {
1199
                if(data.success) {
1200
                    var dataStr=data.data;
1201
                    if(dataStr.length > 0){
1202
                        $("#showAnswer").parents(".coninfobox").removeClass("displayNone");
1203
                        $("#item1user>.nodatabox").addClass("displayNone");
1204
                        ATime = dataStr[dataStr.length - 1].createTime;
1205
                        AId = dataStr[dataStr.length - 1].id;
1206
                        for(var i = 0; i < dataStr.length; i++) {
1207
                            var listLi = $('<li class="mui-table-view-cell">').appendTo($("#proA"));
1208
                            answer(dataStr[i], listLi);
1209
                            if(isbind==true && i==0){
1210
                                var li = listLi.clone();
1211
                                $("#showAnswer").html();
1212
                                $("#showAnswer").append(li);
1213
                                questioninfo(dataStr[i].qid, li);
1214
                                proinfo(dataStr[i].uid, li);
1215
                                leaveMsgCount(dataStr[i].id,4, li);
1216
1217
                            }
1218
                        }
1219
                        if(isbind==true){
1220
                            $("#proA").parent().find(".js-load-more").on("click", function () {
1221
                                getMyAnswer(id,false);
1222
                            });
1223
                        }
1224
                        if (dataStr.length < rows) {
1225
                            $("#proA").parent().find(".js-load-more").unbind("click");
1226
                            $("#proA").parent().find(".js-load-more").hide();
1227
                        }
1228
                    }else{
1229
                    	$("#proA").parent().find(".js-load-more").hide()
1230
                        $("#proA + .nodatabox").show();
1231
                        $("#proA + .nodatabox").find(".noContip").text("用户尚未回答任何问题");
1232
                    }
924
				$("#proOther").text(proOther);
925
				var llqtitle=$info.name + "-" + proOther.replace(/,/gi,"-") + "-科袖网";//修改浏览器title信息
926
				if($info.title){
927
					$("#proTit").html($info.title + "<span style='margin-right:10px;'></span>");
928
					llqtitle = $info.name + "-" + $info.title + "-" + proOther.replace(/,/gi,"-") + "-科袖网";
929
				}
930
				document.title = llqtitle;
931
				
932
				//主页浏览量
933
				$("#viewNums").text($info.pageViews);
934
				//个人简介
935
				if($info.descp) {
936
					$("#descpS").parents(".coninfobox").removeClass("displayNone");
937
					$("#item1user>.nodatabox").addClass("displayNone");
938
					$("#descpS").text($info.descp);
939
				}
940
				//学术领域					
941
				if($info.subject) {
942
					$("#subjectShow").parents(".coninfobox").removeClass("displayNone");
943
					$("#item1user>.nodatabox").addClass("displayNone");
944
					subjectShow($info.subject);
945
				}
946
				//研究方向
947
				if($info.researchAreas.length) {
948
					$("#researchAreaShow").parents(".coninfobox").removeClass("displayNone");
949
					$("#item1user>.nodatabox").addClass("displayNone");
950
					researchAreaShow($info.researchAreas, $info.editResearchAreaLogs);
951
				}
952
				//行业领域	
953
				if($info.industry) {
954
					$("#industryShow").parents(".coninfobox").removeClass("displayNone");
955
					$("#item1user>.nodatabox").addClass("displayNone");
956
					industryShow($info.industry);
957
				}
958
				//教育背景					
959
				if($info.edus.length) {
960
					eduBgShow($info.edus);
961
				} else {
962
					$("#eduBgShow").parents(".coninfobox").hide();
963
				}
964
				//兼职
965
				if($info.jobs.length) {
966
					timeJobShow($info.jobs);
967
				} else {
968
					$("#timeJobShow").parents(".coninfobox").hide();
969
				}
970
				//项目
971
				if($info.projects.length) {
972
					projectShow($info.projects)
973
				} else {
974
					$("#projectShow").parents(".coninfobox").hide();
975
				}
976
				//荣誉
977
				if($info.honors.length) {
978
					honorShow($info.honors);
979
				} else {
980
					$("#honorShow").parents(".coninfobox").hide();
981
				}
982
				
983
				if($info.honors.length == 0 && $info.projects.length == 0 && $info.jobs.length == 0 && $info.edus.length == 0){
984
					$("#item7user>.nodatabox").show();
985
					$("#item7user>.nodatabox").find(".noContip").text("用户尚未完善详细资料")
986
				}
987
				
988
				var weibotitle = $info.name;
989
				var weibourl = window.location.href;
990
				var weibopic ="http://"+window.location.host+"/images/head/"+ $info.id +"_l.jpg";
991
				$("#weibo").attr("href","http://service.weibo.com/share/share.php?appkey=3677230589&title="+weibotitle+"&url="+weibourl+"&pic="+weibopic+"&ralateUid=6242830109&searchPic=false&style=simple");
992
			});
993
		},
994
        commerceInfo=function(oName){
995
			oAjax("/ajax/org/regInfo",{
996
				"name": oName
997
			}, "get", function(data){
998
				if(data.data) {
999
					$("#comMes").parents(".coninfobox").show();
1000
					var $data = data.data;
1001
					var str = "";
1002
					if($data.num) {
1003
						str += "<li>工商注册号:" + $data.num + "</li>"
1004
					}
1005
					if($data.code) {
1006
						str += "<li>组织机构代码:" + $data.code + "</li>"
1007
					}
1008
					if($data.creditCode) {
1009
						str += "<li>统一信用代码:" + $data.creditCode + "</li>"
1010
					}
1011
					if($data.type) {
1012
						str += "<li>企业类型:" + $data.type + "</li>"
1013
					}
1014
					if($data.industry) {
1015
						str += "<li>行业:" + $data.industry + "</li>"
1016
					}
1017
					if($data.operatingPeriod) {
1018
						str += "<li>营业期限:" + $data.operatingPeriod + "</li>"
1019
					}
1020
					if($data.dayOfApproval) {
1021
						str += "<li>核准日期:" + $data.dayOfApproval + "</li>"
1022
					}
1023
					if($data.manager) {
1024
						str += "<li>登记机关:" + $data.manager + "</li>"
1025
					}
1026
					if($data.addr) {
1027
						str += "<li>注册地址:" + $data.addr + "</li>"
1028
					}
1029
					if($data.scopeOfBusiness) {
1030
						str += "<li>经营范围:" + $data.scopeOfBusiness + "</li>"
1031
					}
1032
					$("#comMes").html(str);
1033
				}
1034
			});
1035
		},
1036
       	demandListVal=function(isbind) {
1037
			oAjax("/ajax/demand/pq",{
1038
				"state":'1',
1039
				"uid":professorId,
1040
				"pageSize":5
1041
			}, "get", function(data){
1042
				var $info = data.data.data;
1043
				if($info.length > 0){
1044
					$("#showDemand").parents(".coninfobox").removeClass("displayNone");
1045
					$("#item1user>.nodatabox").addClass("displayNone");
1046
					for(var i = 0; i < $info.length; i++) {
1047
						var liStr=$("<li></li>").appendTo("#showDemand");
1048
						var $data=$info[i];
1049
						var sowU="";
1050
						if($data.pageViews!=0){
1051
							sowU='<li><span>浏览量 '+$data.pageViews +'</span></li>'
1052
						}
1053
						var strCon='';
1054
							strCon+='<a class="" target="_blank" href="demandShow.html?demandId='+$data.id+'" class="madiaInfo">'
1055
							strCon+='<p class="h1Font ellipsisSty">'+ $data.title +'</p>'
1056
							strCon+='<ul class="showliTop h3Font clearfix">'
1057
							strCon+='<li><span>发布于 '+TimeTr($data.createTime)+'</span></li>'
1058
							strCon+= sowU
1059
							strCon+='</ul>'
1060
							strCon+='<p class="h2Font ellipsisSty-2">'+$data.descp+'</p>'
1061
							strCon+='<ul class="showli clearfix h3Font">'
1062
							
1063
							if($data.city){ strCon+='<li>所在城市:'+$data.city+'</li>' }
1064
							if($data.duration!=0){ strCon+='<li>预期时长:'+demandDuration[$data.duration]+'</li>' }
1065
							if($data.cost!=0){ strCon+='<li>费用预算:'+demandCost[$data.cost]+'</li>' }
1066
							if($data.invalidDay){ strCon+='<li>有效期至:'+TimeTr($data.invalidDay)+'</li>' }
1067
							
1068
							strCon+='</ul>'
1069
							strCon+='</a>'
1070
						$(strCon).appendTo(liStr);
1071
					}
1072
				}else{
1073
					$("#showDemand").parents(".needinfobox").addClass("displayNone");
1074
				}
1075
			})
1076
		},
1077
        articalListVal=function(isbind){
1078
			var aimId="proArticel",aimIdF="showArticle",newStr="用户尚未发布任何文章"
1079
			oAjax("/ajax/article/publish",{
1080
				"category": "1",
1081
				"owner":professorId,
1082
				"publishTime":dataO.artPublishTime,
1083
				"shareId": dataO.artShareId,
1084
				"rows": rows
1085
			}, "get", function(res){
1086
				var $info = res.data;
1087
				if($info.length > 0) {
1088
					$("#"+aimId).show()
1089
					$("#"+aimIdF).parents(".coninfobox").removeClass("displayNone");
1090
					dataO.artPublishTime = $info[$info.length - 1].publishTime;
1091
					dataO.artShareId = $info[$info.length - 1].shareId;
1092
			
1093
					for(var i = 0; i < $info.length; i++) {
1094
						var sowU="",hasImg="/images/default-artical.jpg"
1095
						if($info[i].articleImg) {
1096
							hasImg="/data/article/" + $info[i].articleImg
1097
						}
1098
						if($info[i].pageViews!=0){
1099
							if($info[i].articleAgree!=0){
1100
								sowU='<li><span>阅读量 '+$info[i].pageViews+'</span></li><li><span>赞 '+$info[i].articleAgree+'</span></li>'
1101
							}else{
1102
								sowU='<li><span>阅读量 '+$info[i].pageViews+'</span></li>'
1103
							}
1104
						}
1105
						var itemlist = '<li>';
1106
							itemlist += '<a href="/'+pageUrl('a',$info[i])+'" class="flexCenter urlgo">';
1107
							itemlist += '<div class="madiaHead artHead" style="background-image:url(' + hasImg + ')"></div>';
1108
							itemlist += '<div class="madiaInfo">';
1109
							itemlist += '<p class="h1Font ellipsisSty-2">'+$info[i].articleTitle+'</p>';
1110
							itemlist += '<ul class="h2Font clearfix">';
1111
							itemlist += '<li><span class="time">' + commenTime($info[i].publishTime) + '</span></li>';
1112
							itemlist += sowU
1113
							itemlist += '<li><span class="leaveMsgCount"></span></li>';
1114
							itemlist += '</ul></div>';
1115
							itemlist += '</a></li>';
1116
						var $itemlist = $(itemlist);
1117
						$("#"+aimId).append($itemlist)
1118
						leaveMsgCount($info[i].articleId,1,$itemlist);
1119
						
1120
						if(isbind && i==0){
1121
							var $itemlist = $(itemlist);
1122
							$("#"+aimIdF).append($itemlist);
1123
							leaveMsgCount($info[0].articleId,1,$itemlist);
1124
						}
1125
					}
1126
				}
1127
				var liLen=document.getElementById(aimId).querySelectorAll("li").length;
1128
                removeNodata(aimId);
1129
                if($info.length == 0 && liLen == 0 ){
1130
                	$("#"+aimId).hide()
1131
                    insertNodata(aimId,newStr);
1233 1132
                }
1234
            },
1235
            error: function() {
1236
                return;
1237
            }
1238
        });
1239
    }
1240
    // 获取问题
1241
    function getMyQuestion(id,isbind) {
1242
        $.ajax({
1243
            url: "/ajax/question/my",
1244
            dataType: 'json',
1245
            type: 'GET',
1246
            data: {
1247
                "time":QTime,
1248
                "id":QId,
1249
                "rows":rows,
1250
                "uid":id
1251
            },
1252
            beforeSend: function() {
1253
                $("#proQ").parent().find(".js-load-more").attr("disabled",true);
1254
                $("#proQ").parent().find(".js-load-more").addClass("active");
1255
            },
1256
            complete:function () {
1257
                $("#proQ").parent().find(".js-load-more").removeAttr("disabled");
1258
                $("#proQ").parent().find(".js-load-more").removeClass("active");
1259
            },
1260
            success: function(data) {
1261
                if(data.success) {
1262
                    var dataStr=data.data;
1263
                    if(dataStr.length > 0){
1264
                        QTime = dataStr[dataStr.length - 1].createTime;
1265
                        QId = dataStr[dataStr.length - 1].id;
1266
                        for(var i = 0; i < dataStr.length; i++) {
1267
                            var listLi = $('<li class="mui-table-view-cell">').appendTo($("#proQ"));
1268
                            question(dataStr[i], listLi);
1269
                            if(isbind==true && i==0){
1270
                                $("#proQ").html();
1271
                            }
1272
                        }
1273
                        if(isbind==true){
1274
                            $("#proQ").parent().find(".js-load-more").on("click", function () {
1275
                                getMyQuestion(id,false);
1276
                            });
1277
                        }
1278
                        if (dataStr.length < rows) {
1279
                            $("#proQ").parent().find(".js-load-more").unbind("click");
1280
                            $("#proQ").parent().find(".js-load-more").hide();
1281
                        }
1282
                    }else{
1283
                    	$("#proQ").parent().find(".js-load-more").hide()
1284
                        $("#proQ + .nodatabox").show();
1285
                        $("#proQ + .nodatabox").find(".noContip").text("用户尚未提出任何问题");
1286
                    }
1133
                if(isbind){
1134
                	$("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
1135
					 	articalListVal(false)
1136
					})
1287 1137
                }
1288
            },
1289
            error: function() {
1290
                return;
1291
            }
1292
        });
1293
    }
1294
    //我关注的问题
1295
	function getMyWatchQ(id,isbind) {
1296
        $.ajax({
1297
            url: "/ajax/question/watch",
1298
            dataType: 'json',
1299
            type: 'GET',
1300
            data: {
1301
                "time":WTime,
1302
                "id":WId,
1303
                "rows":rows,
1304
                "uid":id
1305
            },
1306
            beforeSend: function() {
1307
1308
            },
1309
            complete:function () {
1310
                $("#item8user").find(".js-load-more").removeAttr("disabled");
1311
                $("#item8user").find(".js-load-more").removeClass("active");
1312
            },
1313
            success: function(data) {
1314
                if(data.success) {
1315
                    var dataStr=data.data;
1316
                    if(dataStr.length > 0){
1317
                        WTime = dataStr[dataStr.length - 1].createTime;
1318
                        WId = dataStr[dataStr.length - 1].id;
1319
                        for(var i = 0; i < dataStr.length; i++) {
1320
                            var listLi = $('<li class="mui-table-view-cell">').appendTo($("#attendQuestion"));
1321
                            question(dataStr[i], listLi);
1322
                            if(isbind==true && i==0){
1323
                                var li = listLi.clone();
1324
                                $("#showAnswer").html();
1325
                                $("#showAnswer").append(li);
1326
                                questioninfo(dataStr[i].qid, li);
1327
                                proinfo(dataStr[i].uid, li);
1328
                                leaveMsgCount(dataStr[i].id,4, li);
1329
1330
                            }
1331
                        }
1332
                        if(isbind==true){
1333
                            $("#item8user").append('<button class="js-load-more"></button>');
1334
                            $("#item8user").find(".js-load-more").on("click", function () {
1335
                                getMyWatchQ(id,false);
1336
                            });
1337
                        }
1338
                        if (dataStr.length < rows) {
1339
                            $("#item8user").find(".js-load-more").unbind("click");
1340
                            $("#item8user").find(".js-load-more").hide();
1341
                        }
1342
                    }else{
1343
                        $("#attendQuestion + .nodatabox").show();
1344
                        $("#attendQuestion + .nodatabox").find(".noContip").text("用户尚未回答任何问题");
1345
                    }
1138
				if ($info.length < rows) {
1139
                    $("#"+aimId).parent().find(".js-load-more").unbind("click");
1140
                    $("#"+aimId).parent().find(".js-load-more").hide();
1346 1141
                }
1347
            },
1348
            error: function() {
1349
                return;
1350
            }
1351
        });
1352
    }
1353
    //我关注的回答
1354
    function getMyWatchA(id,isbind) {
1355
        $.ajax({
1356
            url: "/ajax/question/answer/byWatch",
1357
            dataType: 'json',
1358
            type: 'GET',
1359
            data: {
1360
                "time":WTime,
1361
                "id":WId,
1362
                "rows":rows,
1363
                "uid":id
1364
            },
1365
            beforeSend: function() {
1366
                $("#item8user").find(".js-load-more").attr("disabled",true);
1367
                $("#item8user").find(".js-load-more").addClass("active");
1368
            },
1369
            complete:function () {
1370
                $("#item8user").find(".js-load-more").removeAttr("disabled");
1371
                $("#item8user").find(".js-load-more").removeClass("active");
1372
            },
1373
            success: function(data) {
1374
                if(data.success) {
1375
                    var dataStr=data.data;
1376
                    if(dataStr.length > 0){
1377
                        WTime = dataStr[dataStr.length - 1].createTime;
1378
                        WId = dataStr[dataStr.length - 1].id;
1379
                        for(var i = 0; i < dataStr.length; i++) {
1380
                            var listLi = $('<li class="mui-table-view-cell">').appendTo($("#attendAnswer"));
1381
                            answer(dataStr[i], listLi);
1382
                        }
1383
                        if(isbind==true){
1384
                            $("#item8user").append('<button class="js-load-more"></button>');
1385
                            $("#item8user").find(".js-load-more").on("click", function () {
1386
                                getMyWatchA(id,false);
1387
                            });
1388
                        }
1389
                        if (dataStr.length < rows) {
1390
                            $("#item8user").find(".js-load-more").unbind("click");
1391
                            $("#item8user").find(".js-load-more").hide();
1392
                        }
1393
                    }else{
1394
                        $("#attendAnswer + .nodatabox").show();
1395
                        $("#attendAnswer + .nodatabox").find(".noContip").text("用户尚未回答任何问题");
1396
                    }
1142
			},function(){
1143
				$("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
1144
	       		$("#"+aimId).parent().find(".js-load-more").addClass("active");
1145
			},function(){
1146
				$("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
1147
	        	$("#"+aimId).parent().find(".js-load-more").removeClass("active");
1148
			})
1149
		},
1150
		resourceListVal=function(isbind){
1151
			var aimId="proResource",aimIdF="showResource",newStr="用户尚未发布任何资源"
1152
			oAjax("/ajax/resource/publish",{
1153
				"category": "1",
1154
				"owner":professorId,
1155
				"publishTime":dataO.resPublishTime,
1156
				"shareId": dataO.resShareId,
1157
				"rows": rows
1158
			}, "get", function(res){
1159
				var $info = res.data;
1160
				if($info.length > 0) {
1161
					$("#"+aimId).show()
1162
					$("#"+aimIdF).parents(".form-item").removeClass("displayNone");
1163
					$("#"+aimIdF).parents(".coninfobox").show();
1164
					dataO.resPublishTime = $info[$info.length - 1].publishTime;
1165
					dataO.resShareId = $info[$info.length - 1].shareId;
1166
			
1167
					for(var i = 0; i < $info.length; i++) {
1168
						var hasImg='/images/default-resource.jpg'
1169
						if($info[i].images.length) {
1170
							hasImg="/data/resource/" + $info[i].images[0].imageSrc
1171
						}
1172
						
1173
						var itemlist = '<li>';
1174
							itemlist += '<a href="resourceShow.html?resourceId=' + $info[i].resourceId + '" class="flexCenter urlgo">';
1175
							itemlist += '<div class="madiaHead resouseHead" style="background-image:url(' + hasImg + ')"></div>';
1176
							itemlist += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">' + $info[i].resourceName + '</p><p class="h2Font ellipsisSty">应用用途:' + $info[i].supportedServices + '</p></div>';
1177
							itemlist += '</a></li>';
1178
						var $itemlist = $(itemlist);
1179
						$("#"+aimId).append($itemlist)
1180
						
1181
						if(isbind && i==0){
1182
							var $itemlist = $(itemlist);
1183
							$("#"+aimIdF).append($itemlist);
1184
						}
1185
					}
1186
				}
1187
				var liLen=document.getElementById(aimId).querySelectorAll("li").length;
1188
                removeNodata(aimId);
1189
                if($info.length == 0 && liLen == 0 ){
1190
                	$("#"+aimId).hide()
1191
                    insertNodata(aimId,newStr);
1397 1192
                }
1398
            },
1399
            error: function() {
1400
                return;
1401
            }
1402
        });
1403
    }
1404
1405
	//合作专家
1406
	function relevantExperts(){
1407
		$.ajax({
1408
			"url": "/ajax/professor/coadjutant",
1409
			"type": "get",
1410
			"dataType" : "json",
1411
			"data" :{"id":professorId},
1412
			"success": function(data) {
1413
				if(data.success && data.data) {
1414
					console.log(data)
1415
					for(var i = 0; i < data.data.length; i++) {
1416
						var ExpId = data.data[i].professorId;
1417
						var paperN=data.data[i].paperCount;
1418
						var patentN=data.data[i].patentCount;
1419
						var liItem=$('<li class="flexCenter"></li>').appendTo($("#relatePro"));
1420
						relExpertsList(ExpId,paperN,patentN,liItem);
1193
                if(isbind){
1194
                	$("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
1195
					 	resourceListVal(false)
1196
					})
1197
                }
1198
				if ($info.length < rows) {
1199
                    $("#"+aimId).parent().find(".js-load-more").unbind("click");
1200
                    $("#"+aimId).parent().find(".js-load-more").hide();
1201
                }
1202
			},function(){
1203
				$("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
1204
	       		$("#"+aimId).parent().find(".js-load-more").addClass("active");
1205
			},function(){
1206
				$("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
1207
	        	$("#"+aimId).parent().find(".js-load-more").removeClass("active");
1208
			})
1209
		},
1210
		serviceListVal=function(isbind){
1211
			var aimId="proService",aimIdF="showService",newStr="用户尚未发布任何服务"
1212
			oAjax("/ajax/ware/publish",{
1213
				"category":"1",
1214
				"owner":professorId,
1215
				"modifyTime":dataO.serModifyTime,
1216
				"rows": rows
1217
			}, "get", function(res){
1218
				var $info = res.data;
1219
				if($info.length > 0) {
1220
					$("#"+aimId).show()
1221
					$("#"+aimIdF).parents(".form-item").removeClass("displayNone");
1222
					$("#"+aimIdF).parents(".coninfobox").show();
1223
					dataO.serModifyTime = $info[$info.length - 1].modifyTime;
1224
			
1225
					for(var i = 0; i < $info.length; i++) {
1226
						var cnt="", hasImg="../images/default-service.jpg"
1227
						if($info[i].images) {
1228
							var subs = strToAry($info[i].images)
1229
							if(subs.length > 0) {
1230
								hasImg="/data/ware" + subs[0]
1231
							}
1232
						}
1233
						var itemlist = '<li>';
1234
							itemlist += '<a href="serviceShow.html?serviceId=' + $info[i].id + '" class="flexCenter urlgo">';
1235
							itemlist += '<div class="madiaHead resouseHead" style="background-image:url(' + hasImg + ')"></div>';
1236
							itemlist += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">' + $info[i].name + '</p><p class="h2Font ellipsisSty">' + cnt+ '</p></div>';
1237
							itemlist += '</a></li>';
1238
						var $itemlist = $(itemlist);
1239
						$("#"+aimId).append($itemlist)
1240
						
1241
						if(isbind && i==0){
1242
							var $itemlist = $(itemlist);
1243
							$("#"+aimIdF).append($itemlist);
1244
						}
1421 1245
					}
1422
					
1423 1246
				}
1424
			},
1425
			"error": function() {
1426
				$.MsgBox.Alert('提示', '链接服务器超时')
1427
			}
1428
		});
1429
	}
1430
	//合作专家信息
1431
	function relExpertsList(Id,numL,numZ,liItem){
1432
		$.ajax({
1433
			"url" : "/ajax/professor/info/"+Id,
1434
			"type" :  "GET" ,
1435
			"dataType" : "json",
1436
			"success" : function(data) {
1437
				if (data.success && data.data!=""){
1438
					$("#relatePro").parents(".conBlock").removeClass("displayNone");
1439
					var itemlist = '<a  target="_blank" href="" class="urlgo">';
1440
						itemlist += '<div class="madiaHead useHead" id="userimg"></div>';
1441
						itemlist += '<div class="madiaInfo">';
1442
						itemlist += '<p><span class="h1Font" id="userName"></span><em class="authiconNew" title=""></em></p>';
1443
						itemlist += '<p class="ellipsisSty h2Font" id="usertitle"></p>';
1444
						itemlist += '<p class="h2Font ellipsisSty" id="copNum"></p>';
1445
						itemlist += '</div></a>';
1446
					$(itemlist).appendTo(liItem);
1447
				    var $itemlist =liItem;
1448
					if(numL){
1449
						if(numZ){
1450
							$itemlist.find("#copNum").text("合作:"+numZ+"项专利,"+numL+"篇论文")
1451
						}else{
1452
							$itemlist.find("#copNum").text("合作:"+numL+"篇论文")
1247
				var liLen=document.getElementById(aimId).querySelectorAll("li").length;
1248
                removeNodata(aimId);
1249
                if($info.length == 0 && liLen == 0 ){
1250
                	$("#"+aimId).hide()
1251
                    insertNodata(aimId,newStr);
1252
                }
1253
                if(isbind){
1254
                	$("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
1255
					 	serviceListVal(false)
1256
					})
1257
                }
1258
				if ($info.length < rows) {
1259
                    $("#"+aimId).parent().find(".js-load-more").unbind("click");
1260
                    $("#"+aimId).parent().find(".js-load-more").hide();
1261
                }
1262
			},function(){
1263
				$("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
1264
	       		$("#"+aimId).parent().find(".js-load-more").addClass("active");
1265
			},function(){
1266
				$("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
1267
	        	$("#"+aimId).parent().find(".js-load-more").removeClass("active");
1268
			})
1269
		},
1270
		patentListVal=function(isbind){
1271
			var aimId="proPatent",aimIdF="showPatent",newStr="用户尚未发布任何专利"
1272
			oAjax("/ajax/ppatent/professor",{
1273
				"category":"1",
1274
				"owner":professorId,
1275
				"assTime":dataO.patTime,
1276
				"id":dataO.patId,
1277
				"rows": rows
1278
			}, "get", function(res){
1279
				var $info = res.data;
1280
				if($info.length > 0) {
1281
					$("#"+aimId).show()
1282
					$("#"+aimIdF).parents(".form-item").removeClass("displayNone");
1283
					$("#"+aimIdF).parents(".coninfobox").show();
1284
					dataO.patTime = $info[$info.length - 1].assTime;
1285
					dataO.patId = $info[$info.length - 1].id;
1286
			
1287
					for(var i = 0; i < $info.length; i++) {
1288
						var dataStr= $info
1289
						if(!dataStr[i].reqPerson){
1290
								dataStr[i].reqPerson="";
1291
							}
1292
						var strAdd = '';
1293
							strAdd += '<li><a  target="_blank" href="/'+ pageUrl("pt",dataStr[i]) +'" class="flexCenter urlgo">';
1294
							strAdd += '<div class="madiaHead patentHead"></div>';
1295
							strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty">'+ dataStr[i].name +'</p>';
1296
							strAdd += '<p class="h2Font ellipsisSty">发明人:'+ dataStr[i].authors.substring(0, dataStr[i].authors.length - 1) +'</p>';
1297
							strAdd += '<p class="h2Font ellipsisSty">申请人:'+ dataStr[i].reqPerson +'</p>';
1298
							strAdd += '</div>';
1299
							strAdd += '</a></li>';
1300
						var $itemlist = $(strAdd);
1301
						$("#"+aimId).append($itemlist)
1302
						
1303
						if(isbind && i==0){
1304
							var $itemlist = $(itemlist);
1305
							$("#"+aimIdF).append($itemlist);
1453 1306
						}
1454
					}else{
1455
						if(numZ){
1456
							$itemlist.find("#copNum").text("合作:"+numZ+"项专利")
1457
						}else{
1307
					}
1308
				}
1309
				var liLen=document.getElementById(aimId).querySelectorAll("li").length;
1310
                removeNodata(aimId);
1311
                if($info.length == 0 && liLen == 0 ){
1312
                	$("#"+aimId).hide()
1313
                    insertNodata(aimId,newStr);
1314
                }
1315
                if(isbind){
1316
                	$("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
1317
					 	patentListVal(false)
1318
					})
1319
                }
1320
				if ($info.length < rows) {
1321
                    $("#"+aimId).parent().find(".js-load-more").unbind("click");
1322
                    $("#"+aimId).parent().find(".js-load-more").hide();
1323
                }
1324
			},function(){
1325
				$("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
1326
	       		$("#"+aimId).parent().find(".js-load-more").addClass("active");
1327
			},function(){
1328
				$("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
1329
	        	$("#"+aimId).parent().find(".js-load-more").removeClass("active");
1330
			})
1331
		},
1332
		paperListVal=function(isbind){
1333
			var aimId="proPaper",aimIdF="showPaper",newStr="用户尚未发布任何论文"
1334
			oAjax("/ajax/ppaper/professor",{
1335
				"category":"1",
1336
				"owner":professorId,
1337
				"assTime":dataO.parTime,
1338
				"id":dataO.parId,
1339
				"rows": rows
1340
			}, "get", function(res){
1341
				var $info = res.data;
1342
				if($info.length > 0) {
1343
					$("#"+aimId).show()
1344
					$("#"+aimIdF).parents(".form-item").removeClass("displayNone");
1345
					$("#"+aimIdF).parents(".coninfobox").show();
1346
					dataO.parTime = $info[$info.length - 1].assTime;
1347
					dataO.parId = $info[$info.length - 1].id;
1348
			
1349
					for(var i = 0; i < $info.length; i++) {
1350
						var dataStr= $info
1351
						var moreInf=""
1352
						if(!dataStr[i].cn4periodical){
1353
							dataStr[i].cn4periodical="";
1354
						}
1355
						if(!dataStr[i].en4periodical){
1356
							dataStr[i].en4periodical="";
1357
						}
1358
						if(!dataStr[i].pubDay){
1359
							dataStr[i].pubDay="";
1360
						}
1361
						moreInf = dataStr[i].cn4periodical+ " " +dataStr[i].en4periodical+ " " +dataStr[i].pubDay
1458 1362
							
1363
						var strAdd = '';
1364
							strAdd += '<li><a  target="_blank" href="/'+ pageUrl("pp",dataStr[i]) +'" class="flexCenter urlgo">';
1365
							strAdd += '<div class="madiaHead paperHead"></div>';
1366
							strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty">'+ dataStr[i].name +'</p>';
1367
							strAdd += '<p class="h2Font ellipsisSty">作者:'+ dataStr[i].authors.substring(0, dataStr[i].authors.length - 1) +'</p>';
1368
							strAdd += '<p class="h2Font ellipsisSty">期刊:'+ moreInf +'</p>';
1369
							strAdd += '</div>';
1370
							strAdd += '</a></li>';
1371
						var $itemlist = $(strAdd);
1372
						$("#"+aimId).append($itemlist)
1373
						
1374
						if(isbind && i==0){
1375
							var $itemlist = $(itemlist);
1376
							$("#"+aimIdF).append($itemlist);
1459 1377
						}
1460 1378
					}
1461
					if(data.data.title) {
1462
						if(data.data.orgName) {
1463
							$itemlist.find("#usertitle").text(data.data.title +","+ data.data.orgName);
1464
						}else{
1465
							$itemlist.find("#usertitle").text(data.data.title);
1466
						}
1467
					}else{
1468
						if(data.data.office) {
1469
							if(data.data.orgName) {
1470
								$itemlist.find("#usertitle").text(data.data.office +","+ data.data.orgName);
1471
							}else{
1472
								$itemlist.find("#usertitle").text(data.data.office);
1473
							}
1474
						}else{
1475
							if(data.data.orgName) {
1476
								$itemlist.find("#usertitle").text(data.data.orgName);
1477
							}
1478
						}
1379
				}
1380
				var liLen=document.getElementById(aimId).querySelectorAll("li").length;
1381
                removeNodata(aimId);
1382
                if($info.length == 0 && liLen == 0 ){
1383
                	$("#"+aimId).hide()
1384
                    insertNodata(aimId,newStr);
1385
                }
1386
                if(isbind){
1387
                	$("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
1388
					 	paperListVal(false)
1389
					})
1390
                }
1391
				if ($info.length < rows) {
1392
                    $("#"+aimId).parent().find(".js-load-more").unbind("click");
1393
                    $("#"+aimId).parent().find(".js-load-more").hide();
1394
                }
1395
			},function(){
1396
				$("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
1397
	       		$("#"+aimId).parent().find(".js-load-more").addClass("active");
1398
			},function(){
1399
				$("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
1400
	        	$("#"+aimId).parent().find(".js-load-more").removeClass("active");
1401
			})
1402
		},
1403
		answerListVal=function(isbind){//获取问答
1404
        	var aimId="proA",aimIdF="showAnswer",newStr="用户尚未任何回答"
1405
			oAjax("/ajax/question/answer/bySelf",{
1406
				"time":dataO.AnsTime,
1407
                "id":dataO.AnsId,
1408
                "uid":professorId,
1409
                "rows":rows
1410
			}, "get", function(res){
1411
				var $info = res.data;
1412
				if($info.length > 0) {
1413
					$("#"+aimId).show()
1414
					$("#"+aimIdF).parents(".form-item").removeClass("displayNone");
1415
					$("#"+aimIdF).parents(".coninfobox").show();
1416
					dataO.AnsTime = $info[$info.length - 1].createTime;
1417
					dataO.AnsId = $info[$info.length - 1].id;
1418
			
1419
					for(var i = 0; i < $info.length; i++) {
1420
						var listLi = $('<li>')
1421
						listLi.appendTo($("#"+aimId));
1422
                        detailAnswer($info[i], listLi);
1423
                        if(isbind && i==0){
1424
                            var li = listLi.clone();
1425
                            $("#"+aimIdF).append(li);
1426
                            questioninfo($info[i].qid, li);
1427
                            proinfo($info[i].uid, li);
1428
                            leaveMsgCount($info[i].id,4, li);
1429
                        }
1479 1430
					}
1480
					$itemlist.find("#userName").text(data.data.name);
1481
					
1482
					$itemlist.find(".urlgo").attr("href", "userInforShow.html?professorId="+data.data.id);
1483
					
1484
					if(data.data.hasHeadImage == 1) {
1485
						$itemlist.find("#userimg").attr("style", "background-image: url(/images/head/" + data.data.id + "_l.jpg);");
1431
				}
1432
				var liLen=document.getElementById(aimId).querySelectorAll("li").length;
1433
                removeNodata(aimId);
1434
                if($info.length == 0 && liLen == 0 ){
1435
                	$("#"+aimId).hide()
1436
                    insertNodata(aimId,newStr);
1437
                }
1438
                if(isbind){
1439
                	$("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
1440
					 	answerListVal(false)
1441
					})
1442
                }
1443
				if ($info.length < rows) {
1444
                    $("#"+aimId).parent().find(".js-load-more").unbind("click");
1445
                    $("#"+aimId).parent().find(".js-load-more").hide();
1446
                }
1447
			},function(){
1448
				$("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
1449
	       		$("#"+aimId).parent().find(".js-load-more").addClass("active");
1450
			},function(){
1451
				$("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
1452
	        	$("#"+aimId).parent().find(".js-load-more").removeClass("active");
1453
			})
1454
    	},
1455
		questionListVal=function(isbind) {
1456
			var aimId="proQ",newStr="用户尚未发布任何问题"
1457
	        oAjax("/ajax/question/my",{
1458
				"uid":professorId,
1459
				"time":dataO.QuTime,
1460
                "id":dataO.QuId,
1461
                "rows":rows,
1462
			}, "get", function(res){
1463
				var $info = res.data;
1464
				if($info.length > 0) {
1465
					$("#"+aimId).show()
1466
					dataO.QuTime = $info[$info.length - 1].createTime;
1467
					dataO.QuId = $info[$info.length - 1].id;
1468
			
1469
					for(var i = 0; i < $info.length; i++) {
1470
						var listLi = $('<li class="mui-table-view-cell">').appendTo($("#proQ"));
1471
                        detailQuestion($info[i], listLi);
1472
                        if(isbind && i==0){
1473
                            $("#"+aimId).html();
1474
                        }
1486 1475
					}
1487
					var userType = autho(data.data.authType, data.data.orgAuth, data.data.authStatus);
1488
					$itemlist.find(".authiconNew").attr("title", userType.title);
1489
					$itemlist.find(".authiconNew").addClass(userType.sty);
1490 1476
				}
1491
			},
1492
			"error":function(){
1493
				$.MsgBox.Alert('提示','链接服务器超时')
1494
			}
1495
		});
1496
	}
1497
	//相关文章信息
1498
	function relevantarticalList(){
1499
		$.ajax({
1500
			"url" : "/ajax/article/byAssProfessor",
1501
			"type" :  "GET" ,
1502
			"dataType" : "json",
1503
			"data" :{"id":professorId},
1504
			"traditional": true, //传数组必须加这个
1505
			"success" : function(data) {
1506
				console.log(data);
1507
				if (data.success && data.data!=""){
1477
				var liLen=document.getElementById(aimId).querySelectorAll("li").length;
1478
                removeNodata(aimId);
1479
                if($info.length == 0 && liLen == 0 ){
1480
                	$("#"+aimId).hide()
1481
                    insertNodata(aimId,newStr);
1482
                }
1483
                if(isbind){
1484
                	$("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
1485
					 	questionListVal(false)
1486
					})
1487
                }
1488
				if ($info.length < rows) {
1489
                    $("#"+aimId).parent().find(".js-load-more").unbind("click");
1490
                    $("#"+aimId).parent().find(".js-load-more").hide();
1491
                }
1492
			},function(){
1493
				$("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
1494
	       		$("#"+aimId).parent().find(".js-load-more").addClass("active");
1495
			},function(){
1496
				$("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
1497
	        	$("#"+aimId).parent().find(".js-load-more").removeClass("active");
1498
			})
1499
	    },
1500
		relevantarticalList=function(){//相关文章信息
1501
			oAjax("/ajax/article/byAssProfessor",{
1502
				"id":professorId
1503
			}, "get", function(data){
1504
				if(data.data.length>0){
1508 1505
					$("#relateArt").parents(".conBlock").removeClass("displayNone");
1509 1506
					var itemlist = '';
1510 1507
					$("#relateArt").html("");
1511 1508
					for(var i = 0; i < data.data.length; i++) {
1512
						var itemlist = '<li class="flexCenter"><a  target="_blank" href="/'+ pageUrl('a',data.data[i]) +'" class="urlgo">';
1509
						var itemlist = '<li class="flexCenter"><a target="_blank" href="/'+ pageUrl('a',data.data[i]) +'" class="urlgo">';
1513 1510
							itemlist += '<p class="h2Font ellipsisSty-2"><em class="circlePre"></em>'+data.data[i].articleTitle+'</p>';
1514 1511
							itemlist += '</a></li>';
1515 1512
							$itemlist = $(itemlist);
1516 1513
						$("#relateArt").append($itemlist);
1517 1514
					}
1518 1515
				}
1519
			},
1520
			"error":function(){
1521
				$.MsgBox.Alert('提示','链接服务器超时')
1522
			}
1523
		});
1524
	}
1525
	//感兴趣
1526
	function likeExperts(){
1527
		$.ajax({
1528
			"url": "/ajax/professor/ralateProfessors",
1529
			"type": "get",
1530
			"dataType" : "json",
1531
			"data" :{"professorId":professorId},
1532
			"success": function(data) {
1533
				if(data.success && data.data) {
1534
					console.log(data)
1516
			});
1517
		},
1518
		likeExperts=function(){//感兴趣的企业
1519
			oAjax("/ajax/professor/ralateProfessors",{
1520
				"professorId":professorId
1521
			}, "get", function(data){
1535 1522
					var lengthT;
1536 1523
					if(data.data.length>5){
1537 1524
						lengthT=5;
@ -1540,719 +1527,897 @@ $(function() {
1540 1527
					}
1541 1528
					for(var i = 0; i < lengthT; i++) {
1542 1529
						var ExpId = data.data[i].id;
1543
						likeExpertsList(ExpId);
1530
						(function(Id){
1531
							oAjax("/ajax/professor/info/"+Id,{}, "get", function(data){
1532
								$("#likePro").parents(".conBlock").removeClass("displayNone");
1533
								var itemlist = '<li class="flexCenter"><a  target="_blank" href="" class="urlgo">';
1534
									itemlist += '<div class="madiaHead useHead" id="userimg"></div>';
1535
									itemlist += '<div class="madiaInfo">';
1536
									itemlist += '<p><span class="h1Font" id="userName"></span><em class="authiconNew" title=""></em></p>';
1537
									itemlist += '<p class="ellipsisSty h2Font" id="usertitle"></p>';
1538
									itemlist += '</div></a></li>';
1539
								$itemlist = $(itemlist);
1540
								$("#likePro").append($itemlist);
1541
								if(data.data.title) {
1542
									if(data.data.orgName) {
1543
										$itemlist.find("#usertitle").text(data.data.title +","+ data.data.orgName);
1544
									}else{
1545
										$itemlist.find("#usertitle").text(data.data.title);
1546
									}
1547
								}else{
1548
									if(data.data.office) {
1549
										if(data.data.orgName) {
1550
											$itemlist.find("#usertitle").text(data.data.office +","+ data.data.orgName);
1551
										}else{
1552
											$itemlist.find("#usertitle").text(data.data.office);
1553
										}
1554
									}else{
1555
										if(data.data.orgName) {
1556
											$itemlist.find("#usertitle").text(data.data.orgName);
1557
										}
1558
									}
1559
								}
1560
								$itemlist.find("#userName").text(data.data.name);
1561
								$itemlist.find(".urlgo").attr("href", "userInforShow.html?professorId="+data.data.id);
1562
								
1563
								if(data.data.hasHeadImage == 1) {
1564
									$itemlist.find("#userimg").attr("style", "background-image: url(/images/head/" + data.data.id + "_l.jpg);");
1565
								}
1566
								var userType = autho(data.data.authType, data.data.orgAuth, data.data.authStatus);
1567
								$itemlist.find(".authiconNew").attr("title", userType.title);
1568
								$itemlist.find(".authiconNew").addClass(userType.sty);
1569
							})
1570
						})(ExpId)
1544 1571
					}
1545
					
1546
				}
1547
			},
1548
			"error": function() {
1549
				$.MsgBox.Alert('提示', '链接服务器超时')
1550
			}
1551
		});
1552
	}
1553
	//感兴趣专家
1554
	function likeExpertsList(ExpId){
1555
		$.ajax({
1556
			"url" : "/ajax/professor/info/"+ExpId,
1557
			"type" :  "GET" ,
1558
			"dataType" : "json",
1559
			"success" : function(data) {
1560
				if (data.success && data.data!=""){
1561
					console.log(data)
1562
					$("#likePro").parents(".conBlock").removeClass("displayNone");
1563
					var itemlist = '<li class="flexCenter"><a  target="_blank" href="" class="urlgo">';
1564
						itemlist += '<div class="madiaHead useHead" id="userimg"></div>';
1565
						itemlist += '<div class="madiaInfo">';
1566
						itemlist += '<p><span class="h1Font" id="userName"></span><em class="authiconNew" title=""></em></p>';
1567
						itemlist += '<p class="ellipsisSty h2Font" id="usertitle"></p>';
1568
						itemlist += '</div></a></li>';
1569
					$itemlist = $(itemlist);
1570
					$("#likePro").append($itemlist);
1571
					if(data.data.title) {
1572
						if(data.data.orgName) {
1573
							$itemlist.find("#usertitle").text(data.data.title +","+ data.data.orgName);
1574
						}else{
1575
							$itemlist.find("#usertitle").text(data.data.title);
1576
						}
1572
			});
1573
		},
1574
		relevantExperts=function(){
1575
			oAjax("/ajax/professor/coadjutant",{
1576
				"id":professorId
1577
			}, "get", function(data){
1578
					var lengthT;
1579
					if(data.data.length>5){
1580
						lengthT=5;
1577 1581
					}else{
1578
						if(data.data.office) {
1579
							if(data.data.orgName) {
1580
								$itemlist.find("#usertitle").text(data.data.office +","+ data.data.orgName);
1581
							}else{
1582
								$itemlist.find("#usertitle").text(data.data.office);
1583
							}
1584
						}else{
1585
							if(data.data.orgName) {
1586
								$itemlist.find("#usertitle").text(data.data.orgName);
1587
							}
1588
						}
1582
						lengthT=data.data.length
1589 1583
					}
1590
					$itemlist.find("#userName").text(data.data.name);
1591
					$itemlist.find(".urlgo").attr("href", "userInforShow.html?professorId="+data.data.id);
1592
					
1593
					if(data.data.hasHeadImage == 1) {
1594
						$itemlist.find("#userimg").attr("style", "background-image: url(/images/head/" + data.data.id + "_l.jpg);");
1584
					for(var i = 0; i < lengthT; i++) {
1585
						var ExpId = data.data[i].id;
1586
						(function(Id){
1587
							oAjax("/ajax/professor/info/"+Id,{}, "get", function(data){
1588
								$("#relatePro").parents(".conBlock").removeClass("displayNone");
1589
								var itemlist = '<a  target="_blank" href="" class="urlgo">';
1590
									itemlist += '<div class="madiaHead useHead" id="userimg"></div>';
1591
									itemlist += '<div class="madiaInfo">';
1592
									itemlist += '<p><span class="h1Font" id="userName"></span><em class="authiconNew" title=""></em></p>';
1593
									itemlist += '<p class="ellipsisSty h2Font" id="usertitle"></p>';
1594
									itemlist += '<p class="h2Font ellipsisSty" id="copNum"></p>';
1595
									itemlist += '</div></a>';
1596
								$(itemlist).appendTo(liItem);
1597
							    var $itemlist =liItem;
1598
								if(numL){
1599
									if(numZ){
1600
										$itemlist.find("#copNum").text("合作:"+numZ+"项专利,"+numL+"篇论文")
1601
									}else{
1602
										$itemlist.find("#copNum").text("合作:"+numL+"篇论文")
1603
									}
1604
								}else{
1605
									if(numZ){
1606
										$itemlist.find("#copNum").text("合作:"+numZ+"项专利")
1607
									}else{
1608
										
1609
									}
1610
								}
1611
								if(data.data.title) {
1612
									if(data.data.orgName) {
1613
										$itemlist.find("#usertitle").text(data.data.title +","+ data.data.orgName);
1614
									}else{
1615
										$itemlist.find("#usertitle").text(data.data.title);
1616
									}
1617
								}else{
1618
									if(data.data.office) {
1619
										if(data.data.orgName) {
1620
											$itemlist.find("#usertitle").text(data.data.office +","+ data.data.orgName);
1621
										}else{
1622
											$itemlist.find("#usertitle").text(data.data.office);
1623
										}
1624
									}else{
1625
										if(data.data.orgName) {
1626
											$itemlist.find("#usertitle").text(data.data.orgName);
1627
										}
1628
									}
1629
								}
1630
								$itemlist.find("#userName").text(data.data.name);
1631
								
1632
								$itemlist.find(".urlgo").attr("href", "userInforShow.html?professorId="+data.data.id);
1633
								
1634
								if(data.data.hasHeadImage == 1) {
1635
									$itemlist.find("#userimg").attr("style", "background-image: url(/images/head/" + data.data.id + "_l.jpg);");
1636
								}
1637
								var userType = autho(data.data.authType, data.data.orgAuth, data.data.authStatus);
1638
								$itemlist.find(".authiconNew").attr("title", userType.title);
1639
								$itemlist.find(".authiconNew").addClass(userType.sty);
1640
							})
1641
						})(ExpId)
1595 1642
					}
1596
					var userType = autho(data.data.authType, data.data.orgAuth, data.data.authStatus);
1597
					$itemlist.find(".authiconNew").attr("title", userType.title);
1598
					$itemlist.find(".authiconNew").addClass(userType.sty);
1599
				}
1600
			},
1601
			"error":function(){
1602
				$.MsgBox.Alert('提示','链接服务器超时')
1603
			}
1604
		});
1605
	}
1606
	
1607
	//获取需求
1608
	function getDemands(pageNo,isbind) {
1609
		$.ajax({
1610
			url: "/ajax/demand/pq",
1611
			type: "GET",
1612
			timeout: 10000,
1613
			dataType: "json",
1614
			data: {
1615
				"state":'1',
1616
				"uid":professorId,
1617
				"pageNo": pageNo,
1618
				"pageSize":5
1619
			},
1620
			beforeSend: function() {
1621
				$("#showDemand").append('<img src="../images/loading.gif" class="loading" />');
1622
			},
1623
			success: function(data) {
1624
				if(data.success) {
1625
					$("#showDemand").html(" ");
1626
					var $info = data.data.data;
1627
					if($info.length > 0){
1628
						$("#showDemand").parents(".needinfobox").removeClass("displayNone");
1629
						$("#item1user>.nodatabox").addClass("displayNone");
1630
						for(var i = 0; i < $info.length; i++) {
1631
							var liStr=$("<li></li>").appendTo("#showDemand");
1632
							demandHtml($info[i],liStr);
1643
			});
1644
		},
1645
		isActUser=function(){
1646
			oAjax("/ajax/baseUserInfo",{
1647
				"id": professorId
1648
			}, "get", function(data){
1649
				if(!data.data.activeTime){
1650
					$(".last_meg").removeClass("displayNone");
1651
					$(".message_b").on("click",function(){
1652
						$(".meg_md5").toggle();
1653
						if(data.data.email && data.data.mobilePhone){
1654
						 	$("#wayTel").text('尾号为 '+data.data.mobilePhone+' 的手机号或邮箱 '+data.data.email);
1655
						}else if(data.data.mobilePhone && !data.data.email){
1656
							$("#wayTel").text('尾号为 '+data.data.mobilePhone+' 的手机号');
1657
						}else if(data.data.email && !data.data.mobilePhone){
1658
							$("#wayTel").text('邮箱 '+data.data.email);
1633 1659
						}
1634
					}else{
1635
						$("#showDemand").parents(".needinfobox").addClass("displayNone");
1636
					}
1660
					})
1661
				}else{
1662
					$(".last_meg").addClass("displayNone");
1637 1663
				}
1638
				$(".loading").remove();
1639
			},
1640
			error: function() {
1641
				$.MsgBox.Alert('提示', '链接服务器超时')
1642
			}
1643
		})
1644
	}
1645
	function demandHtml(dataStr,liStr) {
1646
		var sowU="";
1647
		if(dataStr.pageViews!=0){
1648
			sowU='<li><span>浏览量 '+dataStr.pageViews +'</span></li>'
1649
		}
1650
		var strCon='';
1651
			strCon+='<a class="" target="_blank" href="demandShow.html?demandId='+dataStr.id+'" class="madiaInfo">'
1652
			strCon+='<p class="h1Font ellipsisSty">'+ dataStr.title +'</p>'
1653
			strCon+='<ul class="showliTop h3Font clearfix">'
1654
			strCon+='<li><span>发布于 '+commenTime(dataStr.createTime)+'</span></li>'
1655
			strCon+= sowU
1656
			strCon+='</ul>'
1657
			strCon+='<p class="h2Font ellipsisSty-2">'+dataStr.descp+'</p>'
1658
			strCon+='<ul class="showli clearfix h3Font">'
1659
			
1660
			if(dataStr.city){ strCon+='<li>所在城市:'+dataStr.city+'</li>' }
1661
			if(dataStr.duration!=0){ strCon+='<li>预期时长:'+demandDuration[dataStr.duration]+'</li>' }
1662
			if(dataStr.cost!=0){ strCon+='<li>费用预算:'+demandCost[dataStr.cost]+'</li>' }
1663
			if(dataStr.invalidDay){ strCon+='<li>有效期至:'+TimeTr(dataStr.invalidDay)+'</li>' }
1664
			})
1665
		},
1666
		queryPubCount=function(){
1667
			oAjax("/ajax/watch/countProfessor",{//关注我的
1668
				"id": professorId,
1669
				"type":"1"
1670
			}, "GET", function(data){
1671
				$("#focusMe").text(data.data);
1672
			});
1673
			oAjax("/ajax/watch/countObject",{//我关注的
1674
				"id": professorId,
1675
				"type":"1"
1676
			}, "GET", function(data){
1677
				$("#myFocus").text(data.data);
1678
			});
1679
			oAjax("/ajax/professor/agree/sum",{//总获赞
1680
				"id": professorId,
1681
			}, "GET", function(data){
1682
				$("#agreeMecount").text(data.data);
1683
			});
1664 1684
			
1665
			strCon+='</ul>'
1666
			strCon+='</a>'
1667
		$(strCon).appendTo(liStr);	
1668
	}
1669
	
1670
	//收藏与关注
1671
	function attentMy(){
1672
		var num=watchType;
1673
		$.ajax({
1674
			url: "/ajax/watch/qaWatch",
1675
			dataType: 'json', //数据格式类型
1676
			type: 'GET', //http请求类型
1677
			data: {
1685
			oAjax("/ajax/article/count/publish",{//文章总数
1686
				"owner": professorId,
1687
				"category":"1"
1688
			}, "GET", function(data){
1689
				if(data.data>0){
1690
					$("#artCount").text(data.data);
1691
				}
1692
				if(data.data>0 && data.data>99){
1693
					$("#artCount").text("99+");
1694
				}
1695
			});
1696
			oAjax("/ajax/resource/count/publish",{//资源总数
1697
				"owner": professorId,
1698
				"category":"1"
1699
			}, "GET", function(data){
1700
				if(data.data>0){
1701
					$("#resCount").text(data.data);
1702
				}
1703
				if(data.data>0 && data.data>99){
1704
					$("#resCount").text("99+");
1705
				}
1706
			});
1707
			oAjax("/ajax/ware/count/publish",{//服务总数
1708
				"owner": professorId,
1709
				"category":"1"
1710
			}, "GET", function(data){
1711
				if(data.data>0){
1712
					$("#serCount").text(data.data);
1713
				}
1714
				if(data.data>0 && data.data>99){
1715
					$("#serCount").text("99+");
1716
				}
1717
			});
1718
			oAjax("/ajax/ppatent/count/publish",{//专利总数
1719
				"owner": professorId,
1720
			}, "GET", function(data){
1721
				if(data.data>0){
1722
					$("#patCount").text(data.data);
1723
				}
1724
				if(data.data>0 && data.data>99){
1725
					$("#patCount").text("99+");
1726
				}
1727
			});
1728
			oAjax("/ajax/ppaper/count/publish",{//论文总数
1729
				"owner": professorId,
1730
			}, "GET", function(data){
1731
				if(data.data>0){
1732
					$("#parCount").text(data.data);
1733
				}
1734
				if(data.data>0 && data.data>99){
1735
					$("#parCount").text("99+");
1736
				}
1737
			});
1738
		},
1739
		attentMyself=function(isbind){
1740
			var aimId="attendMy",newStr="用户尚未被任何人关注"
1741
			oAjax("/ajax/watch/watchList",{//关注我的列表
1678 1742
				"watchObject": professorId,
1679
			},
1680
			timeout: 10000, //超时设置
1681
			success: function(data) {
1682
				if(data.success) {
1683
					document.getElementById("attendMy").innerHTML="";
1684
					document.getElementById("attendMy").parentNode.querySelector(".nodatabox").classList.add("displayNone");
1685
					if(data.data.length>0){
1686
						var datalist = data.data;
1687
						for(var i = 0; i < datalist.length; i++) {
1688
							var liItem = document.createElement("li");
1689
							liItem.className="mui-table-view-cell";
1690
							document.getElementById("attendMy").appendChild(liItem);
1691
							detailPro(datalist[i],liItem);
1692
						}
1693
					}else{
1694
						document.getElementById("attendMy").parentNode.querySelector(".nodatabox").classList.remove("displayNone");
1743
				"createTime": watchO.beiTime,
1744
				"professorId":watchO.beiProId,
1745
				"rows":rows
1746
			}, "GET", function(res){
1747
				var $info = res.data;
1748
				if($info.length > 0) {
1749
					$("#"+aimId).show()
1750
					watchO.beiTime = $info[$info.length - 1].createTime;
1751
					watchO.beiProId = $info[$info.length - 1].professorId;
1752
					
1753
					for(var i = 0; i < $info.length; i++) {
1754
						var liItem = document.createElement("li");
1755
						document.getElementById("attendMy").appendChild(liItem);
1756
						detailPro($info[i].professorId,liItem);
1695 1757
					}
1696 1758
				}
1697
			},
1698
			error: function() {
1699
				return;
1700
			}
1701
		});
1702
	}
1703
	function collAttent(pageNo,isbind,num){
1704
		if(!num){
1705
			var num=watchType;
1706
		}
1707
		$.ajax({
1708
			url: "/ajax/watch/qaPro",
1709
			dataType: 'json', //数据格式类型
1710
			type: 'GET', //http请求类型
1711
			data: {
1759
				var liLen=document.getElementById(aimId).querySelectorAll("li").length;
1760
                removeNodata(aimId);
1761
                if($info.length == 0 && liLen == 0 ){
1762
                	$("#"+aimId).hide()
1763
                    insertNodata(aimId,newStr);
1764
                }
1765
                if(isbind){
1766
                	$("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
1767
					 	attentMyself(false)
1768
					})
1769
                }
1770
				if ($info.length < rows) {
1771
                    $("#"+aimId).parent().find(".js-load-more").unbind("click");
1772
                    $("#"+aimId).parent().find(".js-load-more").hide();
1773
                }
1774
			},function(){
1775
				$("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
1776
	       		$("#"+aimId).parent().find(".js-load-more").addClass("active");
1777
			},function(){
1778
				$("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
1779
	        	$("#"+aimId).parent().find(".js-load-more").removeClass("active");
1780
			})
1781
		},
1782
		collectSorts=function(type,isbind){
1783
			//var aimId="attendMy",newStr="用户尚未被任何人关注"
1784
			oAjax("/ajax/watch/proList",{//我关注的列表
1712 1785
				"professorId": professorId,
1713
				"watchType": num,
1714
				"pageNo": pageNo,
1715
				"pageSize":pageSize
1716
			},
1717
            beforeSend: function() {
1718
                $("#item8user").find(".js-load-more").attr("disabled",true);
1719
                $("#item8user").find(".js-load-more").addClass("active");
1720
            },
1721
            complete:function () {
1722
                $("#item8user").find(".js-load-more").removeAttr("disabled");
1723
                $("#item8user").find(".js-load-more").removeClass("active");
1724
            },
1725
			timeout: 10000, //超时设置
1726
			success: function(data) {
1727
				console.log(data)
1728
				var tcdPage;
1729
				if(data.success && data.data.data != "") {
1730
					var datalist = data.data.data;
1731
					if(num==1){
1732
						// document.getElementById("attendPro").innerHTML="";
1733
						for(var i = 0; i < datalist.length; i++) {
1734
							var liItem = document.createElement("li");
1735
							liItem.className="mui-table-view-cell";
1736
							document.getElementById("attendPro").appendChild(liItem);
1737
							detailPro(datalist[i],liItem);
1738
						}
1739
					}else if(num==2){
1740
						detailRes(datalist);
1741
					}else if(num==3){
1742
						detailArt(datalist);
1743
					}else if(num==4){
1744
						detailPat(datalist);
1745
					}else if(num==5){
1746
						detailPer(datalist);
1747
					}else if(num==6){
1748
						detailCmp(datalist);
1749
					}else if(num==7){
1750
						detailDemand(datalist);
1786
				"watchType":type,
1787
				"createTime": watchO.watchTime,
1788
				"watchObject":watchO.watchObjId,
1789
				"rows":rows
1790
			}, "GET", function(reses){
1791
				var $info = res.data;
1792
				if($info.length > 0) {
1793
					$("#"+aimId).show()
1794
					watchO.watchTime = $info[$info.length - 1].createTime;
1795
					watchO.watchObjId = $info[$info.length - 1].watchObject;
1796
					
1797
					for(var i = 0; i < $info.length; i++) {
1798
						var liItem = document.createElement("li");
1799
						document.getElementById("attendMy").appendChild(liItem);
1800
						detailPro($info[i].professorId,liItem);
1751 1801
					}
1752
					if(isbind){
1753
                        $("#item8user").append('<button class="js-load-more"></button>');
1754
                        $("#item8user").find(".js-load-more").on("click", function () {
1755
                            collAttent(++pageNo,false,num);
1756
                        });
1802
				}
1803
				var liLen=document.getElementById(aimId).querySelectorAll("li").length;
1804
                removeNodata(aimId);
1805
                if($info.length == 0 && liLen == 0 ){
1806
                	$("#"+aimId).hide()
1807
                    insertNodata(aimId,newStr);
1808
                }
1809
                if(isbind){
1810
                	$("#"+aimId).parent().find(".js-load-more").unbind("click").on("click",function(){
1811
					 	attentMyself(false)
1812
					})
1813
                }
1814
				if ($info.length < rows) {
1815
                    $("#"+aimId).parent().find(".js-load-more").unbind("click");
1816
                    $("#"+aimId).parent().find(".js-load-more").hide();
1817
                }
1818
			},function(){
1819
				$("#"+aimId).parent().find(".js-load-more").attr("disabled",true);
1820
	       		$("#"+aimId).parent().find(".js-load-more").addClass("active");
1821
			},function(){
1822
				$("#"+aimId).parent().find(".js-load-more").removeAttr("disabled");
1823
	        	$("#"+aimId).parent().find(".js-load-more").removeClass("active");
1824
			})
1825
		},
1826
		detailPro=function(pid,liItem) {
1827
			oAjax("/ajax/professor/baseInfo/" + pid,{},"get",function(data){
1828
				var datalist=data.data;
1829
				var userType = autho(datalist.authType, datalist.orgAuth, datalist.authStatus);
1830
				var os = "";
1831
				if(datalist.title) {
1832
					if(datalist.orgName) {
1833
						os = datalist.title + "," + datalist.orgName;
1834
					} else {
1835
						os = datalist.title;
1757 1836
					}
1758
                    if (pageNo >= Math.ceil(data.data.total / pageSize)) {
1759
                        $("#item8user").find(".js-load-more").unbind("click");
1760
                        $("#item8user").find(".js-load-more").hide();
1761
                    }
1762
				}else{
1763
					if(num==1){
1764
						document.getElementById("attendPro").parentNode.querySelector(".nodatabox").classList.remove("displayNone");
1765
						if(isbind) {
1766
                            $("#attendPro").parent().find(".js-load-more").hide()
1767
                        }
1768
					}else if(num==2){
1769
						document.getElementById("attendRes").parentNode.querySelector(".nodatabox").classList.remove("displayNone");
1770
						if(isbind) {
1771
                            $("#attendRes").parent().find(".js-load-more").hide()
1772
                        }
1773
					}else if(num==3){
1774
						document.getElementById("attendArt").parentNode.querySelector(".nodatabox").classList.remove("displayNone");
1775
						if(isbind) {
1776
                            $("#attendArt").parent().find(".js-load-more").hide()
1777
                        }
1778
					}else if(num==4){
1779
						document.getElementById("attendPatent").parentNode.querySelector(".nodatabox").classList.remove("displayNone");
1780
						if(isbind) {
1781
                            $("#attendPatent").parent().find(".js-load-more").hide()
1782
                        }
1783
					}else if(num==5){
1784
						document.getElementById("attendPaper").parentNode.querySelector(".nodatabox").classList.remove("displayNone");
1785
						if(isbind) {
1786
                            $("#attendPaper").parent().find(".js-load-more").hide()
1787
                        }
1788
					}else if(num==6){
1789
						document.getElementById("attendCmp").parentNode.querySelector(".nodatabox").classList.remove("displayNone");
1790
						if(isbind) {
1791
                            $("#attendCmp").parent().find(".js-load-more").hide()
1792
                        }
1793
					}else if(num==7){
1794
						document.getElementById("attendDemand").parentNode.querySelector(".nodatabox").classList.remove("displayNone");
1795
						if(isbind) {
1796
                            $("#attendDemand").parent().find(".js-load-more").hide()
1797
                        }
1837
				} else {
1838
					if(datalist.office) {
1839
						if(datalist.orgName) {
1840
							os = datalist.office + "," + datalist.orgName;
1841
						} else {
1842
							os = datalist.office;
1843
						}
1844
					} else {
1845
						if(datalist.orgName) {
1846
							os = datalist.orgName;
1847
						}
1798 1848
					}
1799 1849
				}
1800
			},
1801
			error: function() {
1802
				return;
1803
			}
1804
		});
1805
	}
1806
	function detailPro(datalist,liItem) {
1807
		var userType = autho(datalist.professor.authType, datalist.professor.orgAuth, datalist.professor.authStatus);
1808
		var os = "";
1809
		if(datalist.professor.title) {
1810
			if(datalist.professor.orgName) {
1811
				os = datalist.professor.title + "," + datalist.professor.orgName;
1812
			} else {
1813
				os = datalist.professor.title;
1814
			}
1815
		} else {
1816
			if(datalist.professor.office) {
1817
				if(datalist.professor.orgName) {
1818
					os = datalist.professor.office + "," + datalist.professor.orgName;
1819
				} else {
1820
					os = datalist.professor.office;
1850
				var baImg = "../images/default-photo.jpg";
1851
				if(datalist.hasHeadImage == 1) {
1852
					baImg = "/images/head/" + datalist.id + "_l.jpg";
1821 1853
				}
1822
			} else {
1823
				if(datalist.professor.orgName) {
1824
					os = datalist.professor.orgName;
1854
				var strAdd = '';
1855
					strAdd += '<a target="_blank" href="userInforShow.html?professorId='+ datalist.id +'" class="flexCenter urlgo">';
1856
					strAdd += '<div class="madiaHead useHead" style="width: 80px;height: 80px;margin-top: -40px;background-image:url(' + baImg + ')"></div>';
1857
					strAdd += '<div class="madiaInfo" style="padding-left:92px"><p class="h1Font ellipsisSty">' + datalist.name + '</span><em class="authicon ' + userType.sty + '" title="'+userType.title+'"></em></p>';
1858
					strAdd += '<p class="h2Font ellipsisSty">' + os + '</p>';
1859
					strAdd += '</div>';
1860
					strAdd += '</a>';
1861
				liItem.innerHTML = strAdd
1862
			})
1863
		},
1864
		detailCmp=function(datalist) {
1865
			var arr=[];
1866
			for(var i in datalist) {
1867
				arr[i]=datalist[i].watchObject;
1868
			}
1869
			oAjax("/ajax/org/qm",{
1870
				id:arr,
1871
			},"get",function(data){
1872
				var dataStr=data.data;
1873
				for(var i = 0; i < dataStr.length; i++) {
1874
					var li = document.createElement("li");
1875
					li.setAttribute("data-id", dataStr[i].id);
1876
					var oimg = (dataStr[i].hasOrgLogo) ?"/images/org/" + dataStr[i].id + ".jpg" : "../images/default-icon.jpg";
1877
					var oAuth = (dataStr[i].authStatus == 3) ? 'authicon-com-ok' : '';
1878
					var orgName = (dataStr[i].forShort) ? dataStr[i].forShort : dataStr[i].name;
1879
					var orgType = (dataStr[i].orgType == '2') ? "上市企业" : "";
1880
					var orgOther = (dataStr[i].industry) ? dataStr[i].industry.replace(/,/gi, " | ") : "";
1881
					li.className = "mui-table-view-cell";
1882
					var itemlist=''
1883
						itemlist += '<a class="flexCenter" target="_blank" href="cmpInforShow.html?orgId='+dataStr[i].id+'"><div class="madiaHead cmpHead">';
1884
						itemlist += '<div class="boxBlock"><img class="boxBlockimg" src="' + oimg + '"></div></div>';
1885
						itemlist += '<div class="madiaInfo">';
1886
						itemlist += '<p class="h1Font"><span>' + orgName + '</span><em class="authiconNew ' + oAuth + '" title="科袖认证企业"></em></p>';
1887
	            		itemlist += '<p class="h2Font ellipsisSty"><span>' + orgType + '</span> <span>' + orgOther + '</span></p>';
1888
						itemlist += '</div></a>';
1889
					li.innerHTML = itemlist
1890
					document.getElementById("attendCmp").appendChild(li);
1825 1891
				}
1892
			});
1893
		},
1894
		detailPat=function(datalist) {
1895
			if(datalist.length<0){
1896
				$("#attendPatent + .nodatabox").removeClass("displayNone");
1897
				return;
1826 1898
			}
1827
		}
1828
		var baImg = "../images/default-photo.jpg";
1829
		if(datalist.professor.hasHeadImage == 1) {
1830
			baImg = "/images/head/" + datalist.professor.id + "_l.jpg";
1831
		}
1832
		var strAdd = '';
1833
			strAdd += '<a target="_blank" href="userInforShow.html?professorId='+ datalist.professor.id +'" class="flexCenter urlgo">';
1834
			strAdd += '<div class="madiaHead useHead" style="width: 80px;height: 80px;margin-top: -40px;background-image:url(' + baImg + ')"></div>';
1835
			strAdd += '<div class="madiaInfo" style="padding-left:92px"><p class="h1Font ellipsisSty">' + datalist.professor.name + '</span><em class="authiconNew ' + userType.sty + '" title="科袖认证专家"></em></p>';
1836
			strAdd += '<p class="h2Font ellipsisSty">' + os + '</p>';
1837
			strAdd += '</div>';
1838
			strAdd += '</a>';
1839
		liItem.innerHTML = strAdd
1840
	}
1841
	function detailCmp(datalist) {
1842
		// document.getElementById("attendCmp").innerHTML="";
1843
		var arr=[];
1844
		for(var i in datalist) {
1845
			arr[i]=datalist[i].watchObject;
1846
		}
1847
		$.ajax({
1848
			url:"/ajax/org/qm",
1849
			data: {
1899
			var arr=[];
1900
			for(var i in datalist) {
1901
				arr[i]=datalist[i].watchObject;
1902
			}
1903
			oAjax("/ajax/ppatent/qm",{
1850 1904
				id:arr,
1851
			},
1852
			dataType: 'json', //数据格式类型
1853
			type: 'get', //http请求类型
1854
			traditional: true,
1855
			success: function(data) {
1856
				if(data.success && data.data != "") {
1857
					var dataStr=data.data;
1858
					for(var i = 0; i < dataStr.length; i++) {
1859
						var li = document.createElement("li");
1860
						li.setAttribute("data-id", dataStr[i].id);
1861
						var oimg = (dataStr[i].hasOrgLogo) ?"/images/org/" + dataStr[i].id + ".jpg" : "../images/default-icon.jpg";
1862
						var oAuth = (dataStr[i].authStatus == 3) ? 'authicon-com-ok' : '';
1863
						var orgName = (dataStr[i].forShort) ? dataStr[i].forShort : dataStr[i].name;
1864
						var orgType = (dataStr[i].orgType == '2') ? "上市企业" : "";
1865
						var orgOther = (dataStr[i].industry) ? dataStr[i].industry.replace(/,/gi, " | ") : "";
1866
						li.className = "mui-table-view-cell";
1867
						var itemlist=''
1868
							itemlist += '<a class="flexCenter" target="_blank" href="cmpInforShow.html?orgId='+dataStr[i].id+'"><div class="madiaHead cmpHead">';
1869
							itemlist += '<div class="boxBlock"><img class="boxBlockimg" src="' + oimg + '"></div></div>';
1870
							itemlist += '<div class="madiaInfo">';
1871
							itemlist += '<p class="h1Font"><span>' + orgName + '</span><em class="authiconNew ' + oAuth + '" title="科袖认证企业"></em></p>';
1872
	                		itemlist += '<p class="h2Font ellipsisSty"><span>' + orgType + '</span> <span>' + orgOther + '</span></p>';
1873
							itemlist += '</div></a>';
1874
						li.innerHTML = itemlist
1875
						document.getElementById("attendCmp").appendChild(li);
1876
					}
1905
			},"get",function(data){
1906
				var dataStr=data.data;
1907
				for(var i = 0; i < dataStr.length; i++) {
1908
					var li = document.createElement("li");
1909
					li.className = "mui-table-view-cell";
1910
					var strAdd = '';
1911
						strAdd += '<a  target="_blank" href="/'+ pageUrl("pt",dataStr[i]) +'" class="flexCenter urlgo">';
1912
						strAdd += '<div class="madiaHead patentHead"></div>';
1913
						strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty">'+ dataStr[i].name +'</p>';
1914
						strAdd += '<p class="h2Font ellipsisSty">发明人:'+ dataStr[i].authors.substring(0, dataStr[i].authors.length - 1) +'</p>';
1915
						strAdd += '<p class="h2Font ellipsisSty">申请人:'+ dataStr[i].reqPerson +'</p>';
1916
						strAdd += '</div>';
1917
						strAdd += '</a>';
1918
					li.innerHTML = strAdd
1919
					document.getElementById("attendPatent").appendChild(li);
1877 1920
				}
1878
			},
1879
			error:  function() {
1921
			});
1922
		},
1923
		detailPer=function(datalist) {
1924
			var arr=[];
1925
			for(var i in datalist) {
1926
				arr[i]=datalist[i].watchObject;
1880 1927
			}
1881
		});
1882
	}
1883
	function detailPat(datalist) {
1884
		// document.getElementById("attendPatent").innerHTML="";
1885
		if(datalist.length<0){
1886
			$("#attendPatent + .nodatabox").removeClass("displayNone");
1887
			return;
1888
		}
1889
		var arr=[];
1890
		for(var i in datalist) {
1891
			arr[i]=datalist[i].watchObject;
1892
		}
1893
		$.ajax({
1894
			url:"/ajax/ppatent/qm",
1895
			data: {
1928
			oAjax("/ajax/ppaper/qm",{
1896 1929
				id:arr,
1897
			},
1898
			dataType: 'json', //数据格式类型
1899
			type: 'get', //http请求类型
1900
			traditional: true,
1901
			success: function(data) {
1902
				if(data.success && data.data != "") {
1903
					var dataStr=data.data;
1904
					for(var i = 0; i < dataStr.length; i++) {
1905
						var li = document.createElement("li");
1906
						li.className = "mui-table-view-cell";
1907
						var strAdd = '';
1908
							strAdd += '<a  target="_blank" href="/'+ pageUrl("pt",dataStr[i]) +'" class="flexCenter urlgo">';
1909
							strAdd += '<div class="madiaHead patentHead"></div>';
1910
							strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty">'+ dataStr[i].name +'</p>';
1911
							strAdd += '<p class="h2Font ellipsisSty">发明人:'+ dataStr[i].authors.substring(0, dataStr[i].authors.length - 1) +'</p>';
1912
							strAdd += '<p class="h2Font ellipsisSty">申请人:'+ dataStr[i].reqPerson +'</p>';
1913
							strAdd += '</div>';
1914
							strAdd += '</a>';
1915
						li.innerHTML = strAdd
1916
						document.getElementById("attendPatent").appendChild(li);
1930
			},"get",function(data){
1931
				var dataStr=data.data;
1932
				for(var i = 0; i < dataStr.length; i++) {
1933
					var moreInf=""
1934
					if(!dataStr[i].cn4periodical){
1935
						dataStr[i].cn4periodical="";
1936
					}
1937
					if(!dataStr[i].en4periodical){
1938
						dataStr[i].en4periodical="";
1917 1939
					}
1940
					if(!dataStr[i].pubDay){
1941
						dataStr[i].pubDay="";
1942
					}
1943
					moreInf = dataStr[i].cn4periodical+ " " +dataStr[i].en4periodical+ " " +dataStr[i].pubDay
1944
					
1945
					var li = document.createElement("li");
1946
					li.className = "mui-table-view-cell";
1947
					var strAdd = '';
1948
						strAdd += '<a  target="_blank" href="/'+ pageUrl("pp",dataStr[i]) +'" class="flexCenter urlgo">';
1949
						strAdd += '<div class="madiaHead paperHead"></div>';
1950
						strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty">'+ dataStr[i].name +'</p>';
1951
						strAdd += '<p class="h2Font ellipsisSty">作者:'+ dataStr[i].authors.substring(0, dataStr[i].authors.length - 1) +'</p>';
1952
						strAdd += '<p class="h2Font ellipsisSty">期刊:'+ moreInf +'</p>';
1953
						strAdd += '</div>';
1954
						strAdd += '</a>';
1955
					li.innerHTML = strAdd
1956
					document.getElementById("attendPaper").appendChild(li);
1918 1957
				}
1919
			},
1920
			error:  function() {
1958
			});
1959
		},
1960
		detailRes=function(datalist) {
1961
			var arr=[];
1962
			for(var i in datalist) {
1963
				arr[i]=datalist[i].watchObject;
1921 1964
			}
1922
		});
1923
	}
1924
	function detailPer(datalist) {
1925
		// document.getElementById("attendPaper").innerHTML="";
1926
		var arr=[];
1927
		for(var i in datalist) {
1928
			arr[i]=datalist[i].watchObject;
1929
		}
1930
		$.ajax({
1931
			url:"/ajax/ppaper/qm",
1932
			data: {
1965
			oAjax("/ajax/resource/qm",{
1933 1966
				id:arr,
1934
			},
1935
			dataType: 'json', //数据格式类型
1936
			type: 'get', //http请求类型
1937
			traditional: true,
1938
			success: function(data) {
1939
				if(data.success && data.data != "") {
1940
					var dataStr=data.data;
1941
					for(var i = 0; i < dataStr.length; i++) {
1942
						var moreInf=""
1943
						if(!dataStr[i].cn4periodical){
1944
							dataStr[i].cn4periodical="";
1945
						}
1946
						if(!dataStr[i].en4periodical){
1947
							dataStr[i].en4periodical="";
1967
			},"get",function(data){
1968
				var dataItem=data.data;
1969
				for(var i = 0; i < dataItem.length; i++) {
1970
					var dataStr=dataItem[i]
1971
					var namepo, userType;
1972
					if(dataStr.resourceType == 1) {
1973
						namepo = dataStr.name;
1974
						userType = autho(dataStr.authType, dataStr.orgAuth, dataStr.authStatus);
1975
					} else {
1976
						if(dataStr.forShort){
1977
							namepo = dataStr.forShort;
1978
						}else{
1979
							namepo = dataStr.name;
1948 1980
						}
1949
						if(!dataStr[i].pubDay){
1950
							dataStr[i].pubDay="";
1981
						userType={}
1982
						if(dataStr.authStatus==3){
1983
							userType.sty="authicon-com-ok"
1984
							userType.title="科袖认证企业"
1951 1985
						}
1952
						moreInf = dataStr[i].cn4periodical+ " " +dataStr[i].en4periodical+ " " +dataStr[i].pubDay
1953
						
1954
						var li = document.createElement("li");
1955
						li.className = "mui-table-view-cell";
1956
						var strAdd = '';
1957
							strAdd += '<a  target="_blank" href="/'+ pageUrl("pp",dataStr[i]) +'" class="flexCenter urlgo">';
1958
							strAdd += '<div class="madiaHead paperHead"></div>';
1959
							strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty">'+ dataStr[i].name +'</p>';
1960
							strAdd += '<p class="h2Font ellipsisSty">作者:'+ dataStr[i].authors.substring(0, dataStr[i].authors.length - 1) +'</p>';
1961
							strAdd += '<p class="h2Font ellipsisSty">期刊:'+ moreInf +'</p>';
1962
							strAdd += '</div>';
1963
							strAdd += '</a>';
1964
						li.innerHTML = strAdd
1965
						document.getElementById("attendPaper").appendChild(li);
1966 1986
					}
1987
					var rImg = "../images/default-resource.jpg";
1988
					if(dataStr.images.length) {
1989
						rImg = "/data/resource/" + dataStr.images[0].imageSrc;
1990
					}
1991
					var li = document.createElement("li");
1992
					li.className = "mui-table-view-cell";
1993
					var strAdd = '';
1994
						strAdd += '<a target="_blank" href="resourceShow.html?resourceId='+ dataStr.resourceId +'" class="flexCenter urlgo">';
1995
						strAdd += '<div class="madiaHead resouseHead" style="background-image:url('+ rImg +')"></div>';
1996
						strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty">'+ dataStr.resourceName +'</p>';
1997
						strAdd += '<p class="h1Font ellipsisSty">'+ namepo +'<em class="authiconNew ' + userType.sty + '" title="'+userType.title+'"></em></p>';
1998
						strAdd += '<p class="h2Font ellipsisSty-2">用途:'+ dataStr.supportedServices+'</p></div>';
1999
						strAdd += '</a>';
2000
					li.innerHTML =strAdd
2001
					document.getElementById("attendRes").appendChild(li);
1967 2002
				}
1968
			},
1969
			error:  function() {
1970
			}
1971
		});
1972
	}
1973
	function detailRes(datalist) {
1974
		// document.getElementById("attendRes").innerHTML="";
1975
		for(var i = 0; i < datalist.length; i++) {
1976
			var dataStr = datalist[i].resource;
1977
			var namepo, userType;
1978
			if(dataStr.resourceType == 1) {
1979
				namepo = dataStr.editProfessor.name;
1980
				userType = autho(dataStr.editProfessor.authType, dataStr.editProfessor.orgAuth, dataStr.editProfessor.authStatus);
1981
			} else {
1982
				if(dataStr.organization.forShort){
1983
					namepo = dataStr.organization.forShort;
1984
				}else{
1985
					namepo = dataStr.organization.name;
1986
				}
1987
				userType={}
1988
				if(dataStr.organization.authStatus==3){
1989
					userType.sty="authicon-com-ok"
1990
					userType.title="科袖认证企业"
1991
				}
1992
			}
1993
			var rImg = "../images/default-resource.jpg";
1994
			if(dataStr.images.length) {
1995
				rImg = "/data/resource/" + dataStr.images[0].imageSrc;
1996
			}
1997
			var li = document.createElement("li");
1998
			li.className = "mui-table-view-cell";
1999
			var strAdd = '';
2000
				strAdd += '<a target="_blank" href="resourceShow.html?resourceId='+ dataStr.resourceId +'" class="flexCenter urlgo">';
2001
				strAdd += '<div class="madiaHead resouseHead" style="background-image:url('+ rImg +')"></div>';
2002
				strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty">'+ dataStr.resourceName +'</p>';
2003
				strAdd += '<p class="h1Font ellipsisSty">'+ namepo +'<em class="authiconNew ' + userType.sty + '" title="'+userType.title+'"></em></p>';
2004
				strAdd += '<p class="h2Font ellipsisSty-2">用途:'+ dataStr.supportedServices+'</p></div>';
2005
				strAdd += '</a>';
2006
			li.innerHTML =strAdd
2007
			document.getElementById("attendRes").appendChild(li);
2008
		}
2009
	}
2010
	function detailArt(datalist) {
2011
		// document.getElementById("attendArt").innerHTML="";
2012
		for(var i = 0; i < datalist.length; i++) {
2013
			var dataItem = datalist[i].article;
2014
			var arImg = "../images/default-artical.jpg";
2015
			if(dataItem.articleImg) {
2016
				arImg ="/data/article/" + dataItem.articleImg
2017
			}
2018
			var title = dataItem.articleTitle;
2019
			var name = ""
2020
			var li = document.createElement("li");
2021
			if( dataItem.articleType == 1) {
2022
				name = dataItem.professor.name;
2023
			} else {
2024
				if(dataItem.organization.forShort){
2025
					name = dataItem.organization.forShort;
2026
				}else{
2027
					name = dataItem.organization.name;
2028
				}
2003
			});
2004
		},
2005
		detailArt=function (datalist) {
2006
			var arr=[];
2007
			for(var i in datalist) {
2008
				arr[i]=datalist[i].watchObject;
2029 2009
			}
2030
			li.className = "mui-table-view-cell";
2031
			var strAdd = '';
2032
				strAdd += '<a  target="_blank" href="/'+ pageUrl('a',dataItem) +'" class="flexCenter urlgo">';
2033
				strAdd += '<div class="madiaHead artHead" style="background-image:url('+ arImg +')"></div>';
2034
				strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">'+ dataItem.articleTitle +'</p>';
2035
				strAdd += '<ul class="h2Font clearfix">';
2036
				strAdd += '<li><span>'+ name +'</span></li>';
2037
				strAdd += '<li><span class="time">'+ commenTime(dataItem.publishTime) +'</span></li>';
2038
				strAdd += '<li><span class="comment"></span></li>';
2039
				strAdd += '</ul></div>';
2040
				strAdd += '</a>';
2041
			li.innerHTML = strAdd
2042
			document.getElementById("attendArt").appendChild(li);
2043
2044
		}
2045
	}
2046
	function detailDemand(datalist) {
2047
		// document.getElementById("attendDemand").innerHTML="";
2048
		var arr=[];
2049
		for(var i in datalist) {
2050
			arr[i]=datalist[i].watchObject;
2051
		}
2052
		$.ajax({
2053
			url:"/ajax/demand/qm",
2054
			data: {
2010
			oAjax("/ajax/article/qm",{
2055 2011
				id:arr,
2056
			},
2057
			dataType: 'json', //数据格式类型
2058
			type: 'get', //http请求类型
2059
			traditional: true,
2060
			success: function(data) {
2061
				if(data.success && data.data != "") {
2062
					var dataStr=data.data;
2063
					for(var i = 0; i < dataStr.length; i++) {
2064
						var li = document.createElement("li");
2065
						li.className = "mui-table-view-cell";
2066
						var strCon='<a  target="_blank" href="demandShow.html?demandId='+ dataStr[i].id +'" class="flexCenter urlgo">';
2067
						strCon+='<div class="madiaInfo" style="padding-left:0">'
2068
						strCon+='<p class="h1Font ellipsisSty">'+ dataStr[i].title +'</p>'
2069
						strCon+='<ul class="showli clearfix h3Font">'
2070
						
2071
						if(dataStr[i].city){ strCon+='<li>'+dataStr[i].city+'</li>' }
2072
						if(dataStr[i].duration!=0){ strCon+='<li>预期 '+demandDuration[dataStr[i].duration]+'</li>' }
2073
						if(dataStr[i].cost!=0){ strCon+='<li>预算 '+demandCost[dataStr[i].cost]+'</li>' }
2074
						if(dataStr[i].invalidDay){ strCon+='<li>有效期至 '+TimeTr(dataStr[i].invalidDay)+'</li>' }
2075
						
2076
						strCon+='</ul></div></a>'
2077
						
2078
						li.innerHTML = strCon
2079
						document.getElementById("attendDemand").appendChild(li);
2012
			},"get",function(data){
2013
				var dataStr=data.data;
2014
				for(var i = 0; i < dataStr.length; i++) {
2015
					var dataItem=dataStr[i]
2016
					var arImg = "../images/default-artical.jpg";
2017
					if(dataItem.articleImg) {
2018
						arImg ="/data/article/" + dataItem.articleImg
2019
					}
2020
					var title = dataItem.articleTitle;
2021
					var name = ""
2022
					var li = document.createElement("li");
2023
					if( dataItem.articleType == 1) {
2024
						name = dataItem.professor.name;
2025
					} else {
2026
						if(dataItem.organization.forShort){
2027
							name = dataItem.organization.forShort;
2028
						}else{
2029
							name = dataItem.organization.name;
2030
						}
2080 2031
					}
2032
					li.className = "mui-table-view-cell";
2033
					var strAdd = '';
2034
						strAdd += '<a  target="_blank" href="/'+ pageUrl('a',dataItem) +'" class="flexCenter urlgo">';
2035
						strAdd += '<div class="madiaHead artHead" style="background-image:url('+ arImg +')"></div>';
2036
						strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">'+ dataItem.articleTitle +'</p>';
2037
						strAdd += '<ul class="h2Font clearfix">';
2038
						strAdd += '<li><span>'+ name +'</span></li>';
2039
						strAdd += '<li><span class="time">'+ commenTime(dataItem.publishTime) +'</span></li>';
2040
						strAdd += '<li><span class="comment"></span></li>';
2041
						strAdd += '</ul></div>';
2042
						strAdd += '</a>';
2043
					li.innerHTML = strAdd
2044
					document.getElementById("attendArt").appendChild(li);
2081 2045
				}
2082
			},
2083
			error:  function() {
2046
			});
2047
		},
2048
		detailDemand=function(datalist) {
2049
			var arr=[];
2050
			for(var i in datalist) {
2051
				arr[i]=datalist[i].watchObject;
2084 2052
			}
2085
		});
2086
	}
2087
2088
    function answer(dataStr,listLi){
2089
        var strAdd = '<a target="_blank" href="/qa-show.html?id='+dataStr.qid+'&topid='+dataStr.id+'">'+
2090
            '<div class="madiaInfo" style="padding-left: 0">' +
2091
            '<div class="ellipsisSty qa-question"></div>' +
2092
            '<div class="flexCenter qa-owner">' +
2093
            '</div>' +
2094
            '<div class="qa-con ellipsisSty-3">' + listConCut(dataStr.cnt) +'</div>' +
2095
            '<div class="showspan">' +
2096
            '<span>'+commenTime(dataStr.createTime)+'</span>' +
2097
            '<span class="agree"></span>' +
2098
            '<span class="leaveMsgCount"></span>' +
2099
            '</div>' +
2100
            '</div></a>';
2101
        var $strAdd = $(strAdd);
2102
        listLi.append( $strAdd);
2103
        if(dataStr.agree > 0) {
2104
            $strAdd.find(".agree").html("赞	"+dataStr.agree);
2105
        }
2106
        questioninfo(dataStr.qid, $strAdd);
2107
        proinfo(dataStr.uid, $strAdd);
2108
        leaveMsgCount(dataStr.id,4, $strAdd);
2109
    }
2110
    function question(dataStr,listLi) {
2111
        var baImg = "../images/default-q&a.jpg";
2112
        var subs = new Array();
2113
        if(dataStr.img) {
2114
        	var subs=strToAry(dataStr.img)
2115
            baImg = "/data/question"+ subs[0];
2116
        }
2117
        var hd = "";
2118
        if (dataStr.replyCount > 0) {
2119
            hd = '<li><span>回答 ' + dataStr.replyCount + '</span></li>'
2120
        }
2121
        var strAdd = '<a target="_blank" href="/qa-show.html?id='+dataStr.id+'" class="flexCenter urlgo">'
2122
        strAdd += '<div class="madiaHead qa-Head" style="background-image:url('+ baImg +')"></div>';
2123
        strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">'+ dataStr.title +'</p>';
2124
        strAdd += '<ul class="h2Font clearfix">'
2125
        strAdd += '<li><span class="time">'+commenTime(dataStr.createTime)+'</span></li><li><span class="qaPageview"></span></li>'+hd+'<li><span class="attendCount"></span></li>'
2126
        strAdd += '</ul></div></a>'
2127
2128
        var $str = $(strAdd);
2129
        listLi.append($str);
2130
        attendCount(dataStr.id, $str);
2131
        questioninfo(dataStr.id, $str);
2132
    }
2133
    function proinfo(pid, $str) {
2134
        $.ajax({
2135
            "url":"/ajax/professor/baseInfo/" + pid,
2136
            "type": "GET",
2137
            "dataType": "json",
2138
            "data": {},
2139
            "success": function(data) {
2140
                if(data.success) {
2141
                    var dataStr = data.data
2142
                    var baImg = "../images/default-photo.jpg";
2143
                    if (dataStr.hasHeadImage == 1) {
2144
                        baImg = "/images/head/" + dataStr.id + "_l.jpg";
2053
			oAjax("/ajax/demand/qm",{
2054
				id:arr,
2055
			},"get",function(data){
2056
				var dataStr=data.data;
2057
				for(var i = 0; i < dataStr.length; i++) {
2058
					var li = document.createElement("li");
2059
					li.className = "mui-table-view-cell";
2060
					var strCon='<a  target="_blank" href="demandShow.html?demandId='+ dataStr[i].id +'" class="flexCenter urlgo">';
2061
					strCon+='<div class="madiaInfo" style="padding-left:0">'
2062
					strCon+='<p class="h1Font ellipsisSty">'+ dataStr[i].title +'</p>'
2063
					strCon+='<ul class="showli clearfix h3Font">'
2064
					
2065
					if(dataStr[i].city){ strCon+='<li>'+dataStr[i].city+'</li>' }
2066
					if(dataStr[i].duration!=0){ strCon+='<li>预期 '+demandDuration[dataStr[i].duration]+'</li>' }
2067
					if(dataStr[i].cost!=0){ strCon+='<li>预算 '+demandCost[dataStr[i].cost]+'</li>' }
2068
					if(dataStr[i].invalidDay){ strCon+='<li>有效期至 '+TimeTr(dataStr[i].invalidDay)+'</li>' }
2069
					
2070
					strCon+='</ul></div></a>'
2071
					
2072
					li.innerHTML = strCon
2073
					document.getElementById("attendDemand").appendChild(li);
2074
				}
2075
				
2076
			});
2077
		},
2078
		detailAnswer=function(dataStr,listLi){
2079
	        var strAdd = '<a target="_blank" href="/qa-show.html?id='+dataStr.qid+'&topid='+dataStr.id+'">'+
2080
	            '<div class="madiaInfo" style="padding-left: 0">' +
2081
	            '<div class="ellipsisSty qa-question"></div>' +
2082
	            '<div class="flexCenter qa-owner">' +
2083
	            '</div>' +
2084
	            '<div class="qa-con ellipsisSty-3">' + listConCut(dataStr.cnt) +'</div>' +
2085
	            '<div class="showspan">' +
2086
	            '<span>'+commenTime(dataStr.createTime)+'</span>' +
2087
	            '<span class="agree"></span>' +
2088
	            '<span class="leaveMsgCount"></span>' +
2089
	            '</div>' +
2090
	            '</div></a>';
2091
	        var $strAdd = $(strAdd);
2092
	        listLi.append( $strAdd);
2093
	        if(dataStr.agree > 0) {
2094
	            $strAdd.find(".agree").html("赞	"+dataStr.agree);
2095
	        }
2096
	        questioninfo(dataStr.qid, $strAdd);
2097
	        proinfo(dataStr.uid, $strAdd);
2098
	        leaveMsgCount(dataStr.id,4, $strAdd);
2099
	    },
2100
		detailQuestion=function(dataStr,listLi) {
2101
	        var baImg = "../images/default-q&a.jpg";
2102
	        var subs = new Array();
2103
	        if(dataStr.img) {
2104
	        	var subs=strToAry(dataStr.img)
2105
	            baImg = "/data/question"+ subs[0];
2106
	        }
2107
	        var hd = "";
2108
	        if (dataStr.replyCount > 0) {
2109
	            hd = '<li><span>回答 ' + dataStr.replyCount + '</span></li>'
2110
	        }
2111
	        var strAdd = '<a target="_blank" href="/qa-show.html?id='+dataStr.id+'" class="flexCenter urlgo">'
2112
	        strAdd += '<div class="madiaHead qa-Head" style="background-image:url('+ baImg +')"></div>';
2113
	        strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">'+ dataStr.title +'</p>';
2114
	        strAdd += '<ul class="h2Font clearfix">'
2115
	        strAdd += '<li><span class="time">'+commenTime(dataStr.createTime)+'</span></li><li><span class="qaPageview"></span></li>'+hd+'<li><span class="attendCount"></span></li>'
2116
	        strAdd += '</ul></div></a>'
2117
	
2118
	        var $str = $(strAdd);
2119
	        listLi.append($str);
2120
	        attendCount(dataStr.id, $str);
2121
	        questioninfo(dataStr.id, $str);
2122
	   },
2123
		proinfo=function(pid, $str) {
2124
			oAjax("/ajax/professor/baseInfo/" + pid,{}, "get", function(data){
2125
                var dataStr = data.data
2126
                var baImg = "../images/default-photo.jpg";
2127
                if (dataStr.hasHeadImage == 1) {
2128
                    baImg = "/images/head/" + dataStr.id + "_l.jpg";
2129
                }
2130
                var userType = autho(dataStr.authType, dataStr.orgAuth, dataStr.authStatus);
2131
                var os = "";
2132
                if (dataStr.title) {
2133
                    if (dataStr.orgName) {
2134
                        os = dataStr.title + "," + dataStr.orgName;
2135
                    } else {
2136
                        os = dataStr.title;
2145 2137
                    }
2146
                    var userType = autho(dataStr.authType, dataStr.orgAuth, dataStr.authStatus);
2147
                    var os = "";
2148
                    if (dataStr.title) {
2138
                } else {
2139
                    if (dataStr.office) {
2149 2140
                        if (dataStr.orgName) {
2150
                            os = dataStr.title + "," + dataStr.orgName;
2141
                            os = dataStr.office + "," + dataStr.orgName;
2151 2142
                        } else {
2152
                            os = dataStr.title;
2143
                            os = dataStr.office;
2153 2144
                        }
2154 2145
                    } else {
2155
                        if (dataStr.office) {
2156
                            if (dataStr.orgName) {
2157
                                os = dataStr.office + "," + dataStr.orgName;
2158
                            } else {
2159
                                os = dataStr.office;
2160
                            }
2161
                        } else {
2162
                            if (dataStr.orgName) {
2163
                                os = dataStr.orgName;
2164
                            }
2146
                        if (dataStr.orgName) {
2147
                            os = dataStr.orgName;
2165 2148
                        }
2166 2149
                    }
2167
                    var str = '<div class="owner-head useHead" style="background-image:url(' + baImg + ')"></div>' +
2168
                        '<div class="owner-info">' +
2169
                        '<div class="owner-name"><span class="h1Font">' + dataStr.name + '</span><em class="authiconNew ' + userType.sty + '" title="' + userType.title + '"></em></div>' +
2170
                        '<div class="owner-tit mui-ellipsis h2Font">' + os + '</div>' +
2171
                        '</div>'
2172
                    $str.find(".qa-owner").html(str)
2173 2150
                }
2174
            },
2175
            "error": function() {
2176
            }
2177
        });
2178
    }
2179
    function questioninfo(qid, $str) {
2180
        $.ajax({
2181
            "url":"/ajax/question/qo",
2182
            "type": "GET",
2183
            "dataType": "json",
2184
            "data": {
2185
                id:qid
2186
            },
2187
            "success": function(data) {
2188
                if(data.success) {
2189
                    $str.find(".qa-question").html(data.data.title);
2190
                    if(data.data.pageViews>0){
2191
                        $str.find(".qaPageview").html("阅读量 "+data.data.pageViews);
2192
                    }else{
2193
                        $str.find(".qaPageview").hide()
2194
                    }
2195
2151
                var str = '<div class="owner-head useHead" style="background-image:url(' + baImg + ')"></div>' +
2152
                    '<div class="owner-info">' +
2153
                    '<div class="owner-name"><span class="h1Font">' + dataStr.name + '</span><em class="authiconNew ' + userType.sty + '" title="' + userType.title + '"></em></div>' +
2154
                    '<div class="owner-tit mui-ellipsis h2Font">' + os + '</div>' +
2155
                    '</div>'
2156
                $str.find(".qa-owner").html(str)
2157
	        });
2158
	    },
2159
	    questioninfo=function(qid, $str) {
2160
	        oAjax("/ajax/question/qo",{
2161
	        	id:qid
2162
	        }, "get", function(data){
2163
                $str.find(".qa-question").html(data.data.title);
2164
                if(data.data.pageViews>0){
2165
                    $str.find(".qaPageview").html("阅读量 "+data.data.pageViews);
2166
                }else{
2167
                    $str.find(".qaPageview").hide()
2196 2168
                }
2197
            },
2198
            "error": function() {
2199
            }
2200
        });
2201
    }
2202
   
2203
    function attendCount(id, $str) {
2204
    $.ajax({
2205
        "url":"/ajax/watch/countProfessor",
2206
        "type": "GET",
2207
        "dataType": "json",
2208
        "data": {
2209
            id:id,
2210
            type: 8
2211
        },
2212
        "success": function(data) {
2213
            if(data.success) {
2169
	        });
2170
	    },
2171
		attendCount=function(id, $str) {
2172
			 oAjax("/ajax/watch/countProfessor",{
2173
	        	id:id,
2174
            	type: "8"
2175
	        }, "get", function(data){
2214 2176
                if(data.data > 0) {
2215 2177
                    $str.find(".attendCount").html("关注 "+data.data);
2216 2178
                }
2217
            }
2218
        },
2219
        "error": function(ap) {
2220
        }
2221
    });
2222
}
2223
2224
	//纠错反馈
2225
	$(".correctSubmit").on("click",function(){
2226
		var cntCon=$(this).siblings(".correctCon").val();
2227
		var cntUser="";
2228
		if(userid && userid != null && userid != "null") {
2229
			cntUser = userid;
2230
		}
2231
		if(cntCon.length>500){
2232
			$.MsgBox.Alert('提示', '纠错反馈内容不得超过500个字');
2233
			return;
2234
		}else{
2235
			$.ajax({
2236
				"url": "/ajax/feedback/error/professor",
2237
				"type": "POST",
2238
				"dataType": "json",
2239
				"async": true,
2240
				"data": {
2241
					"id": professorId,
2242
					"cnt":cntCon,
2243
					"user":cntUser
2244
				},
2245
				"success": function(data) {
2246
					if(data.success) {
2247
						backSuccessed();
2179
		    });
2180
		},
2181
		researchAlert=function(cap){
2182
			oAjax("/ajax/researchAreaLog/ql",{
2183
	        	"professorId": professorId,
2184
				'caption': cap,
2185
				"rows": 1000
2186
	        }, "get", function(data){
2187
				$("#areaCon").html("");
2188
				var $info = data.data;
2189
				$("#subArea").text(cap);
2190
				$(".resAreaCover").fadeIn();
2191
				$(".resAreaTip").addClass("displayNone")
2192
				$(".resAreaCon").show()
2193
				if($info.length == 0) {
2194
					$(".resAreaCon").hide();
2195
					$(".resAreaTip").removeClass("displayNone")
2196
					return;
2197
				}
2198
				for(var i = 0; i < $info.length; i++) {
2199
					var liItem = document.createElement("li");
2200
					document.getElementById("areaCon").appendChild(liItem);
2201
					detailPro($info[i],liItem);
2202
				}
2203
			    $("body").css("position", "fixed");
2204
			});
2205
		},
2206
		bindClickFun=function(){
2207
			
2208
		
2209
			//点击查看全部资源
2210
			$(".coninfobox").on("click","#seeMoreR",function(){
2211
				document.body.scrollTop = document.documentElement.scrollTop = 0;
2212
				$("#tab2user").addClass("liNow").siblings().removeClass("liNow");
2213
				$("#item1user").hide();
2214
				$("#item2user").show();
2215
			})
2216
			//点击查看全部服务
2217
			$(".coninfobox").on("click","#seeMoreS",function(){
2218
				document.body.scrollTop = document.documentElement.scrollTop = 0;
2219
				$("#tab9user").addClass("liNow").siblings().removeClass("liNow");
2220
				$("#item1user").hide();
2221
				$("#item9user").show();
2222
			})
2223
			//点击查看全部文章
2224
			$(".coninfobox").on("click","#seeMoreA",function(){
2225
				document.body.scrollTop = document.documentElement.scrollTop = 0;
2226
				$("#tab3user").addClass("liNow").siblings().removeClass("liNow");
2227
				$("#item1user").hide();
2228
				$("#item3user").show();
2229
			})
2230
			//点击查看全部专利
2231
			$(".coninfobox").on("click","#seeMoreP",function(){
2232
				document.body.scrollTop = document.documentElement.scrollTop = 0;
2233
				$("#tab4user").addClass("liNow").siblings().removeClass("liNow");
2234
				$("#item1user").hide();
2235
				$("#item4user").show();
2236
			})
2237
			//点击查看全部论文
2238
			$(".coninfobox").on("click","#seeMoreL",function(){
2239
				document.body.scrollTop = document.documentElement.scrollTop = 0;
2240
				$("#tab5user").addClass("liNow").siblings().removeClass("liNow");
2241
				$("#item1user").hide();
2242
				$("#item5user").show();
2243
			})
2244
			//点击查看全部问题
2245
	        $(".coninfobox").on("click","#seeMoreQA",function(){
2246
	            document.body.scrollTop = document.documentElement.scrollTop = 0;
2247
	            $("#tab6user").addClass("liNow").siblings().removeClass("liNow");
2248
	            $("#item1user").hide();
2249
	            $("#item6user").show();
2250
	            if(userid === professorId) {
2251
	                $(".wendaNav").show();
2252
	            }else{
2253
	                $("#item6user .coninfobox").eq(0).addClass("displayNone").siblings().removeClass("displayNone");
2254
				}
2255
	        })
2256
	
2257
			//点击关注按钮
2258
			$("#attentBtn").on('click', function() {
2259
				if(userid && userid != null && userid != "null") {
2260
					if($(this).is('.attenedSpan')){
2261
						cancelCollectionAbout(orgId,$(this),6)
2262
					} else {
2263
						collectionAbout(orgId,$(this), 6);
2248 2264
					}
2249
				},
2250
				"error": function() {
2251
					$.MsgBox.Alert('提示', '链接服务器超时')
2265
					guanzhuNum();
2266
					attentMy();
2267
				}else{
2268
					quickLog();
2269
					operatTab();
2270
					closeLog();
2271
				}
2272
			});	
2273
			//点击联系按钮
2274
			$("#conbtn").on('click', function(){
2275
				if(userid && userid != null && userid != 'null' && userid != undefined && userid != 'undefined') {
2276
					location.href="tidings.html?id="+professorId
2277
				} else {
2278
					quickLog();
2279
					operatTab();
2280
					closeLog();
2252 2281
				}
2253 2282
			});
2283
			
2284
			$("#attendmyGo").on("click",function(){
2285
				$(".mainNavUl li.rightbtn").addClass("liNow").siblings().removeClass("liNow");
2286
				$("#item8more").show();
2287
				$("#item8user").show().siblings().hide();
2288
				$(".moreBuUl li.attendMy").addClass("liNow").siblings().removeClass("liNow");
2289
				$("#item8drop1").show().siblings().hide();
2290
				attentMyself();
2291
			})
2292
			
2293
			//纠错反馈
2294
			$(".correctSubmit").on("click",function(){
2295
				var cntCon=$(this).siblings(".correctCon").val();
2296
				var cntUser="";
2297
				if(userid && userid != null && userid != "null") {
2298
					cntUser = userid;
2299
				}
2300
				if(cntCon.length>500){
2301
					$.MsgBox.Alert('提示', '纠错反馈内容不得超过500个字');
2302
					return;
2303
				}else{
2304
					oAjax("/ajax/feedback/error/professor",{
2305
						"id": professorId,
2306
						"cnt":cntCon,
2307
						"user":cntUser
2308
					}, "POST", function(data){
2309
						backSuccessed();
2310
					});
2311
				}
2312
			})
2313
	
2254 2314
		}
2255
	})
2315
2316
	
2317
	if(userid!=professorId){
2318
		pageViewLog(professorId,1)
2319
		relevantExperts();//合作专家
2320
		relevantarticalList();//相关文章
2321
		likeExperts();//感兴趣专家
2322
		isActUser();//判断用户是否被激活
2323
		ifcollectionAbout(professorId,$(".goSpan").find(".attenSpan"), 1)
2324
		$(".goSpan").show();
2325
		$(".moreBuUl li.attentType").hide();
2326
		$(".moreBuUl li.attendMy").addClass("liNow").text("关注他的人");
2327
		$("#item8drop10").show().siblings().hide();
2328
		watchType=0;
2329
		attentMyself(true);
2330
	}else{
2331
		collAttent(1,true);
2332
		questionListVal(true);
2333
		$(".goSpanTo").show();
2334
		$(".myoneself").show();
2335
	}
2336
	queryPubCount();
2337
	getUserInfo(); //获取详细信息
2338
	demandListVal(true);
2339
	articalListVal(true);
2340
	resourceListVal(true);
2341
	serviceListVal(true);
2342
	patentListVal(true);
2343
	paperListVal(true);
2344
	answerListVal(true);//获取个人的回答
2345
	bindClickFun();
2346
2256 2347
	
2348
2349
	$("#myAttends").on("click",function(){
2350
			openAttend()
2351
		})
2352
		
2353
		
2354
		/*研究方向点赞*/
2355
		var clFlag = 1;
2356
		$("#researchAreaShow").on("click", ".plus", function() {
2357
			if(userid && userid != null && userid != "null") {
2358
				//点赞变化样式
2359
				if(clFlag) {
2360
					clFlag = 0;
2361
				} else {
2362
					return;
2363
				}
2364
				if($(this).data("isagree") > -1) {
2365
					$(this).stop(true, true).animate({
2366
						backgroundPositionY: 0
2367
					}, 300); //变成未点赞样式
2368
				} else {
2369
					$(this).stop(true, true).animate({
2370
						backgroundPositionY: -26
2371
					}, 300); //变成点赞样式
2372
				}
2373
2374
				$.ajax({
2375
					"url": $(this).data("isagree") > -1 ? "/ajax/researchArea/unAgree" : "/ajax/researchArea/agree",
2376
					"type": "POST",
2377
					"data": {
2378
						"targetId": $(this).data("pid"),
2379
						"targetCaption": oArray[$(this).data("caption")],
2380
						"opId": userid,
2381
						"uname":$.cookie("userName")
2382
					},
2383
					"contentType": "application/x-www-form-urlencoded",
2384
					"success": function(dataStr) {
2385
						if(dataStr.success) {
2386
							$.get("/ajax/professor/info/" + professorId, function(dataStr) {
2387
								if(dataStr.success) {
2388
									clFlag = 1;
2389
									var $info = dataStr.data;
2390
									if($info) {
2391
										$("#researchAreaShow").empty("")
2392
										if($info.researchAreas) {
2393
											researchAreaShow($info.researchAreas, $info.editResearchAreaLogs);
2394
										}
2395
									}
2396
								}
2397
							})
2398
						} else {
2399
							$.MsgBox.Alert("提示", dataStr.msg);
2400
						}
2401
					}
2402
				});
2403
			} else {
2404
				quickLog();
2405
				operatTab();
2406
				closeLog();
2407
			}
2408
2409
		})
2410
		
2411
		//点击每个研究方向弹出研究方向详情窗口
2412
		$("#researchAreaShow").on("click", ".favorBox,.favorCount", function() {
2413
			var cap = $(this).attr("caption");
2414
			researchAlert(cap)
2415
		});
2416
		
2417
		//关闭按钮
2418
		$("#workclose").click(function() {
2419
			$(".resAreaCover").fadeOut();
2420
		    $("body").css("position", "");
2421
		});
2257 2422
})
2258 2423

+ 25 - 183
userInforShow.html

@ -68,14 +68,14 @@
68 68
			<div class="leftconBox floatL">
69 69
				<div class="navconBox">
70 70
					<ul class="mainNavUl clearfix">
71
						<li rel="item1user" class="liNow">主页</li>
72
						<li rel="item9user">服务 <span class="counts" id="serCount"></span></li>
73
						<li rel="item2user">资源 <span class="counts" id="resCount"></span></li>
74
						<li rel="item3user">文章 <span class="counts" id="artCount"></span></li>
75
						<li rel="item4user">专利 <span class="counts" id="patCount"></span></li>
76
						<li rel="item5user">论文 <span class="counts" id="parCount"></span></li>
77
						<li rel="item6user" tmp="item6more" class="wenda">问答 <span class="counts" id="qaCount"></span></li>
78
						<li rel="item7user">资料</li>
71
						<li rel="item1user" id="tab1user" class="liNow">主页</li>
72
						<li rel="item9user" id="tab9user">服务 <span class="counts" id="serCount"></span></li>
73
						<li rel="item2user" id="tab2user">资源 <span class="counts" id="resCount"></span></li>
74
						<li rel="item3user" id="tab3user">文章 <span class="counts" id="artCount"></span></li>
75
						<li rel="item4user" id="tab4user">专利 <span class="counts" id="patCount"></span></li>
76
						<li rel="item5user" id="tab5user">论文 <span class="counts" id="parCount"></span></li>
77
						<li rel="item6user" id="tab6user" tmp="item6more" class="wenda">问答 <span class="counts" id="qaCount"></span></li>
78
						<li rel="item7user" id="tab7user">资料</li>
79 79
						<li rel="item8user" tmp="item8more" class="rightbtn">更多<em class="foldtr"></em></li>
80 80
					</ul>
81 81
					<div class="moreNav wendaNav" id="item6more">
@ -113,24 +113,17 @@
113 113
								</ul>
114 114
							</div>
115 115
						</div>
116
						<div class="coninfobox needinfobox">
117
							<div class="form-item otherShow">
116
						<div class="coninfobox splitBlock clearfix displayNone">
117
							<div class="form-item otherShow displayNone">
118 118
								<div class="coninfotit">可提供服务<span class="seeMore" id="seeMoreS">查看全部<em></em></span></div>
119 119
								<div class="coninfocon form-result aboutRes">
120 120
									<ul id="showService">
121
										<li><a href="resourceShow.html" class="flexCenter urlgo">
122
											<div class="madiaHead resouseHead" id="userimg"></div>
123
											<div class="madiaInfo">
124
												<p class="h1Font ellipsisSty-2" id="resourceName">习近平将对哈萨克斯坦进行国事访问并出席活动习近平将对哈萨克斯坦进行国事访问并出席活动习近平将对哈萨克斯坦进行国事访问并出席活动</p>
125
												<p class="h2Font ellipsisSty">应用用途:习近平将对哈萨克斯坦进行国事访问并出席活动习近平将对哈萨克斯坦进行国事访问并出席活动习近平将对哈萨克斯坦进行国事访问并出席活动</p>
126
											</div>
127
										</a>
128
										</li>
121
										
129 122
									</ul>
130 123
								</div>
131 124
							</div>
132
							<div class="form-item otherShow">
133
								<div class="coninfotit" style="margin-top:30px">可共享资源<span class="seeMore" id="seeMoreR">查看全部<em></em></span></div>
125
							<div class="form-item otherShow displayNone">
126
								<div class="coninfotit">可共享资源<span class="seeMore" id="seeMoreR">查看全部<em></em></span></div>
134 127
								<div class="coninfocon form-result aboutRes">
135 128
									<ul id="showResource">
136 129
										
@ -223,9 +216,7 @@
223 216
						<div class="nodatabox" style="background: #FFFFFF;">
224 217
					        <div class="nodata">
225 218
					            <div class="picbox picNull"></div>
226
					            <div class="txtbox">
227
					            	<p class="noContip">用户尚未发布任何内容</p>
228
					            </div>
219
					            <div class="txtbox">用户尚未发布任何内容</div>
229 220
					        </div>
230 221
					    </div>
231 222
					</div>
@ -235,15 +226,6 @@
235 226
								<ul id="proResource">
236 227
									
237 228
								</ul>
238
								<!--无搜索结果-->
239
								<div class="nodatabox displayNone">
240
							        <div class="nodata">
241
							            <div class="picbox picNull"></div>
242
							            <div class="txtbox">
243
							            	<p class="noContip"></p>
244
							            </div>
245
							        </div>
246
							    </div>
247 229
								<button class="js-load-more"></button>
248 230
							</div>
249 231
						</div>
@ -254,15 +236,6 @@
254 236
								<ul id="proArticel">
255 237
									
256 238
								</ul>
257
								<!--无搜索结果-->
258
								<div class="nodatabox displayNone">
259
							        <div class="nodata">
260
							            <div class="picbox picNull"></div>
261
							            <div class="txtbox">
262
							            	<p class="noContip"></p>
263
							            </div>
264
							        </div>
265
							    </div>
266 239
								<button class="js-load-more"></button>
267 240
							</div>
268 241
						</div>
@ -273,15 +246,6 @@
273 246
								<ul id="proPatent">
274 247
									
275 248
								</ul>
276
								<!--无搜索结果-->
277
								<div class="nodatabox displayNone">
278
							        <div class="nodata">
279
							            <div class="picbox picNull"></div>
280
							            <div class="txtbox">
281
							            	<p class="noContip"></p>
282
							            </div>
283
							        </div>
284
							    </div>
285 249
								<button class="js-load-more"></button>
286 250
							</div>
287 251
						</div>
@ -292,15 +256,6 @@
292 256
								<ul id="proPaper">
293 257
									
294 258
								</ul>
295
								<!--无搜索结果-->
296
								<div class="nodatabox displayNone">
297
							        <div class="nodata">
298
							            <div class="picbox picNull"></div>
299
							            <div class="txtbox">
300
							            	<p class="noContip"></p>
301
							            </div>
302
							        </div>
303
							    </div>
304 259
								<button class="js-load-more"></button>
305 260
							</div>
306 261
						</div>
@ -310,15 +265,6 @@
310 265
							<div class="coninfocon form-result aboutRes">
311 266
								<ul id="proQ">
312 267
								</ul>
313
								<!--无搜索结果-->
314
								<div class="nodatabox displayNone">
315
							        <div class="nodata">
316
							            <div class="picbox picNull"></div>
317
							            <div class="txtbox">
318
							            	<p class="noContip"></p>
319
							            </div>
320
							        </div>
321
							    </div>
322 268
								<button class="js-load-more"></button>
323 269
							</div>
324 270
						</div>
@ -326,15 +272,6 @@
326 272
							<div class="coninfocon form-result needList">
327 273
								<ul id="proA">
328 274
								</ul>
329
								<!--无搜索结果-->
330
								<div class="nodatabox displayNone">
331
							        <div class="nodata">
332
							            <div class="picbox picNull"></div>
333
							            <div class="txtbox">
334
							            	<p class="noContip"></p>
335
							            </div>
336
							        </div>
337
							    </div>
338 275
								<button class="js-load-more"></button>
339 276
							</div>
340 277
						</div>
@ -388,14 +325,7 @@
388 325
								<ul id="attendPro">
389 326
									
390 327
								</ul>
391
								<div class="nodatabox displayNone">
392
							        <div class="nodata">
393
							            <div class="picbox picNull"></div>
394
							            <div class="txtbox">
395
							            	<p class="noContip">用户还未关注任何专家</p>
396
							            </div>
397
							        </div>
398
							    </div>
328
								<button class="js-load-more"></button>
399 329
							</div>
400 330
						</div>
401 331
						<div id="item8drop2" class="coninfobox form-item otherShow dropconItem">
@ -403,15 +333,7 @@
403 333
								<ul id="attendCmp">
404 334
									
405 335
								</ul>
406
								<!--无搜索结果-->
407
								<div class="nodatabox displayNone">
408
							        <div class="nodata">
409
							            <div class="picbox picNull"></div>
410
							            <div class="txtbox">
411
							            	<p class="noContip">用户还未关注任何企业</p>
412
							            </div>
413
							        </div>
414
							    </div>
336
								<button class="js-load-more"></button>
415 337
							</div>
416 338
						</div>
417 339
						<div id="item8drop3" class="coninfobox form-item otherShow dropconItem">
@ -419,15 +341,7 @@
419 341
								<ul id="attendQuestion">
420 342
									
421 343
								</ul>
422
								<!--无搜索结果-->
423
								<div class="nodatabox displayNone">
424
							        <div class="nodata">
425
							            <div class="picbox picNull"></div>
426
							            <div class="txtbox">
427
							            	<p class="noContip">用户还未关注任何问题</p>
428
							            </div>
429
							        </div>
430
							    </div>
344
								<button class="js-load-more"></button>
431 345
							</div>
432 346
						</div>
433 347
						<div id="item8drop4" class="coninfobox form-item otherShow dropconItem">
@ -435,15 +349,7 @@
435 349
								<ul id="attendArt">
436 350
									
437 351
								</ul>
438
								<!--无搜索结果-->
439
								<div class="nodatabox displayNone">
440
							        <div class="nodata">
441
							            <div class="picbox picNull"></div>
442
							            <div class="txtbox">
443
							            	<p class="noContip">用户还未收藏任何文章</p>
444
							            </div>
445
							        </div>
446
							    </div>
352
								<button class="js-load-more"></button>
447 353
							</div>
448 354
						</div>
449 355
						<div id="item8drop5" class="coninfobox form-item otherShow dropconItem">
@ -451,15 +357,7 @@
451 357
								<ul id="attendPatent">
452 358
									
453 359
								</ul>
454
								<!--无搜索结果-->
455
								<div class="nodatabox displayNone">
456
							        <div class="nodata">
457
							            <div class="picbox picNull"></div>
458
							            <div class="txtbox">
459
							            	<p class="noContip">用户还未收藏任何专利</p>
460
							            </div>
461
							        </div>
462
							    </div>
360
								<button class="js-load-more"></button>
463 361
							</div>
464 362
						</div>
465 363
						<div id="item8drop6" class="coninfobox form-item otherShow dropconItem">
@ -467,15 +365,7 @@
467 365
								<ul id="attendPaper">
468 366
									
469 367
								</ul>
470
								<!--无搜索结果-->
471
								<div class="nodatabox displayNone">
472
							        <div class="nodata">
473
							            <div class="picbox picNull"></div>
474
							            <div class="txtbox">
475
							            	<p class="noContip">用户还未收藏任何论文</p>
476
							            </div>
477
							        </div>
478
							    </div>
368
								<button class="js-load-more"></button>
479 369
							</div>
480 370
						</div>
481 371
						<div id="item8drop7" class="coninfobox form-item otherShow dropconItem">
@ -483,15 +373,7 @@
483 373
								<ul id="attendRes">
484 374
									
485 375
								</ul>
486
								<!--无搜索结果-->
487
								<div class="nodatabox displayNone">
488
							        <div class="nodata">
489
							            <div class="picbox picNull"></div>
490
							            <div class="txtbox">
491
							            	<p class="noContip">用户还未收藏任何资源</p>
492
							            </div>
493
							        </div>
494
							    </div>
376
								<button class="js-load-more"></button>
495 377
							</div>
496 378
						</div>
497 379
						<div id="item8drop8" class="coninfobox form-item otherShow dropconItem">
@ -499,15 +381,7 @@
499 381
								<ul id="attendDemand">
500 382
									
501 383
								</ul>
502
								<!--无搜索结果-->
503
								<div class="nodatabox displayNone">
504
							        <div class="nodata">
505
							            <div class="picbox picNull"></div>
506
							            <div class="txtbox">
507
							            	<p class="noContip">用户还未收藏任何需求</p>
508
							            </div>
509
							        </div>
510
							    </div>
384
								<button class="js-load-more"></button>
511 385
							</div>
512 386
						</div>
513 387
						<div id="item8drop9" class="coninfobox form-item otherShow dropconItem">
@ -515,15 +389,7 @@
515 389
								<ul id="attendAnswer">
516 390
									
517 391
								</ul>
518
								<!--无搜索结果-->
519
								<div class="nodatabox displayNone">
520
							        <div class="nodata">
521
							            <div class="picbox picNull"></div>
522
							            <div class="txtbox">
523
							            	<p class="noContip">用户还未收藏任何回答</p>
524
							            </div>
525
							        </div>
526
							    </div>
392
								<button class="js-load-more"></button>
527 393
							</div>
528 394
						</div>
529 395
						<div id="item8drop10" class="coninfobox form-item dropconItem">
@ -531,14 +397,7 @@
531 397
								<ul id="attendMy">
532 398
									
533 399
								</ul>
534
								<div class="nodatabox displayNone">
535
							        <div class="nodata">
536
							            <div class="picbox picNull"></div>
537
							            <div class="txtbox">
538
							            	<p class="noContip">用户暂时还没被其他任何人关注</p>
539
							            </div>
540
							        </div>
541
							    </div>
400
								<button class="js-load-more"></button>
542 401
							</div>
543 402
						</div>
544 403
						<div id="item8drop11" class="coninfobox form-item otherShow dropconItem">
@ -546,15 +405,7 @@
546 405
								<ul id="attendSer">
547 406
									
548 407
								</ul>
549
								<!--无搜索结果-->
550
								<div class="nodatabox displayNone">
551
							        <div class="nodata">
552
							            <div class="picbox picNull"></div>
553
							            <div class="txtbox">
554
							            	<p class="noContip">用户还未收藏任何服务</p>
555
							            </div>
556
							        </div>
557
							    </div>
408
								<button class="js-load-more"></button>
558 409
							</div>
559 410
						</div>
560 411
					</div>
@ -564,15 +415,6 @@
564 415
								<ul id="proService">
565 416
									
566 417
								</ul>
567
								<!--无搜索结果-->
568
								<div class="nodatabox displayNone">
569
							        <div class="nodata">
570
							            <div class="picbox picNull"></div>
571
							            <div class="txtbox">
572
							            	<p class="noContip"></p>
573
							            </div>
574
							        </div>
575
							    </div>
576 418
								<button class="js-load-more"></button>
577 419
							</div>
578 420
						</div>