Browse Source

找专家中咨询功能

xiaoai_123 8 years ago
parent
commit
f071e63505
1 changed files with 8 additions and 3 deletions
  1. 8 3
      src/main/webapp/js/search.js

+ 8 - 3
src/main/webapp/js/search.js

65
					
65
					
66
								dataHtml += "</div>";
66
								dataHtml += "</div>";
67
								dataHtml += "</div>";	
67
								dataHtml += "</div>";	
68
								dataHtml += "<div class='operbox'><span class='operbtn consultbtn'>咨询</span></div>";
68
								dataHtml += "<div class='operbox'><span class='operbtn onlyConsultbtn' id='"+$data.data.data[i]['id']+"'>咨询</span></div>";
69
								
69
								
70
								$("#professorList").append(dataHtml);
70
								$("#professorList").append(dataHtml);
71
								
72
								
71
							
73
								//获取头像		
72
								//获取头像		
74
								$(".images").load(function(){								
73
								$(".images").load(function(){								
75
								})
74
								})
104
								)(i);
103
								)(i);
105

104

106
							}
105
							}
106
							//找专家点击咨询
107
							$(".onlyConsultbtn").bind("click",clickConsultFn);
108
							
107
							if(isbind == true){
109
							if(isbind == true){
108
								$(".tcdPageCode").createPage({
110
								$(".tcdPageCode").createPage({
109
							        pageCount:Math.ceil($data.data.total/pageSize),
111
							        pageCount:Math.ceil($data.data.total/pageSize),
438
				});
440
				});
439
		});
441
		});
440
	 
442
	 
443
	 
444
	 
441
	//点击咨询处理函数
445
	//点击咨询处理函数
442
	 function clickConsultFn(){
446
	 function clickConsultFn(){
443
			ConsultApply();
447
			ConsultApply();
445
			//点击的发送
449
			//点击的发送
446
			$("#sendConsultBtn").on("click",sendConsultHandler);
450
			$("#sendConsultBtn").on("click",sendConsultHandler);
447
			var professorId = $(this).attr("id");
451
			var professorId = $(this).attr("id");
452
			alert(professorId);
448
			if(userid && userid != null && userid != "null"){
453
			if(userid && userid != null && userid != "null"){
449
				$.ajax({
454
				$.ajax({
450
					"url" :"/ajax/professor/"+ professorId,
455
					"url" :"/ajax/professor/"+ professorId,