Pārlūkot izejas kodu

修复关注团队bug

lyn7568 5 gadi atpakaļ
vecāks
revīzija
cf1aa43ec7
7 mainītis faili ar 236 papildinājumiem un 223 dzēšanām
  1. 12 7
      e/2.html
  2. 32 46
      e/3.html
  3. 176 155
      js/public/genCom.js
  4. 3 3
      js/teamInforShow.js
  5. 5 5
      js/unPatentShow.js
  6. 6 5
      js/userInforShow.js
  7. 2 2
      userInforShow.html

+ 12 - 7
e/2.html

@ -116,7 +116,7 @@
116 116
			<div class="seeMore displayNone" id="seeMoreResource"><em>查看全部 <span id="resourceNum">0</span>个</em></div>
117 117
		</div>
118 118
		<div class="mainbox" style="cursor: pointer;" id="goCmpBrief">
119
			<div class="infocontit mui-clearfix">团队介绍 <em></em></div>
119
			<div class="infocontit mui-clearfix">团队介绍 </div>
120 120
			<div class="infocon">
121 121
				<span class="breifinfo" id="breifinfo" style="display: block">
122 122
					<p id="breifinfo"></p>
@ -1378,6 +1378,15 @@
1378 1378
					var dataStr = data.data;
1379 1379
					var strAdd = '';
1380 1380
					if (dataStr.length > 0) {
1381
						if (dataStr[0].subject == undefined) {
1382
							$('.dis').css('display', 'none')
1383
						}
1384
						if (dataStr[0].subject) {
1385
							var subject = '应用领域:' +dataStr[0].subject
1386
						}
1387
1388
1389
1381 1390
						document.getElementById('proUnPatent').parentNode.parentNode.classList.remove("displayNone");
1382 1391
						var li = document.createElement("li");
1383 1392
						li.setAttribute("data-id", dataStr[0].id);
@ -1386,14 +1395,12 @@
1386 1395
							'<div class="madiaHead paperHead"></div>' +
1387 1396
							'<div class="madiaInfo OmadiaInfo">' +
1388 1397
							'<p class="ellipsisSty-2 h1Font">' + dataStr[0].name + '</p>' +
1389
							'<p class="ellipsisSty h2Font dis">' + dataStr[0].applyDescp + '</p>' +
1398
							'<p class="ellipsisSty h2Font dis">' + subject + '</p>' +
1390 1399
							//.substring(0, dataStr[i].authors.length - 1)    
1391 1400
							'</div>' +
1392 1401
							'</div>'
1393 1402
						document.getElementById('proUnPatent').appendChild(li);
1394
						if (dataStr[0].applyDescp == undefined) {
1395
							$('.dis').css('display', 'none')
1396
						}
1403
						
1397 1404
						$("#" + obj).append(strAdd)
1398 1405
						console.log(dataStr.length)
1399 1406
						if (dataStr.length <= 1) {
@ -1433,8 +1440,6 @@
1433 1440
						$('#forumNum').parent().parent().css('display', 'none')
1434 1441
					}
1435 1442
					$('#forumNum').text(res.data.total)
1436
1437
1438 1443
				})
1439 1444
			}
1440 1445

+ 32 - 46
e/3.html

@ -138,7 +138,7 @@
138 138
                </ul>
139 139
            </div>
140 140
            <div class="thumbBlock">
141
                <span class="thumbBtn">赞 <span id="snum"></span></span><!-- thumbedBtn 已赞 201-->
141
                <!-- <span class="thumbBtn">赞 <span id="snum"></span></span> -->
142 142
            </div>
143 143
144 144
            <div class="madiaBlock displayNone" style="padding-bottom:50px;" id="leword">
@ -314,6 +314,8 @@
314 314
315 315
                            paperHtml(data.data); //非专列表渲染
316 316
                            getpatentAuthors(data.data.id) //研究者数据渲染
317
                            relevantarticalList(data.data.orgId) //企业
318
                           
317 319
                        }
318 320
                    },
319 321
                    error: function (e) {
@ -398,14 +400,13 @@
398 400
399 401
            //获取研究人数据
400 402
            function getpatentAuthors(stritrm) {
401
                relevantarticalList(stritrm) // 成果id
403
                // 成果id
402 404
403 405
                $.ajax({
404 406
                    "url": "/ajax/resResult/researcher",
405 407
                    "type": "GET",
406 408
                    "success": function (data) {
407 409
                        if (data.success) {
408
409 410
                            if (data.data.length > 0) {
410 411
                                for (var i = 0; i < data.data.length; i++) {
411 412
                                    var authTy = "",
@ -524,56 +525,41 @@
524 525
525 526
526 527
527
            //机构成果
528
            //研究机构
528 529
            function relevantarticalList(id) {
529 530
                $.ajax({
530
                    "url": "/ajax/resResult/qm",
531
                    "url": "/ajax/org/"+id,
531 532
                    "type": "GET",
532 533
                    "dataType": "json",
533
                    "data": {
534
                        "id": id
535
                    },
534
                  
536 535
                    "async": "false",
537
                    "traditional": true, //传数组必须加这个
538 536
                    "success": function (data) {
537
                        console.log(data)
539 538
                        if (data.success && data.data != "") {
540
                            document.getElementById("researchOrganization").parentNode.parentNode
541
                                .classList.remove("displayNone");
542
                            document.getElementById("researchOrganization").innerHTML = "";
543
                            var StrData = data.data
544
                            var lengthT;
545
546
547
                            if (data.data.length > 5) {
548
                                lengthT = 5;
549
                            } else {
550
                                lengthT = data.data.length
551
                            }
552
                            for (var i = 0; i < lengthT; i++) {
553
554
                                var imgL = "../images/default-artical.jpg";
555
556
                                var add = document.createElement("li");
557
                                add.className =
558
                                    "mui-table-view-cell flexCenter OflexCenter";
559
                                add.setAttribute("data-id", StrData[i].articleId);
560
                                var itemlist =
561
                                    '<div class="madiaHead artHead" style="background-image:url(' +
562
                                    imgL + ')"></div>';
563
                                itemlist += '<div class="madiaInfo OmadiaInfo">';
564
                                itemlist +=
565
                                    '<p class="ellipsisSty-2 h1Font" id="usertitle">' +
566
                                    StrData[i].orgId + '</p>';
567
                                itemlist +=
568
                                    '<p><span class="h2Font" style="margin-right:10px">' +
569
                                    '</span><span class="time">' + commenTime(StrData[i]
570
                                        .createTime) + '</span></p>';
571
                                itemlist += '</div>';
572
573
                                add.innerHTML = itemlist;
574
                                document.getElementById("researchOrganization").appendChild(add);
575
                            }
576
                        }
539
					                            document.getElementById("researchOrganization").parentNode
540
					                                .classList.remove("displayNone");
541
					                            document.getElementById("researchOrganization").innerHTML = "";
542
					                            var StrData = data.data
543
												// console.log(JSON.stringify(StrData.name))
544
					                                var imgL = "../images/default-artical.jpg";
545
					                                var add = document.createElement("li");
546
					                                add.className =
547
					                                    "mui-table-view-cell flexCenter OflexCenter";
548
					                                var itemlist =
549
					                                    '<div class="madiaHead artHead" style="background-image:url(' +
550
					                                    imgL + ')"></div>';
551
					                                itemlist += '<div class="madiaInfo OmadiaInfo">';
552
					                                itemlist +=
553
					                                    '<p class="ellipsisSty-2 h1Font" id="usertitle">' +
554
					                                    StrData.name + '</p>';
555
					                                itemlist +=
556
					                                    '<p><span class="h2Font" style="margin-right:10px">' +
557
					                                    '</span><span class="time">' + commenTime(StrData
558
					                                        .createTime) + '</span></p>';
559
					                                itemlist += '</div>';
560
					                                add.innerHTML = itemlist;
561
					                                document.getElementById("researchOrganization").appendChild(add);
562
					                        }
577 563
                    }
578 564
579 565
                });

+ 176 - 155
js/public/genCom.js

@ -1,92 +1,93 @@
1

2
$(document).ready(function() {
1
$(document).ready(function () {
3 2
	$(".unlogin").show();
4 3
	$(".onlogin").hide();
5 4

6 5
	var footerHeight = $("footer").outerHeight(true);
7 6
	$('#container').css("padding-bottom", footerHeight + "px");
8
	$(".footer_tools").css("bottom", (footerHeight+10) + "px");
9
	$(window).resize(function() {//窗口大小变更事件
7
	$(".footer_tools").css("bottom", (footerHeight + 10) + "px");
8
	$(window).resize(function () { //窗口大小变更事件
10 9
		footerHeight = $("footer").outerHeight(true);
11 10
		$('#container').css("padding-bottom", footerHeight + "px");
12 11
	});
13 12
	//底部企业入驻
14 13
	var orgid = $.cookie('orgId');
15
	$("#cmpSet2").on("click", function() {
16
		if(orgid && orgid != "null" && orgid != null) {
14
	$("#cmpSet2").on("click", function () {
15
		if (orgid && orgid != "null" && orgid != null) {
17 16
			location.href = "cmp-portal/cmp-needList.html"
18 17
		} else {
19 18
			location.href = "cmp-portal/cmp-settled-reg.html"
20 19
		}
21 20
	})
22
	$("#cmpSet3").on("click", function() {
23
		if(orgid && orgid != "null" && orgid != null) {
21
	$("#cmpSet3").on("click", function () {
22
		if (orgid && orgid != "null" && orgid != null) {
24 23
			location.href = "/cmp-portal/cmp-needList.html"
25 24
		} else {
26 25
			location.href = "/cmp-portal/cmp-settled-reg.html"
27 26
		}
28 27
	})
29
	
28

30 29
	//搜索框跳转页面
31
	$("#search").on("click", function() {
30
	$("#search").on("click", function () {
32 31
		var searchContent = $.trim($("#searchContent").val());
33
		if(searchContent) {
32
		if (searchContent) {
34 33
			wlog("kw", searchContent)
35
			setTimeout(function(){location.href = "searchNew.html?searchContent=" + encodeURI(searchContent)},300);
34
			setTimeout(function () {
35
				location.href = "searchNew.html?searchContent=" + encodeURI(searchContent)
36
			}, 300);
36 37
		}
37 38
	});
38 39
	//enter绑定时间
39
	$("#searchContent").keydown(function(e) {
40
		if(e.which == 13) {
40
	$("#searchContent").keydown(function (e) {
41
		if (e.which == 13) {
41 42
			var searchContent = $.trim($("#searchContent").val());
42
			if(searchContent)
43
			location.href = "searchNew.html?searchContent=" + encodeURI(searchContent);
43
			if (searchContent)
44
				location.href = "searchNew.html?searchContent=" + encodeURI(searchContent);
44 45
		}
45
	
46

46 47
	})
47
	$("#hsearchContent").keydown(function(e) {
48
		if(e.which == 13) {
48
	$("#hsearchContent").keydown(function (e) {
49
		if (e.which == 13) {
49 50
			var searchContent = $.trim($("#hsearchContent").val());
50
			if(!searchContent) {
51
			if (!searchContent) {
51 52
				return;
52 53
			}
53
			if($(this).siblings()[0].id=="searchh") {
54
			if ($(this).siblings()[0].id == "searchh") {
54 55
				location.href = "/searchNew.html?searchContent=" + encodeURI(searchContent);
55 56
				return;
56 57
			}
57 58
			location.href = "searchNew.html?searchContent=" + encodeURI(searchContent);
58 59
		}
59 60
	})
60
	
61
	$("#hsearch").on("click", function() {
61

62
	$("#hsearch").on("click", function () {
62 63
		var searchContent = $.trim($("#hsearchContent").val());
63
		if(searchContent) {
64
		if (searchContent) {
64 65
			wlog("kw", searchContent)
65
			setTimeout(function(){
66
			setTimeout(function () {
66 67
				location.href = "searchNew.html?searchContent=" + encodeURI(searchContent);
67
			},300)
68
			}, 300)
68 69
		}
69 70
	});
70
	$("#searchh").on("click", function() {
71
	$("#searchh").on("click", function () {
71 72
		var searchContent = $.trim($("#hsearchContent").val());
72
		if(searchContent)
73
		setTimeout(function(){
74
			location.href = "/searchNew.html?searchContent=" + encodeURI(searchContent);
75
		},300)
76
		
73
		if (searchContent)
74
			setTimeout(function () {
75
				location.href = "/searchNew.html?searchContent=" + encodeURI(searchContent);
76
			}, 300)
77

77 78
	});
78
	
79

79 80
	/*向下滚动时,header背景变半透明*/
80
	$(document).scroll(function() {
81
	$(document).scroll(function () {
81 82
		var top = $(document).scrollTop();
82
	
83
		if(top == 0) {
83

84
		if (top == 0) {
84 85
			$(".navheader").removeClass("navhdown");
85 86
		} else {
86 87
			$(".navheader").addClass("navhdown");
87 88
		}
88
	
89
		if(top >= 300) {
89

90
		if (top >= 300) {
90 91
			$(".content-left").css({
91 92
				"position": "fixed",
92 93
				"top": "80px"
@ -96,15 +97,15 @@ $(document).ready(function() {
96 97
				"position": "static"
97 98
			})
98 99
		}
99
	
100

100 101
	});
101 102
	/*选择省份*/
102
	$(document).on("click", "#Province li a", function() {
103
	$(document).on("click", "#Province li a", function () {
103 104
		var aVal = $(this).text();
104 105
		$(this).parent().parent().parent().find('.mr_show').text(aVal);
105 106
		$(this).parent().parent().parent().find('input[name=cho_Province]').val(aVal);
106
	
107
		if($("#oprovince").text() == "请选择省/直辖市") {
107

108
		if ($("#oprovince").text() == "请选择省/直辖市") {
108 109
			$("#oprovince").removeClass("mr_select");
109 110
			$("#ocity").removeClass("mr_select");
110 111
		} else {
@ -113,20 +114,20 @@ $(document).ready(function() {
113 114
		}
114 115
	});
115 116
	/*选择城市填充js	*/
116
	$(document).on("click", "#City li a", function() {
117
	$(document).on("click", "#City li a", function () {
117 118
		var aVal = $(this).text();
118 119
		$(this).parent().parent().parent().find('.mr_show').text(aVal);
119 120
		$(this).parent().parent().parent().find('input[name=cho_City]').val(aVal);
120
		if($("#ocity").text() == "请选择城市") {
121
		if ($("#ocity").text() == "请选择城市") {
121 122
			$("#ocity").removeClass("mr_select");
122 123
		} else {
123 124
			$("#ocity").addClass("mr_select");
124 125
		}
125 126
	});
126 127
	/*多行文本框样式(带有限制数字)模拟focus效果*/
127
	$(".msgContbox textarea").focus(function() {
128
	$(".msgContbox textarea").focus(function () {
128 129
		$(this).parent().css("border-color", "#ff9900");
129
	}).blur(function() {
130
	}).blur(function () {
130 131
		$(this).parent().css("border-color", "#E5E5E5");
131 132
	})
132 133
});
@ -142,19 +143,33 @@ function exit() {
142 143
	$.cookie('userType', null);
143 144
	location.href = "index.html"
144 145
}
146

145 147
function exitStaticize() {
146
	$.cookie('userid', null,{ path: '/' });
147
	$.cookie('userAuth', null,{ path: '/' });
148
	$.cookie('userEmail', null,{ path: '/' });
149
	$.cookie('userMobilePhone', null,{ path: '/' });
150
	$.cookie('userName', null,{ path: '/' });
151
	$.cookie('userType', null,{ path: '/' });
148
	$.cookie('userid', null, {
149
		path: '/'
150
	});
151
	$.cookie('userAuth', null, {
152
		path: '/'
153
	});
154
	$.cookie('userEmail', null, {
155
		path: '/'
156
	});
157
	$.cookie('userMobilePhone', null, {
158
		path: '/'
159
	});
160
	$.cookie('userName', null, {
161
		path: '/'
162
	});
163
	$.cookie('userType', null, {
164
		path: '/'
165
	});
152 166
	location.href = "/index.html"
153 167
}
168

154 169
function valUser() {
155 170
	var userid = $.cookie('userid');
156 171
	var userAuth = $.cookie('userAuth');
157
	if(userid == undefined || userid.length == 0 || userid == "null" || userAuth == false) {
172
	if (userid == undefined || userid.length == 0 || userid == "null" || userAuth == false) {
158 173
		location.href = "login.html";
159 174
	}
160 175
}
@ -163,128 +178,135 @@ function loginStatus() {
163 178
	userid = $.cookie('userid');
164 179
	userAuth = $.cookie('userAuth');
165 180
	authentication = $.cookie('authentication');
166
	if(userid && userid != "null" && userid != null) {
167
		if(userAuth == "false" && authentication == "null") {
181
	if (userid && userid != "null" && userid != null) {
182
		if (userAuth == "false" && authentication == "null") {
168 183
			location.href = "loginInviteFirst.html";
169 184
		}
170
		if(userAuth == "true" && authentication == "null") {
185
		if (userAuth == "true" && authentication == "null") {
171 186
			location.href = "fillinfo-select.html";
172 187
		}
173
		if(userAuth == "true" && authentication != "null") {
188
		if (userAuth == "true" && authentication != "null") {
174 189
			$(".onlogin").show();
175 190
			$(".unlogin").hide();
176 191
			$(".portrait-p").attr("src", "/images/head/" + userid + "_m.jpg");
177
			$(".portrait-p").load(function() { //判断图片是否加载,加载不成功默认有默认的图像									
192
			$(".portrait-p").load(function () { //判断图片是否加载,加载不成功默认有默认的图像									
178 193
				})
179
				.error(function() {
194
				.error(function () {
180 195
					$(".portrait-p").attr("src", "/images/default-photo.jpg");
181 196
				});
182 197
			unReadedCount(userid);
183 198
			unInformCount(userid)
184 199
		}
185
		$(".portrait-p").on("click",function(){
186
			location.href="userInforShow.html?professorId="+userid;
200
		$(".portrait-p").on("click", function () {
201
			location.href = "userInforShow.html?professorId=" + userid;
187 202
		})
188
		$(".onlogin").on("click",".goMyInf",function(){
189
			$(this).attr("href","userInforShow.html?professorId="+userid)
203
		$(".onlogin").on("click", ".goMyInf", function () {
204
			$(this).attr("href", "userInforShow.html?professorId=" + userid)
190 205
		})
191 206
	} else {
192 207
		$(".unlogin").show();
193 208
		$(".onlogin").hide();
194 209
	}
195 210
}
211

196 212
function loginYesOrNo() {
197 213
	userid = $.cookie('userid');
198 214
	userAuth = $.cookie('userAuth');
199 215
	authentication = $.cookie('authentication');
200
	if(userid && userid != "null" && userid != null) {
201
		if(userAuth == "false" && authentication == "null") {
216
	if (userid && userid != "null" && userid != null) {
217
		if (userAuth == "false" && authentication == "null") {
202 218
			location.href = "/loginInviteFirst.html";
203 219
		}
204
		if(userAuth == "true" && authentication == "null") {
220
		if (userAuth == "true" && authentication == "null") {
205 221
			location.href = "/fillinfo-select.html";
206 222
		}
207
		if(userAuth == "true" && authentication != "null") {
223
		if (userAuth == "true" && authentication != "null") {
208 224
			$(".onlogin").show();
209 225
			$(".unlogin").hide();
210 226
			$(".portrait-p").attr("src", "/images/head/" + userid + "_m.jpg");
211
			$(".portrait-p").load(function() { //判断图片是否加载,加载不成功默认有默认的图像									
227
			$(".portrait-p").load(function () { //判断图片是否加载,加载不成功默认有默认的图像									
212 228
				})
213
				.error(function() {
229
				.error(function () {
214 230
					$(".portrait-p").attr("src", "/images/default-photo.jpg");
215 231
				});
216 232
			unReadedCount(userid);
217 233
		}
218
		$(".portrait-p").on("click",function(){
219
			location.href="/userInforShow.html?professorId="+userid;
234
		$(".portrait-p").on("click", function () {
235
			location.href = "/userInforShow.html?professorId=" + userid;
220 236
		})
221
		$(".onlogin").on("click",".goMyInf",function(){
222
			$(this).attr("href","/userInforShow.html?professorId="+userid)
237
		$(".onlogin").on("click", ".goMyInf", function () {
238
			$(this).attr("href", "/userInforShow.html?professorId=" + userid)
223 239
		})
224 240
	} else {
225 241
		$(".unlogin").show();
226 242
		$(".onlogin").hide();
227 243
	}
228 244
}
229
function unReadedCount(id){//查询指定用户的未读消息数量
245

246
function unReadedCount(id) { //查询指定用户的未读消息数量
230 247
	$.ajax({
231
		type:"get",
232
		url:"/ajax/webMsg/unReadedCount",
233
		async:true,
234
		data:{"id":id},
235
		success:function(data){
248
		type: "get",
249
		url: "/ajax/webMsg/unReadedCount",
250
		async: true,
251
		data: {
252
			"id": id
253
		},
254
		success: function (data) {
236 255
			console.log(data)
237
			if(data.success){
238
				platMessageTotal(id,data.data)
256
			if (data.success) {
257
				platMessageTotal(id, data.data)
239 258
			}
240
			
259

241 260
		}
242 261
	});
243 262
}
244
function unInformCount(id){//查询指定用户的未读通知数量
263

264
function unInformCount(id) { //查询指定用户的未读通知数量
245 265
	$.ajax({
246
		type:"get",
247
		url:"/ajax/notify/idx",
248
		async:true,
249
		data:{"id":id},
250
		success:function(data){
266
		type: "get",
267
		url: "/ajax/notify/idx",
268
		async: true,
269
		data: {
270
			"id": id
271
		},
272
		success: function (data) {
251 273
			console.log(data)
252
			if(data.success && data.data){
253
				if(data.data.unRead!=0){
274
			if (data.success && data.data) {
275
				if (data.data.unRead != 0) {
254 276
					$(".myinform").find(".badge").text(data.data.unRead);
255
				}else{
277
				} else {
256 278
					$(".myinform").find(".badge").text("");
257 279
				}
258 280
			}
259
			
281

260 282
		}
261 283
	});
262 284
}
263 285

264
function platMessageTotal(id,num) {
286
function platMessageTotal(id, num) {
265 287
	$.ajax({
266 288
		url: "/ajax/platform/msg/unread",
267 289
		type: "GET",
268 290
		timeout: 10000,
269 291
		dataType: "json",
270
		traditional:true,
271
		data:{
292
		traditional: true,
293
		data: {
272 294
			provider: id
273 295
		},
274
		success: function(data) {
296
		success: function (data) {
275 297
			console.log(data)
276
			if(data.success) {
277
			  if(data.data) {
278
				  console.log(data.data +num)
279
				if(data.data + num !=0){
280
					$(".mymessage").find(".badge").text(data.data + num);
281
				}else{
282
					$(".mymessage").find(".badge").text("");
298
			if (data.success) {
299
				if (data.data) {
300
					console.log(data.data + num)
301
					if (data.data + num != 0) {
302
						$(".mymessage").find(".badge").text(data.data + num);
303
					} else {
304
						$(".mymessage").find(".badge").text("");
305
					}
283 306
				}
284
			  }                        
285 307
			}
286 308
		},
287
		error: function() {
309
		error: function () {
288 310
			$.MsgBox.Alert('提示', '链接服务器超时')
289 311
		}
290 312
	})
@ -292,19 +314,19 @@ function platMessageTotal(id,num) {
292 314
//轮播滚动函数
293 315
function Carousel(inde, num, show, childcount, obj, next, prev) {
294 316
	var tapnum = 0; //按钮可点击次数
295
	if(childcount > num) {
317
	if (childcount > num) {
296 318
		next.css("display", "block");
297 319
		prev.css("display", "none");
298 320
	} else {
299 321
		next.css("display", "none");
300 322
		prev.css("display", "none");
301 323
	}
302
	next.click(function() {
303
		if(!obj.is(":animated")) {
304
			if(num < childcount) {
324
	next.click(function () {
325
		if (!obj.is(":animated")) {
326
			if (num < childcount) {
305 327
				tapnum++;
306 328
				prev.css("display", "block");
307
				if(tapnum == childcount - show) {
329
				if (tapnum == childcount - show) {
308 330
					next.css("display", "none");
309 331

310 332
				}
@ -315,13 +337,13 @@ function Carousel(inde, num, show, childcount, obj, next, prev) {
315 337
			}
316 338
		}
317 339
	});
318
	prev.click(function() {
340
	prev.click(function () {
319 341

320
		if(!obj.is(":animated")) {
321
			if(num > inde) {
342
		if (!obj.is(":animated")) {
343
			if (num > inde) {
322 344
				tapnum--;
323 345
				next.css("display", "block");
324
				if(tapnum == 0) {
346
				if (tapnum == 0) {
325 347
					prev.css("display", "none");
326 348
				}
327 349
				num--;
@ -334,8 +356,8 @@ function Carousel(inde, num, show, childcount, obj, next, prev) {
334 356
}
335 357

336 358
/*判断是否收藏资源文章或者是否关注专家*/
337
function ifcollectionAbout(watchObject, sel,num) {
338
	var that=sel;
359
function ifcollectionAbout(watchObject, sel, num) {
360
	var that = sel;
339 361
	$.ajax('/ajax/watch/hasWatch', {
340 362
		data: {
341 363
			"professorId": userid,
@ -345,9 +367,9 @@ function ifcollectionAbout(watchObject, sel,num) {
345 367
		type: 'get', //http请求类型
346 368
		timeout: 10000,
347 369
		async: false,
348
		success: function(data) {
349
			if(data.success && data.data != null) {
350
				if(num == "1" || num == "6" || num == "13") { //已关注专家
370
		success: function (data) {
371
			if (data.success && data.data != null) {
372
				if (num == "1" || num == "6" || num == "12") { //已关注专家
351 373
					$(that).addClass("attenedSpan");
352 374
					$(that).text("已关注");
353 375
				} else { //已收藏资源或文章
@ -355,38 +377,38 @@ function ifcollectionAbout(watchObject, sel,num) {
355 377
					$(that).addClass("icon-collected");
356 378
				}
357 379
			} else {
358
				if(num == "1" || num == "6" || num == "13") { //关注专家
380
				if (num == "1" || num == "6" || num == "12") { //关注专家
359 381
					$(that).removeClass("attenedSpan");
360 382
					$(that).text("关注");
361 383
				} else { //收藏资源或文章
362 384
					$(that).addClass("icon-collect");
363
					$(that).removeClass("icon-collected");//
385
					$(that).removeClass("icon-collected"); //
364 386
				}
365 387
			}
366 388
		},
367
		error: function(data) {
389
		error: function (data) {
368 390
			$.MsgBox.Alert('提示', "服务器链接超时");
369 391
		}
370 392
	});
371 393
}
372 394
/*收藏资源、文章或者关注专家*/
373
function collectionAbout(watchObject,sel, num) {
374
	var that=sel;
395
function collectionAbout(watchObject, sel, num) {
396
	var that = sel;
375 397
	$.ajax('/ajax/watch', {
376 398
		data: {
377 399
			"professorId": userid,
378 400
			"watchObject": watchObject,
379 401
			"watchType": num,
380
			"uname":$.cookie("userName")
402
			"uname": $.cookie("userName")
381 403
		},
382 404
		dataType: 'json', //数据格式类型
383 405
		type: 'POST', //http请求类型
384 406
		timeout: 10000,
385 407
		async: false,
386
		success: function(data) {
387
			if(data.success) {
408
		success: function (data) {
409
			if (data.success) {
388 410
				console.log(data)
389
				if(num == "1" || num == "6" || num== '13') {
411
				if (num == "1" || num == "6" || num == '12' ) {
390 412
					$(that).addClass("attenedSpan");
391 413
					$(that).text("已关注");
392 414
				} else {
@ -395,14 +417,14 @@ function collectionAbout(watchObject,sel, num) {
395 417
				}
396 418
			}
397 419
		},
398
		error: function(data) {
420
		error: function (data) {
399 421
			$.MsgBox.Alert('提示', "服务器链接超时");
400 422
		}
401 423
	});
402 424
}
403 425
/*取消收藏资源、文章或者取消关注专家*/
404
function cancelCollectionAbout(watchObject,sel,num) {
405
	var that=sel;
426
function cancelCollectionAbout(watchObject, sel, num) {
427
	var that = sel;
406 428
	$.ajax({
407 429
		url: '/ajax/watch/delete',
408 430
		data: {
@ -413,9 +435,9 @@ function cancelCollectionAbout(watchObject,sel,num) {
413 435
		type: 'post', //http请求类型
414 436
		timeout: 10000,
415 437
		async: true,
416
		success: function(data) {
438
		success: function (data) {
417 439
			console.log(data.success)
418
			if(num == "1" || num == "6" ||num == "13") { //关注专家
440
			if (num == "1" || num == "6" || num == "12") { //关注专家
419 441
				$(that).removeClass("attenedSpan");
420 442
				$(that).text("关注");
421 443
			} else { //收藏资源或文章
@ -423,56 +445,56 @@ function cancelCollectionAbout(watchObject,sel,num) {
423 445
				$(that).removeClass("icon-collected");
424 446
			}
425 447
		},
426
		error: function(data) {
448
		error: function (data) {
427 449
			$.MsgBox.Alert('提示', "服务器链接超时");
428 450
		}
429 451
	});
430 452
}
431 453

432 454
//反馈意见成功
433
function backSuccessed(){
455
function backSuccessed() {
434 456
	$(".correctCon").val("");
435
	$(".correctSubmit").attr("disabled",true);
457
	$(".correctSubmit").attr("disabled", true);
436 458
	$(".correctSubmit").parents(".correctBlock").fadeOut();
437 459
	$.MsgBox.Alert('提示', '感谢您的反馈,我们马上处理。');
438 460
	$("#mb_msgicon").css("background", 'url("images/sign_icon_chenggong_nor.png") 0% 0% / contain');
439 461
}
462

440 463
function suImg() {
441 464
	$("#mb_msgicon").css("background", 'url("/images/sign_icon_chenggong_nor.png") 0% 0% / contain');
442
	$("#mb_ico").css("background",'url(/images/sign_icon_guanbi_nor.png) center center no-repeat');
465
	$("#mb_ico").css("background", 'url(/images/sign_icon_guanbi_nor.png) center center no-repeat');
443 466
}
444 467

445 468
//发现上方轮播
446
var bannerRotate = {// banner rotating
469
var bannerRotate = { // banner rotating
447 470
	_time: 3000,
448 471
	_i: 0,
449 472
	_interval: null,
450 473
	_navId: "#slide-tab",
451 474
	_navBox: "#slide-list",
452
	bannerShow: function() {
475
	bannerShow: function () {
453 476
		$(this._navId).find("li").removeClass("slide-tab-item-active");
454
		$(this._navId).find("li:eq("+this._i+")").addClass("slide-tab-item-active");
455
		
477
		$(this._navId).find("li:eq(" + this._i + ")").addClass("slide-tab-item-active");
478

456 479
		$(this._navBox).find("li").removeClass("slide-item-active");
457
		$(this._navBox).find("li:eq("+this._i+")").addClass("slide-item-active");
480
		$(this._navBox).find("li:eq(" + this._i + ")").addClass("slide-item-active");
458 481
	},
459
	bannerStart:function() {
482
	bannerStart: function () {
460 483
		var _this = this;
461
		_this._interval = setInterval(function() {
462
			if(_this._i >= 4) {
484
		_this._interval = setInterval(function () {
485
			if (_this._i >= 4) {
463 486
				_this._i = 0;
464
			}
465
			else {
487
			} else {
466 488
				_this._i++;
467 489
			}
468 490
			_this.bannerShow();
469 491
		}, _this._time);
470 492
	},
471
	bannerInit: function() {
493
	bannerInit: function () {
472 494
		var _this = this;
473 495
		_this.bannerStart();
474
		
475
		$(_this._navId).find("li").bind("mouseover", function() {
496

497
		$(_this._navId).find("li").bind("mouseover", function () {
476 498
			clearInterval(_this._interval);
477 499
			_this._i = $(this).index();
478 500
			_this.bannerShow();
@ -481,13 +503,12 @@ var bannerRotate = {// banner rotating
481 503
	}
482 504
};
483 505

484
$(document).ready(function(){
506
$(document).ready(function () {
485 507
	//处理点击事件,需要打开原生浏览器
486
	$("body").on("click","a.advertsub",function(){
508
	$("body").on("click", "a.advertsub", function () {
487 509
		var adId = this.getAttribute('data-id');
488 510
		console.log(adId)
489
		wlog("ad", adId ,"1");
511
		wlog("ad", adId, "1");
490 512
		return true;
491 513
	})
492
})
493

514
})

+ 3 - 3
js/teamInforShow.js

@ -517,9 +517,9 @@ $(function() {
517 517
			$("#attentBtn").on('click', function() {
518 518
				if(userid && userid != null && userid != "null") {
519 519
					if($(this).is('.attenedSpan')){
520
						cancelCollectionAbout(tId,$(this),13)
520
						cancelCollectionAbout(tId,$(this),12)
521 521
					} else {
522
						collectionAbout(tId,$(this),13);
522
						collectionAbout(tId,$(this),12);
523 523
					}
524 524
				}else{
525 525
					quickLog();
@ -607,7 +607,7 @@ $(function() {
607 607
			$('#tab5user').addClass("liNow");
608 608
			$(".moreNav").hide();
609 609
		})
610
	ifcollectionAbout(tId,$(".goSpan").find(".attenSpan"), 13)
610
	ifcollectionAbout(tId,$(".goSpan").find(".attenSpan"), 12)
611 611
	getUserInfo(); //获取详细信息
612 612
	professorListVal(true);
613 613
	patentListVal(true);

+ 5 - 5
js/unPatentShow.js

@ -16,8 +16,8 @@ $(document).ready(function() {
16 16
		$('.shareCode').stop(true, false).fadeToggle();
17 17
	});
18 18
19
	ifcollectionAbout(resourceId, $("#attention").find("em"), 12)
20
	pageViewLog(resourceId, 12)
19
	ifcollectionAbout(resourceId, $("#attention").find("em"), 13)
20
	pageViewLog(resourceId, 1)
21 21
	var professorId = "";
22 22
	getRecourceMe();
23 23
@ -181,9 +181,9 @@ $(document).ready(function() {
181 181
	$('#attention em').click(function() {
182 182
		if(userid && userid != "null" && userid != null) {
183 183
			if($(this).is('.icon-collected')) {
184
				cancelCollectionAbout(resourceId, $(this), 12)
184
				cancelCollectionAbout(resourceId, $(this), 13)
185 185
			} else {
186
				collectionAbout(resourceId, $(this), 12)
186
				collectionAbout(resourceId, $(this), 13)
187 187
			}
188 188
		} else {
189 189
			quickLog();
@ -342,7 +342,7 @@ $(document).ready(function() {
342 342
					$(".qiyego").attr('dataid', $da.id);
343 343
					$(".qiyego").attr("href", "cmpInforShow.html?orgId=" + $da.id);
344 344
					if(userid) {
345
						ifcollectionAbout($da.id, $("#enterprise").find(".attenSpan"), 6)
345
						ifcollectionAbout($da.id, $("#enterprise").find(".attenSpan"), 13)
346 346
					}
347 347
				}
348 348
			},

+ 6 - 5
js/userInforShow.js

@ -1519,11 +1519,11 @@ $(function () {
1519 1519
					aimId = "attendProduct"
1520 1520
					newStr = "用户还未收藏任何产品"
1521 1521
					detailProduct(arr, aimId);
1522
				} else if (type == 12) {
1522
				} else if (type == 13) {
1523 1523
					aimId = "attendUnPatent"
1524 1524
					newStr = "用户还未收藏任何非专利成果"
1525 1525
					detailUnPat(arr, aimId);
1526
				} else if (type == 13) {
1526
				} else if (type == 12) {
1527 1527
					aimId = "attendTeam"
1528 1528
					newStr = "用户还未关注任何团队"
1529 1529
					detailTeam(arr, aimId);
@ -1555,6 +1555,7 @@ $(function () {
1555 1555
			oAjax("/ajax/team/qm", {
1556 1556
				id: arr,
1557 1557
			}, "get", function (data) {
1558
				console.log(data)
1558 1559
				var dataStr = data.data;
1559 1560
				for (var i = 0; i < dataStr.length; ++i) {
1560 1561
					var li = document.createElement("li");
@ -2406,9 +2407,9 @@ $(function () {
2406 2407
			$("#attentBtn").on('click', function () {
2407 2408
				if (userid && userid != null && userid != "null") {
2408 2409
					if ($(this).is('.attenedSpan')) {
2409
						cancelCollectionAbout(professorId, $(this), 1)
2410
						cancelCollectionAbout(professorId, $(this), 12)
2410 2411
					} else {
2411
						collectionAbout(professorId, $(this), 1);
2412
						collectionAbout(professorId, $(this), 12);
2412 2413
					}
2413 2414
					queryPubCount();
2414 2415
					watchO = {
@ -2470,7 +2471,7 @@ $(function () {
2470 2471
		// relevantarticalList(); //相关文章
2471 2472
		likeExperts(); //感兴趣专家
2472 2473
		isActUser(); //判断用户是否被激活
2473
		ifcollectionAbout(professorId, $(".goSpan").find(".attenSpan"), 1)
2474
		ifcollectionAbout(professorId, $(".goSpan").find(".attenSpan"), 12)
2474 2475
		$(".goSpan").show();
2475 2476
	} else {
2476 2477
		$(".goSpanTo").show();

+ 2 - 2
userInforShow.html

@ -104,7 +104,7 @@
104 104
						<ul class="moreNavUl moreBuUl clearfix">
105 105
							<li rel="item8drop1" data-num="1" class="attentType liNow">我关注的专家</li>
106 106
							<li rel="item8drop2" data-num="6" class="attentType">我关注的企业</li>
107
							<li rel="item8drop6" data-num="13" class="attentType">我关注的团队</li>
107
							<li rel="item8drop6" data-num="12" class="attentType">我关注的团队</li>
108 108
							<li rel="item8drop3" data-num="8" class="attentType">我关注的问题</li>
109 109
							<li rel="item8drop4" id="dropMenu" tmp="drop4list" class="rightbtn attentType"><span tmp="">我收藏的服务</span><em class="foldtr"></em>
110 110
								<ul class="table-drop" id="drop4list">
@ -112,7 +112,7 @@
112 112
									<li rel="item8drop4item7" id="collectSerTab" data-num="10" class="attentType">我收藏的服务</li>
113 113
									<li rel="item8drop4item4" id="collectResTab" data-num="2" class="attentType">我收藏的资源</li>
114 114
									<li rel="item8drop4item2" id="collectPatTab" data-num="4" class="attentType">我收藏的专利</li>
115
									<li rel="item8drop4item9" id="collectPatTab" data-num="12" class="attentType">我收藏的非专利</li>
115
									<li rel="item8drop4item9" id="collectPatTab" data-num="13" class="attentType">我收藏的非专利</li>
116 116
									<li rel="item8drop4item3" id="collectParTab" data-num="5" class="attentType">我收藏的论文</li>
117 117
									<li rel="item8drop4item5" id="collectDemTab" data-num="7" class="attentType">我收藏的需求</li>
118 118
									<li rel="item8drop4item6" id="collectAnsTab" data-num="9" class="attentType">我收藏的回答</li>