Browse Source

资源详情页面及分享资源页面

jack 8 years ago
parent
commit
f407cb5c7b
2 changed files with 43 additions and 219 deletions
  1. 19 18
      js/resourceInfo.js
  2. 24 201
      shareResinfor.html

+ 19 - 18
js/resourceInfo.js

@ -49,14 +49,15 @@ $(document).ready(function() {
49 49
				"async": true,
50 50
				"success": function(info) {
51 51
					if(info.success) {
52
						console.log(info)
52 53
						var $info = info.data;
53
						if($info.professor.authType) {
54
						if($info.editProfessor.authType) {
54 55
							$("#authFlag").addClass("authicon authicon-cu");
55 56
						} else {
56
							if($info.professor.authStatus) {
57
								if($info.professor.authentication == 1) {
57
							if($info.editProfessor.authStatus) {
58
								if($info.editProfessor.authentication == 1) {
58 59
									$("#authFlag").addClass("authicon2 authicon-mana");
59
								} else if($info.professor.authentication == 2) {
60
								} else if($info.editProfessor.authentication == 2) {
60 61
									$("#authFlag").addClass("authicon2 authicon-staff");
61 62
								} else {
62 63
									$("#authFlag").addClass("authicon2 authicon-stu");
@ -110,28 +111,28 @@ $(document).ready(function() {
110 111
						} else {
111 112
							$(".resBottom").hide();
112 113
						}
113
						$("#nameS").text($info.professor.name);
114
						if($info.professor.title) {
115
							if($info.professor.office) {
116
								$("#title").text($info.professor.title + ",");
114
						$("#nameS").text($info.editProfessor.name);
115
						if($info.editProfessor.title) {
116
							if($info.editProfessor.office) {
117
								$("#title").text($info.editProfessor.title + ",");
117 118
							} else {
118
								$("#title").text($info.professor.title);
119
								$("#title").text($info.editProfessor.title);
119 120
							}
120 121
						}
121
						if($info.professor.office) {
122
						if($info.editProfessor.office) {
122 123

123
							$("#office").text($info.professor.office);
124
							$("#office").text($info.editProfessor.office);
124 125
						}
125
						if($info.professor.department) {
126
							$("#department").text($info.professor.department);
126
						if($info.editProfessor.department) {
127
							$("#department").text($info.editProfessor.department);
127 128
						}
128
						if($info.professor.orgName) {
129
							$("#orgName").text($info.professor.orgName);
129
						if($info.editProfessor.orgName) {
130
							$("#orgName").text($info.editProfessor.orgName);
130 131
						}
131
						if($info.professor.address) {
132
							$("#address").text($info.professor.address);
132
						if($info.editProfessor.address) {
133
							$("#address").text($info.editProfessor.address);
133 134
						}
134
						if($info.professor.hasHeadImage) {
135
						if($info.editProfessor.hasHeadImage) {
135 136
							$("#headImg").attr("src", "/images/head/" + $info.professorId + "_l.jpg")
136 137
						}
137 138
						//专家相关资源

+ 24 - 201
shareResinfor.html

@ -175,73 +175,6 @@
175 175
			overflow: hidden;
176 176
			margin: auto;
177 177
		}
178
		/*咨询记录及等级*/
179
		
180
		.peolevelbox {
181
			display: block;
182
			padding: 4% 16px;
183
			border-top: 1px #F0F0F0 solid;
184
		}
185
		
186
		.peocountbox {
187
			width: 150px;
188
		}
189
		
190
		.peocount {
191
			font-size: 13px;
192
			color: #888888;
193
			overflow: hidden;
194
		}
195
		
196
		.peocount span em {
197
			font-size: 14px;
198
			padding: 0 3px;
199
			color: #FF9900;
200
			font-weight: 600;
201
		}
202
		
203
		.peocount .dialogicon {
204
			display: block;
205
			width: 20px;
206
			height: 20px;
207
			background: url(images/dialogue.png) center center no-repeat;
208
			background-size: 100% 100%;
209
			margin-right: 6px;
210
		}
211
		
212
		.peocount:before {
213
			position: absolute;
214
			right: 0;
215
			top: 0;
216
			left: 15px;
217
			height: 1px;
218
			content: '';
219
			-webkit-transform: scaleY(.5);
220
			transform: scaleY(.5);
221
			background-color: #c8c7cc;
222
		}
223
		
224
		.levelbox {
225
			margin: auto;
226
			overflow: hidden;
227
		}
228
		
229
		.levelbox .iconfont {
230
			float: left;
231
			margin: 2px;
232
			width: 14px;
233
			height: 14px;
234
		}
235
		
236
		.levelbox .icon-favor {
237
			background: url(images/favoricon.png) 0 0 no-repeat;
238
			background-size: 100% auto;
239
		}
240
		
241
		.levelbox .icon-favorfill {
242
			background: url(images/favoricon.png) 0 -14px no-repeat;
243
			background-size: 100% auto;
244
		}
245 178
		
246 179
		.infocontit {
247 180
			font-size: 14px;
@ -278,121 +211,10 @@
278 211
			border-radius: 6px;
279 212
			float: left;
280 213
		}
281
		
282
		.listitembox {
283
			position: static;
284
			width: 100%;
285
		}
286
		
287
		.listitembox .listitem {
288
			padding: 4px;
289
			padding-right: 0;
290
		}
291
		
292
		.listitembox .listitem .media-body {
293
			width: 73%;
294
			margin-left: 2%;
295
		}
296
		
297
		.listitembox .listitem .media-body .resbrief {
298
			width: 100%;
299
		}
300
		
301
		.listitembox .listitem .media-object {
302
			width: 30%;
303
		}
304
		
305
		.listitembox .listitem .media-object .iconposition {
306
			border-radius: 50%;
307
			max-width: 60px;
308
			height: 60px;
309
			margin: 1% 0;
310
		}
311
		
312
		.listitembox .listitem>a .mutlinebox {
313
			white-space: normal;
314
			overflow: auto;
315
			word-break: break-word;
316
		}
317
		
318
		.listbox {
319
			margin: 5px 0;
320
			max-width: 100%;
321
			overflow: hidden;
322
		}
323
		
324
		.listbrowse {
325
			border: 1px solid #FF9900;
326
			border-radius: 0 6px 6px 0;
327
			text-align: center;
328
			font-size: 13px;
329
			line-height: 27px;
330
			float: left;
331
			padding-right: 8px;
332
			max-width: 60%;
333
			overflow: hidden;
334
		}
335
		
336
		.plusbtn {
337
			font-size: 20px;
338
			line-height: 22px;
339
			color: #999999;
340
			margin-left: 4px;
341
			margin-top: 2px;
342
		}
343
		
344
		.plusbtn.icon-appreciatefill {
345
			color: #FF9900;
346
		}
347
		
348
		.like {
349
			display: block;
350
			float: left;
351
			width: 28px;
352
			font-size: 12px;
353
			background: #FF9900;
354
			color: #fff;
355
			line-height: 27px;
356
			margin-right: 5px;
357
		}
358
		
359
		.likenum {
360
			float: right;
361
			max-width: 130px;
362
			overflow: hidden;
363
		}
364
		
365
		.likenum .mui-icon {
366
			font-size: 24px;
367
			color: #CCCCCC;
368
		}
369
		
370
		.likepeople {
371
			width: 26px;
372
			height: 26px;
373
			line-height: 20px;
374
			float: left;
375
			overflow: hidden;
376
			margin-right: 5px;
377
		}
378
		
379
		.likepeople img {
380
			width: 100%;
381
			height: 100%;
382
		}
383
		
384
		.likemore {
385
			display: block;
386
			width: 25px;
387
			height: 25px;
388
			border: 1px solid #CCCCCC;
389
			background: url(images/likemore.png) center center no-repeat;
390
		}
391
		
392 214
		.personblock {
393
			position: absolute;
394
			right: 1%;
395
			max-width: 40%;
215
			/*position: absolute;
216
			right: 1%;*/
217
			max-width: 36%;
396 218
			padding: 0 3%;
397 219
			text-align: center;
398 220
		}
@ -406,9 +228,9 @@
406 228
						<img class="resImg headRadius" src="images/default-resource.jpg" id="ziyuanimg" data-preview-src data-preview-group="1" />
407 229
					</div>
408 230
					<div class="personblock pull-left" id="fess">
409
						<div style="margin:auto; width:80%;">
410
							<img class="headRadius" style="width: 64px;" src="images/default-photo.jpg" id="proimg">
411
							<p class="listtit clearfix" style="max-width: 106px;margin: auto;"><span class="floatL" id="proname"></span><em class="authicon authicon-cu" style="margin:3px 0 0 0;" id="promodify"></em></p>
231
						<div style="margin:auto; width:80%;position:relative;">
232
							<img class="headRadius" style="width: 64px;height:64px;" src="images/default-photo.jpg" id="proimg">
233
							<p class="listtit clearfix" style="width: 106px;margin: auto;"><span class="floatL" id="proname"></span><em class="authicon authicon-cu" style="margin:3px 0 0 0;" id="promodify"></em></p>
412 234
						</div>
413 235
414 236
						<!--<p class="listtit clearfix"><span class="floatL" id="proname"></span><em class="authicon authicon-cu" style="height: 16px; width:16px;margin:5px 0 0 2px;" id="promodify"></em></p>-->
@ -547,7 +369,7 @@
547 369
548 370
								var mydata = data.data;
549 371
								//资源名称
550
								professorId = mydata['professor']['id'];
372
								professorId = mydata['editProfessor']['id'];
551 373
								var userid = GetQueryString('userid');
552 374
								if(professorId == userid) {
553 375
									document.getElementsByClassName("footbox")[0].style.display = "none";
@ -555,35 +377,36 @@
555 377
								(mydata['resourceName']) ? oresourceName.innerHTML = mydata['resourceName']: oresourceName.innerHTML = '';
556 378
557 379
								//专家信息
558
								proId = mydata['professor']['id']; //专家id
380
								proId = mydata['editProfessor']['id']; //专家id
559 381
								//专家名字
560
								(mydata['professor']["name"]) ? oproname.innerText = mydata['professor']["name"]: oproname.innerText = '';
382
								(mydata['editProfessor']["name"]) ? oproname.innerText = mydata['editProfessor']["name"]: oproname.innerText = '';
561 383
								//职称
562
								(mydata['professor']["title"]) ? oprotitle.innerHTML = mydata['professor']["title"]: oprotitle.innerHTML = '';
384
								(mydata['editProfessor']["title"]) ? oprotitle.innerHTML = mydata['editProfessor']["title"]: oprotitle.innerHTML = '';
563 385
								//职位
564
								if(mydata['professor']["office"] == null || mydata['professor']["office"] == undefined) {
386
								if(mydata['editProfessor']["office"] == null || mydata['editProfessor']["office"] == undefined) {
565 387
									oprooffice.innerHTML = '';
566 388
								} else {
567
									if(mydata['professor']["title"]) {
568
										oprooffice.innerHTML = ',' + mydata['professor']["office"]; //职位
389
									if(mydata['editProfessor']["title"]) {
390
										oprooffice.innerHTML = ',' + mydata['editProfessor']["office"]; //职位
569 391
									}
570
									oprooffice.innerHTML = mydata['professor']["office"]; //职位
392
									oprooffice.innerHTML = mydata['editProfessor']["office"]; //职位
571 393
								};
572 394
								//所在机构
573
								(mydata['professor']["orgName"]) ? oproorgName.innerHTML = mydata['professor']["orgName"]: oproorgName.innerHTML = '';
395
								(mydata['editProfessor']["orgName"]) ? oproorgName.innerHTML = mydata['editProfessor']["orgName"]: oproorgName.innerHTML = '';
574 396
								//所在地
575
								(mydata['professor']["address"]) ? oproadress.innerHTML = mydata['professor']["address"]: oproadress.innerHTML = '';
397
								(mydata['editProfessor']["address"]) ? oproadress.innerHTML = mydata['editProfessor']["address"]: oproadress.innerHTML = '';
576 398
								/*是否认证*/
577
								//(mydata['professor']["authentication"] == true) ? opromodify.classList.add('authicon'): opromodify.classList.add('unauthicon');
578
								if(mydata['professor']["authType"]) {
399
								//(mydata['editProfessor']["authentication"] == true) ? opromodify.classList.add('authicon'): opromodify.classList.add('unauthicon');
400
								if(mydata['editProfessor']["authType"]) {
579 401
									opromodify.classList.add('authicon')
580 402
									opromodify.classList.add('authicon-cu');
403
									opromodify.style.position = "absolute";
581 404
								} else {
582
									if(mydata['professor']["authStatus"]) {
583
										if(mydata['professor']["authentication"] == 1) {
405
									if(mydata['editProfessor']["authStatus"]) {
406
										if(mydata['editProfessor']["authentication"] == 1) {
584 407
											opromodify.classList.add('authicon2');
585 408
											opromodify.classList.add('authicon-mana');
586
										} else if(mydata['professor']["authentication"] == 2) {
409
										} else if(mydata['editProfessor']["authentication"] == 2) {
587 410
											opromodify.classList.add('authicon2');
588 411
											opromodify.classList.add('authicon-staff');
589 412
										} else {
@ -593,7 +416,7 @@
593 416
									}
594 417
								}
595 418
								/*专家头像*/
596
								(mydata['professor']["hasHeadImage"] == 0) ? oproimg.setAttribute('src', '/images/default-photo.jpg'): oproimg.setAttribute('src', '/images/head/' + mydata['professor']['id'] + '_m.jpg');
419
								(mydata['editProfessor']["hasHeadImage"] == 0) ? oproimg.setAttribute('src', '/images/default-photo.jpg'): oproimg.setAttribute('src', '/images/head/' + mydata['editProfessor']['id'] + '_m.jpg');
597 420
598 421
								//资源基本信息
599 422
								//(mydata['images']['imageSrc']) ? oziyuanimg.setAttribute('src', mydata['images']['imageSrc']): oziyuanimg.setAttribute('src', '../images/default-resource.jpg'); //资源图片
@ -633,7 +456,7 @@
633 456
										console.log(applylist.length);
634 457
										for(var i = 0; i < applylist.length; i++) {
635 458
											var oli = document.createElement('li');
636
											oli.innerText = fieldlist[i];
459
											oli.innerText = applylist[i];
637 460
											oapply.appendChild(oli);
638 461
										}
639 462
									} else {