Browse Source

咨询申请中,认证图标

wangaidan 8 years ago
parent
commit
7c9a3d0cee
3 changed files with 32 additions and 12 deletions
  1. 26 5
      src/main/webapp/js/common.js
  2. 5 6
      src/main/webapp/js/consult.js
  3. 1 1
      src/main/webapp/js/popup.js

+ 26 - 5
src/main/webapp/js/common.js

@ -246,7 +246,7 @@ function concultProInfo(professorId){
246 246
			data : {"id":professorId},
247 247
			contentType : "application/x-www-form-urlencoded",
248 248
			success:function(response){
249
				console.log(response);
249
//				console.log(response);
250 250
				var myData = response["data"];
251 251
				
252 252
				$("#professorName").html(myData["name"]);
@ -272,10 +272,31 @@ function concultProInfo(professorId){
272 272
					$("#starLevel .evastar2").eq(i).addClass("addStar");
273 273
				}
274 274
				
275
				//是否认证
276
				if(myData["authentication"] == true){
277
					$("#proModify").removeClass("displayNone");
278
				}
275
				//认证
276
				if(myData.authType) {//专家
277
					
278
					$("#proModify").addClass('authicon authicon-cu');
279
											
280
				} else {//普通用户
281
					if(myData.authStatus) {//身份已认证
282
						if(myData.authentication == 1) {//科研工作者
283
							
284
							$("#proModify").addClass('authicon2 authicon-mana');
285
																	
286
						} else if(myData.authentication == 2) {//企业专家
287
							
288
							$("#proModify").addClass('authicon2 authicon-staff');
289
							
290
						} else {//学生
291
							$("#proModify").addClass('authicon2 authicon-stu');
292
															
293
						}
294
					}else{//身份未认证
295
						
296
					}
297
					
298
				};
299
279 300
				
280 301
				//头像
281 302
				if(myData["hasHeadImage"] == 0){

+ 5 - 6
src/main/webapp/js/consult.js

@ -58,12 +58,11 @@ function handleData(data,attrParams,btnCls){
58 58
				
59 59
			};
60 60
			//认证
61
			if(data[i]["professor"]["authentication"] == true){
62
				proModify = "display:inline-block;"
63
			}else{
64
				proModify = "display:none;"
65
			}
66
			console.log(data[i]["professor"]);
61
//			if(data[i]["professor"]["authentication"] == true){
62
//				proModify = "display:inline-block;"
63
//			}else{
64
//				proModify = "display:none;"
65
//			}
67 66
			
68 67
			if(data[i]["professor"].authType) {//专家
69 68
				modifyclass = 'authicon authicon-cu';

+ 1 - 1
src/main/webapp/js/popup.js

@ -773,7 +773,7 @@ function ConsultApply() {
773 773
		PopHtml += ' <div class="consultright floatL">';
774 774
		//专家信息
775 775
		PopHtml += '<div class="probrief">';
776
		PopHtml += '<div class="proname"><a href="" class="name" id="professorName"></a><img class="modifyicon displayNone" id="proModify" src="images/onauth.png" width="18"></div>';
776
		PopHtml += '<div class="proname"><a href="" class="name" id="professorName"></a><a class="modifyicon" id="proModify" style="position:absolute;top:62px;" width="18"></a></div>';
777 777
		PopHtml += '<div class="phh2" id="professorTitle"></div>';
778 778
		PopHtml += '<div class="phh4"><span id="profDepartment"> </span><span id="profOrganization" style="margin-left:5px;"></span></div>';
779 779
		PopHtml += '<div class="phh4" id="adress"><span id="profAdress"></span></div>';