li 7 年之前
父節點
當前提交
2359328298
共有 3 個文件被更改,包括 46 次插入38 次删除
  1. 2 2
      js/common.js
  2. 2 2
      js/inform.js
  3. 42 34
      js/userInforShow.js

+ 2 - 2
js/common.js

276
		success:function(data){
276
		success:function(data){
277
			console.log(data)
277
			console.log(data)
278
			if(data.success){
278
			if(data.success){
279
				if(data.unRead!=0){
280
					$(".mymessage").eq(0).find(".badge").text(data.data);
279
				if(data.data.unRead!=0){
280
					$(".mymessage").eq(0).find(".badge").text(data.data.unRead);
281
				}else{
281
				}else{
282
					$(".mymessage").eq(0).find(".badge").text("");
282
					$(".mymessage").eq(0).find(".badge").text("");
283
				}
283
				}

+ 2 - 2
js/inform.js

93
			traditional: true, //传数组必须加这个
93
			traditional: true, //传数组必须加这个
94
			success: function(data) {
94
			success: function(data) {
95
				if(data.success) {
95
				if(data.success) {
96
					console.log(JSON.stringify(data))
96
					$(".mymessage").eq(0).find(".badge").text("")
97
				}
97
				}
98

98

99
			},
99
			},
108
		if(dobj.opType == 0) {
108
		if(dobj.opType == 0) {
109
			ourl = "userInforShow.html?professorId=" + dobj.uid;
109
			ourl = "userInforShow.html?professorId=" + dobj.uid;
110
		} else if(dobj.opType == 1) {
110
		} else if(dobj.opType == 1) {
111
			ourl = 'userInforShow.html?professorId=' + dobj.pid + '&flag=1'
111
			ourl = 'userInforShow.html?professorId=' + dobj.pid + '&flag='+dobj.cnt.substring(dobj.cnt.indexOf(">") + 1, dobj.cnt.lastIndexOf("<"))
112
		} else if(dobj.opType == 2) {
112
		} else if(dobj.opType == 2) {
113
			$.ajax({
113
			$.ajax({
114
				url: "/ajax/article/query?articleId="+dobj.pid
114
				url: "/ajax/article/query?articleId="+dobj.pid

+ 42 - 34
js/userInforShow.js

2
	loginStatus();//判断个人是否登录
2
	loginStatus();//判断个人是否登录
3
	var userid = $.cookie("userid");
3
	var userid = $.cookie("userid");
4
	var professorId = GetQueryString("professorId");
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
	if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){
45
	if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){
6
	 	location.href="http://" + window.location.host + "/e/p.html?id="+professorId;
46
	 	location.href="http://" + window.location.host + "/e/p.html?id="+professorId;
7
	}
47
	}
206
		//点击每个研究方向弹出研究方向详情窗口
246
		//点击每个研究方向弹出研究方向详情窗口
207
		$("#researchAreaShow").on("click", ".favorBox,.favorCount", function() {
247
		$("#researchAreaShow").on("click", ".favorBox,.favorCount", function() {
208
			var cap = $(this).attr("caption");
248
			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
			});
249
			researchAlert(cap)
243
		});
250
		});
251
		
244
		//关闭按钮
252
		//关闭按钮
245
		$("#workclose").click(function() {
253
		$("#workclose").click(function() {
246
			$(".resAreaCover").fadeOut();
254
			$(".resAreaCover").fadeOut();