jack 8 years ago
parent
commit
2031d35fa3
4 changed files with 70 additions and 56 deletions
  1. 4 1
      js/common.js
  2. 8 0
      js/consult.js
  3. 3 0
      js/resourceInfo.js
  4. 55 55
      js/search.js

+ 4 - 1
js/common.js

263
				if(myData["address"]){
263
				if(myData["address"]){
264
					$("#profAdress").html(myData["address"]);
264
					$("#profAdress").html(myData["address"]);
265
				}
265
				}
266
				
266
				console.log(myData["consultCount"])
267
				if(!myData["consultCount"]){
268
					$("#starLevel").hide();
269
				}
267
				$("#byConsultConut").html(myData["consultCount"]);
270
				$("#byConsultConut").html(myData["consultCount"]);
268
				$("#sendConsultBtn").attr("proId",myData["id"]);
271
				$("#sendConsultBtn").attr("proId",myData["id"]);
269
				
272
				

+ 8 - 0
js/consult.js

855
function clickSendAssessBtn2(consultId,attrParams,thanksStatus){
855
function clickSendAssessBtn2(consultId,attrParams,thanksStatus){
856
	var assessStar = $("#startCount").val();
856
	var assessStar = $("#startCount").val();
857
	var assessContant = $("#assessCon").val();
857
	var assessContant = $("#assessCon").val();
858
	if(!assessStar){
859
		$.MsgBox.Alert('提示',"请点击总体评价");
860
		return;
861
	}
862
	if(!assessContant){
863
		$.MsgBox.Alert('提示',"请填写评价内容");
864
		return;
865
	}
858
	var assessContentStr ={
866
	var assessContentStr ={
859
			"consultId":consultId, //咨询ID
867
			"consultId":consultId, //咨询ID
860
		    "assessStatus":"1", //评价状态 0-未评价,1-已评价
868
		    "assessStatus":"1", //评价状态 0-未评价,1-已评价

+ 3 - 0
js/resourceInfo.js

66
						$(".h2Font").text($info.resourceName);
66
						$(".h2Font").text($info.resourceName);
67
						$("#application").text($info.supportedServices);
67
						$("#application").text($info.supportedServices);
68
						professorId = $info.professorId;
68
						professorId = $info.professorId;
69
						if(userid==professorId){
70
							$("#consultin").hide()
71
						}
69
						if($info.subject) {
72
						if($info.subject) {
70
							subjectShow($info.subject)
73
							subjectShow($info.subject)
71
						} else {
74
						} else {

+ 55 - 55
js/search.js

255
							if($da[i].supportedServices) {
255
							if($da[i].supportedServices) {
256
								add += '<div class="ellipsisbox provideservice"><p>应用用途:' + $da[i].supportedServices + '</p></div></div>'
256
								add += '<div class="ellipsisbox provideservice"><p>应用用途:' + $da[i].supportedServices + '</p></div></div>'
257
							}
257
							}
258
							add+="</div>"
259
							if(userid==$da[i]["professor"]["id"]){
258
							add += "</div>"
259
							if(userid == $da[i]["professor"]["id"]) {
260
								add += '<div class="operbox"><span class="operbtn consultbtn" id="' + $da[i]["professor"]["id"] + '" style="display:none;">咨询</span><span style="display: none;" class="operbtn applybtn appl" resourceId=' + $da[i].resourceId + ' resourceName=' + $da[i].resourceName + ' professor=' + $da[i].professor.name + '>申请</span></div>'
260
								add += '<div class="operbox"><span class="operbtn consultbtn" id="' + $da[i]["professor"]["id"] + '" style="display:none;">咨询</span><span style="display: none;" class="operbtn applybtn appl" resourceId=' + $da[i].resourceId + ' resourceName=' + $da[i].resourceName + ' professor=' + $da[i].professor.name + '>申请</span></div>'
261
							}else{
261
							} else {
262
								add += '<div class="operbox"><span class="operbtn consultbtn" id="' + $da[i]["professor"]["id"] + '">咨询</span><span style="display: none;" class="operbtn applybtn appl" resourceId=' + $da[i].resourceId + ' resourceName=' + $da[i].resourceName + ' professor=' + $da[i].professor.name + '>申请</span></div>'
262
								add += '<div class="operbox"><span class="operbtn consultbtn" id="' + $da[i]["professor"]["id"] + '">咨询</span><span style="display: none;" class="operbtn applybtn appl" resourceId=' + $da[i].resourceId + ' resourceName=' + $da[i].resourceName + ' professor=' + $da[i].professor.name + '>申请</span></div>'
263
							}
263
							}
264
							add += '</div></div>'
264
							add += '</div></div>'
303
303
304
					//资源中点击咨询
304
					//资源中点击咨询
305
					//$(".consultbtn").bind("click",clickResouceConsultHandler);
305
					//$(".consultbtn").bind("click",clickResouceConsultHandler);
306
					$(".about").on("click", '.consultbtn', function(e) {						
307
						e.stopPropagation(); //阻止事件冒泡,影响点击咨询
308
						e.cancelBubble = true; // ie下阻止冒泡
309
						clickResouceConsultHandler($(this), $(this).attr('id'));
310
306
311
					});
312
				},
307
				},
313
			});
308
			});
314
		}
309
		}
315
310
316
	}
311
	}
312
	$(".about").on("click", '.consultbtn', function(e) {
313
		e.stopPropagation(); //阻止事件冒泡,影响点击咨询
314
		e.cancelBubble = true; // ie下阻止冒泡
315
		clickResouceConsultHandler($(this), $(this).attr('id'));
317
316
317
	});
318
	var subjectList = function() {
318
	var subjectList = function() {
319
		$.get("../ajax/dataDict/qaDictCode", {
319
		$.get("../ajax/dataDict/qaDictCode", {
320
			dictCode: "SUBJECT"
320
			dictCode: "SUBJECT"
584
			'.remess',
584
			'.remess',
585
			function() {
585
			function() {
586
				var resourceID = $(this).attr("resourceId");
586
				var resourceID = $(this).attr("resourceId");
587
				location.href="resourceInfo.html?resourceId="+resourceID;
587
				location.href = "resourceInfo.html?resourceId=" + resourceID;
588
				//ResourceMessage();
588
				//ResourceMessage();
589
//				$
590
//					.ajax({
591
//						"url": "/ajax/resource/" + resourceID,
592
//						"type": "get",
593
//						"async": true,
594
//						"success": function(info) {
595
//							if(info.success) {
596
//								$("#resourceName").text(
597
//									info.data.resourceName);
598
//								$("#supportedServices")
599
//									.text(
600
//										info.data.supportedServices);
601
//								$("#hopePayMethod").text(
602
//									info.data.hopePayMethod);
603
//								$("#cooperationNotes").text(
604
//									info.data.cooperationNotes);
605
//								$("#subject").text(
606
//									info.data.subject);
607
//								$("#industry").text(
608
//									info.data.industry);
609
//								$("#descp").text(info.data.descp);
610
//								$("#professor").text(
611
//									info.data.professor.name);
612
//								$(".resouImage").attr(
613
//									"src",
614
//									"/images/resource/" +
615
//									resourceID +
616
//									".jpg");
617
//								$(".resouImage")
618
//									.load(function() {})
619
//									.error(
620
//										function() {
621
//											$(this)
622
//												.attr(
623
//													"src",
624
//													"/images/default-resource.jpg");
625
//										});
626
//								limitHeight();
627
//							} else {
628
//								$.MsgBox.Alert('消息提醒', "系统异常!");
629
//							}
630
//						},
631
//						"error": function() {
632
//							$.MsgBox.Alert('message', 'failed')
633
//						}
634
//					});
589
				//				$
590
				//					.ajax({
591
				//						"url": "/ajax/resource/" + resourceID,
592
				//						"type": "get",
593
				//						"async": true,
594
				//						"success": function(info) {
595
				//							if(info.success) {
596
				//								$("#resourceName").text(
597
				//									info.data.resourceName);
598
				//								$("#supportedServices")
599
				//									.text(
600
				//										info.data.supportedServices);
601
				//								$("#hopePayMethod").text(
602
				//									info.data.hopePayMethod);
603
				//								$("#cooperationNotes").text(
604
				//									info.data.cooperationNotes);
605
				//								$("#subject").text(
606
				//									info.data.subject);
607
				//								$("#industry").text(
608
				//									info.data.industry);
609
				//								$("#descp").text(info.data.descp);
610
				//								$("#professor").text(
611
				//									info.data.professor.name);
612
				//								$(".resouImage").attr(
613
				//									"src",
614
				//									"/images/resource/" +
615
				//									resourceID +
616
				//									".jpg");
617
				//								$(".resouImage")
618
				//									.load(function() {})
619
				//									.error(
620
				//										function() {
621
				//											$(this)
622
				//												.attr(
623
				//													"src",
624
				//													"/images/default-resource.jpg");
625
				//										});
626
				//								limitHeight();
627
				//							} else {
628
				//								$.MsgBox.Alert('消息提醒', "系统异常!");
629
				//							}
630
				//						},
631
				//						"error": function() {
632
				//							$.MsgBox.Alert('message', 'failed')
633
				//						}
634
				//					});
635
			})
635
			})
636
		// 资源申请
636
		// 资源申请
637
	function getIdentity(professorId) {
637
	function getIdentity(professorId) {