|
@ -363,7 +363,7 @@ $(".subsidebar").click(function(){
|
363
|
363
|
"data":{"professorId":professorId},
|
364
|
364
|
"async": true,
|
365
|
365
|
"success":function(data){
|
366
|
|
//console.log(data);
|
|
366
|
// console.log(data);
|
367
|
367
|
if(data.data.length==0){
|
368
|
368
|
$("#infor-browse").css("display","none");
|
369
|
369
|
$(".resoubtn").css("display","none");
|
|
@ -379,9 +379,9 @@ $(".subsidebar").click(function(){
|
379
|
379
|
add='<div class="sharesrc">'
|
380
|
380
|
add+='<div class="shareshow">'
|
381
|
381
|
add+='<a class="remess" resourceId='+data.data[i].resourceId+'><img src="/images/resource/'+data.data[i].resourceId+'.jpg" width="100%" height="100%" class="resourceImg"></a>'
|
382
|
|
add+='<div class="shareopeart"><a class="sharebtn">咨询</a><a class="sharebtn applicant">申请</a></div>'
|
|
382
|
add+='<div class="shareopeart"><a class="sharebtn resourceConsult" professorId='+data.data[i]["professorId"]+'>咨询</a><a class="sharebtn applicant">申请</a></div>'
|
383
|
383
|
add+='</div>'
|
384
|
|
add+='<p>资源名称:<span class="presou">'+ data.data[i].resourceName+'</span></p>'
|
|
384
|
add+='<p>资源名称:<span class="presou consultTitleVal" resourceConsultTitle = "">'+ data.data[i].resourceName+'</span></p>'
|
385
|
385
|
add+='<p class="briefinfor">简介:'+data.data[i].supportedServices+'</p>'
|
386
|
386
|
add+='</div>'
|
387
|
387
|
$("#sharescrollbox").append(add);
|
|
@ -399,6 +399,8 @@ $(".subsidebar").click(function(){
|
399
|
399
|
var $content = $(".sharescrollbox");
|
400
|
400
|
var childcount = $content.find(".sharesrc").length;
|
401
|
401
|
Carousel(3,3, childcount, $content, $(".resounext"), $(".resouprev"));
|
|
402
|
//科研资源中点咨询
|
|
403
|
$(".introduction").find(".resourceConsult").bind("click",clickResourceConsult);
|
402
|
404
|
|
403
|
405
|
function Carousel(inde, num, childcount, obj, next, prev) {
|
404
|
406
|
next.click(function() {
|
|
@ -575,26 +577,17 @@ $(".subsidebar").click(function(){
|
575
|
577
|
}
|
576
|
578
|
});
|
577
|
579
|
|
|
580
|
//科研资源中的咨询
|
|
581
|
function clickResourceConsult(){
|
|
582
|
var professorId = $(this).attr("professorId");
|
|
583
|
ConsultApply();
|
|
584
|
$("ul.menucon").children().eq(1).addClass("clicknow");
|
|
585
|
var consultTitleVal = $(this).parent().parent().parent().find(".consultTitleVal").text();
|
|
586
|
$("#consultTitle").val("关于"+consultTitleVal+"的咨询");
|
|
587
|
$("#sendConsultBtn").on("click",sendConsultHandler);
|
|
588
|
};
|
578
|
589
|
|
579
|
|
//=====================================
|
580
|
|
//事件封装
|
581
|
|
/* function addEvent(obj,type,handler){
|
582
|
|
if(obj.addEventListener){
|
583
|
|
obj.addEventListener(type,handler,false);
|
584
|
|
}else if(obj.attachEvent){
|
585
|
|
obj.attachEvent('on'+type,handler);
|
586
|
|
}
|
587
|
|
}
|
588
|
590
|
|
589
|
|
function removeEvent(obj,type,handler){
|
590
|
|
if(obj.removeEventListener){
|
591
|
|
obj.removeEventListener(type,handler,false);
|
592
|
|
}else if(obj.detachEvent){
|
593
|
|
obj.detachEvent("on"+type,handler);
|
594
|
|
}
|
595
|
|
}*/
|
596
|
|
|
597
|
|
|
598
|
591
|
//===============点击咨询==============
|
599
|
592
|
var consultBtn = $("#consultbtn");
|
600
|
593
|
var userid = $.cookie("userid");//登陆人id====重复代码
|
|
@ -659,9 +652,6 @@ $(".subsidebar").click(function(){
|
659
|
652
|
"consultantId":userid
|
660
|
653
|
};
|
661
|
654
|
|
662
|
|
/*if(consult_type == '' || consult_title == '' || consult_content == ''){
|
663
|
|
$.MsgBox.Alert("message","请填写完整");
|
664
|
|
};*/
|
665
|
655
|
if(consult_type == ''){
|
666
|
656
|
$.MsgBox.Alert("消息","请选择联系目的");
|
667
|
657
|
}
|