|
@ -2,6 +2,46 @@ $(function() {
|
2
|
2
|
loginStatus();//判断个人是否登录
|
3
|
3
|
var userid = $.cookie("userid");
|
4
|
4
|
var professorId = GetQueryString("professorId");
|
|
5
|
if(GetQueryString("flag")) {
|
|
6
|
|
|
7
|
researchAlert(GetQueryString("flag"))
|
|
8
|
}
|
|
9
|
function researchAlert(cap){
|
|
10
|
$.ajax({
|
|
11
|
url: "/ajax/researchAreaLog/ql",
|
|
12
|
dataType: 'json', //数据格式类型
|
|
13
|
type: 'GET', //http请求类型
|
|
14
|
timeout: 10000, //超时设置
|
|
15
|
data: {
|
|
16
|
"professorId": professorId,
|
|
17
|
'caption': cap,
|
|
18
|
"rows": 1000
|
|
19
|
},
|
|
20
|
success: function(data) {
|
|
21
|
console.log(data)
|
|
22
|
if(data.success) {
|
|
23
|
$("#areaCon").html("");
|
|
24
|
var $info = data.data;
|
|
25
|
$("#subArea").text(cap);
|
|
26
|
$(".resAreaCover").fadeIn();
|
|
27
|
$(".resAreaTip").addClass("displayNone")
|
|
28
|
$(".resAreaCon").show()
|
|
29
|
if($info.length == 0) {
|
|
30
|
$(".resAreaCon").hide();
|
|
31
|
$(".resAreaTip").removeClass("displayNone")
|
|
32
|
return;
|
|
33
|
}
|
|
34
|
for(var i = 0; i < $info.length; i++) {
|
|
35
|
var liItem = document.createElement("li");
|
|
36
|
document.getElementById("areaCon").appendChild(liItem);
|
|
37
|
detailPro($info[i],liItem);
|
|
38
|
}
|
|
39
|
$("body").css("position", "fixed");
|
|
40
|
}
|
|
41
|
},
|
|
42
|
error: function() {}
|
|
43
|
});
|
|
44
|
}
|
5
|
45
|
if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){
|
6
|
46
|
location.href="http://" + window.location.host + "/e/p.html?id="+professorId;
|
7
|
47
|
}
|
|
@ -27,8 +67,8 @@ $(function() {
|
27
|
67
|
|
28
|
68
|
ifcollectionAbout(professorId,$(".goSpan").find(".attenSpan"), 1)
|
29
|
69
|
$(".goSpan").show();
|
30
|
|
$(".moreNavUl li.attentType").hide();
|
31
|
|
$(".moreNavUl li.attendMy").addClass("liNow").text("关注他的人");
|
|
70
|
$(".moreBuUl li.attentType").hide();
|
|
71
|
$(".moreBuUl li.attendMy").addClass("liNow").text("关注他的人");
|
32
|
72
|
$("#item8user>.coninfobox").eq(9).show().siblings().hide();
|
33
|
73
|
watchType=0;
|
34
|
74
|
attentMy();
|
|
@ -38,7 +78,7 @@ $(function() {
|
38
|
78
|
}
|
39
|
79
|
$(document).bind("click",function(e){
|
40
|
80
|
var target = $(e.target);
|
41
|
|
if(target.closest(".moreNavUl>li.rightbtn").length == 0){
|
|
81
|
if(target.closest(".moreBuUl>li.rightbtn").length == 0){
|
42
|
82
|
$(".table-drop").hide();
|
43
|
83
|
}
|
44
|
84
|
})
|
|
@ -49,39 +89,49 @@ $(function() {
|
49
|
89
|
$(".navconBox>.mainNavUl").on("click","li:not('.rightbtn')",function(){
|
50
|
90
|
$(".moreNav").hide();
|
51
|
91
|
})
|
52
|
|
$(".navconBox>.mainNavUl").on("click","li.rightbtn",function(){
|
53
|
|
$(".moreNav").show();
|
|
92
|
$(".navconBox>.mainNavUl").on("click","li.wenda",function(){//问答
|
|
93
|
$(".wendaNav").show();
|
|
94
|
})
|
|
95
|
$(".navconBox>.mainNavUl").on("click","li.rightbtn",function(){//更多
|
|
96
|
$(".moreBu").show();
|
|
97
|
$(".wendaNav").hide();
|
54
|
98
|
})
|
55
|
|
$(".moreNavUl").on("click","li:not('.rightbtn')",function(){//获取关注对象类型标志
|
|
99
|
$(".wendaUl").on("click","li",function(){//获取关注对象类型标志
|
56
|
100
|
watchType=$(this).attr("data-num");
|
57
|
|
console.log($(".moreNavUl li:not('.rightbtn')").index(this))
|
58
|
|
$("#item8user>.coninfobox").eq($(".moreNavUl li:not('.rightbtn')").index(this)).show().siblings().hide();
|
|
101
|
console.log($(".wendaUl li").index(this))
|
|
102
|
$("#item6user>.coninfobox").eq($(".wendaUl li").index(this)).show().siblings().hide();
|
|
103
|
|
|
104
|
})
|
|
105
|
$(".moreBuUl").on("click","li:not('.rightbtn')",function(){//获取关注对象类型标志
|
|
106
|
watchType=$(this).attr("data-num");
|
|
107
|
console.log($(".moreBuUl li:not('.rightbtn')").index(this))
|
|
108
|
$("#item8user>.coninfobox").eq($(".moreBuUl li:not('.rightbtn')").index(this)).show().siblings().hide();
|
59
|
109
|
if(watchType==0){
|
60
|
110
|
attentMy()
|
61
|
111
|
}else{
|
62
|
112
|
collAttent(10,1,true);
|
63
|
113
|
}
|
64
|
114
|
})
|
65
|
|
$(".navconBox .moreNav>.moreNavUl").on("click","li.rightbtn",function(){
|
|
115
|
$(".navconBox .moreBu>.moreBuUl").on("click","li.rightbtn",function(){
|
66
|
116
|
$(this).find(".table-drop").show();
|
67
|
117
|
})
|
68
|
118
|
$(".table-drop").on("click","li",function(){
|
69
|
|
$(".navconBox .moreNav>.moreNavUl>.rightbtn").find("span").html($(this).text());
|
|
119
|
$(".navconBox .moreBu>.moreBuUl>.rightbtn").find("span").html($(this).text());
|
70
|
120
|
$(".table-drop").fadeOut(1000);
|
71
|
121
|
})
|
72
|
122
|
|
73
|
123
|
$("#myAttends").on("click",function(){
|
74
|
124
|
$(".mainNavUl li.rightbtn").addClass("liNow").siblings().removeClass("liNow");
|
75
|
|
$(".navconBox .moreNav").show();
|
|
125
|
$(".navconBox .moreBu").show();
|
76
|
126
|
$("#item8user").show().siblings().hide();
|
77
|
|
$(".moreNavUl li.attentType").eq(0).addClass("liNow").siblings().removeClass("liNow");
|
|
127
|
$(".moreBuUl li.attentType").eq(0).addClass("liNow").siblings().removeClass("liNow");
|
78
|
128
|
$("#item8user>.coninfobox").eq(0).show().siblings().hide();
|
79
|
129
|
})
|
80
|
130
|
$("#attendmyGo").on("click",function(){
|
81
|
131
|
$(".mainNavUl li.rightbtn").addClass("liNow").siblings().removeClass("liNow");
|
82
|
|
$(".navconBox .moreNav").show();
|
|
132
|
$(".navconBox .moreBu").show();
|
83
|
133
|
$("#item8user").show().siblings().hide();
|
84
|
|
$(".moreNavUl li.attendMy").addClass("liNow").siblings().removeClass("liNow");
|
|
134
|
$(".moreBuUl li.attendMy").addClass("liNow").siblings().removeClass("liNow");
|
85
|
135
|
$("#item8user>.coninfobox").eq(9).show().siblings().hide();
|
86
|
136
|
watchType=0
|
87
|
137
|
attentMy();
|
|
@ -206,41 +256,9 @@ $(function() {
|
206
|
256
|
//点击每个研究方向弹出研究方向详情窗口
|
207
|
257
|
$("#researchAreaShow").on("click", ".favorBox,.favorCount", function() {
|
208
|
258
|
var cap = $(this).attr("caption");
|
209
|
|
$.ajax({
|
210
|
|
url: "/ajax/researchAreaLog/ql",
|
211
|
|
dataType: 'json', //数据格式类型
|
212
|
|
type: 'GET', //http请求类型
|
213
|
|
timeout: 10000, //超时设置
|
214
|
|
data: {
|
215
|
|
"professorId": professorId,
|
216
|
|
'caption': cap,
|
217
|
|
"rows": 1000
|
218
|
|
},
|
219
|
|
success: function(data) {
|
220
|
|
console.log(data)
|
221
|
|
if(data.success) {
|
222
|
|
$("#areaCon").html("");
|
223
|
|
var $info = data.data;
|
224
|
|
$("#subArea").text(cap);
|
225
|
|
$(".resAreaCover").fadeIn();
|
226
|
|
$(".resAreaTip").addClass("displayNone")
|
227
|
|
$(".resAreaCon").show()
|
228
|
|
if($info.length == 0) {
|
229
|
|
$(".resAreaCon").hide();
|
230
|
|
$(".resAreaTip").removeClass("displayNone")
|
231
|
|
return;
|
232
|
|
}
|
233
|
|
for(var i = 0; i < $info.length; i++) {
|
234
|
|
var liItem = document.createElement("li");
|
235
|
|
document.getElementById("areaCon").appendChild(liItem);
|
236
|
|
detailPro($info[i],liItem);
|
237
|
|
}
|
238
|
|
$("body").css("position", "fixed");
|
239
|
|
}
|
240
|
|
},
|
241
|
|
error: function() {}
|
242
|
|
});
|
|
259
|
researchAlert(cap)
|
243
|
260
|
});
|
|
261
|
|
244
|
262
|
//关闭按钮
|
245
|
263
|
$("#workclose").click(function() {
|
246
|
264
|
$(".resAreaCover").fadeOut();
|