Browse Source

去掉个人用户和企业用户浏览的分页

luyanan 7 years ago
parent
commit
1d5108d537
4 changed files with 41 additions and 100 deletions
  1. 0 2
      cmpInforShow.html
  2. 41 94
      js/userInforShow.js
  3. 0 2
      searchNew.html
  4. 0 2
      userInforShow.html

+ 0 - 2
cmpInforShow.html

202
							            </div>
202
							            </div>
203
							        </div>
203
							        </div>
204
							    </div>
204
							    </div>
205
								<!--<div class="tcdPageCode"></div>-->
206
							</div>
205
							</div>
207
						</div>
206
						</div>
208
					</div>
207
					</div>
249
<script type="text/javascript" src="js/jquery.cookie.js"></script>
248
<script type="text/javascript" src="js/jquery.cookie.js"></script>
250
<script type="text/javascript" src="js/jquery.similar.msgbox.js"></script>
249
<script type="text/javascript" src="js/jquery.similar.msgbox.js"></script>
251
<script type="text/javascript" src="js/weixinshare/qrcode.min.js"></script>
250
<script type="text/javascript" src="js/weixinshare/qrcode.min.js"></script>
252
<script type="text/javascript" src="js/jquery.page.js"></script>
253
<script type="text/javascript" src="js/common.js"></script>
251
<script type="text/javascript" src="js/common.js"></script>
254
<script type="text/javascript" src="js/cmpInforShow.js"></script>
252
<script type="text/javascript" src="js/cmpInforShow.js"></script>
255
<script type="text/javascript" src="js/quickLogin.js"></script>
253
<script type="text/javascript" src="js/quickLogin.js"></script>

+ 41 - 94
js/userInforShow.js

49
	}
49
	}
50
	var oArray=[];
50
	var oArray=[];
51
	var watchType=1;
51
	var watchType=1;
52
52
	
53
	var pageSize=10
53
	var QTime,QId,ATime,AId,WTime,WId,rows= 10;
54
	var QTime,QId,ATime,AId,WTime,WId,rows= 10;
54
	
55
	
55
	if(professorId) {
56
	if(professorId) {
56
		getUserInfo(professorId);//获取个人详细信息
57
		getUserInfo(professorId);//获取个人详细信息
57
		//historyEvaluate();//获取历史合作及评价
58
		//historyEvaluate();//获取历史合作及评价
58
		getResource(10,1,true);//获取个人发布的资源
59
		getArticle(10,1,true);//获取个人发布的文章
60
		getPaper(10,1,true);//获取个人发布的论文
61
		getPatent(10,1,true);//获取个人发布的专利
62
		getDemands(5,1,true);//获取个人发布的需求
59
		getResource(1,true);//获取个人发布的资源
60
		getArticle(1,true);//获取个人发布的文章
61
		getPaper(1,true);//获取个人发布的论文
62
		getPatent(1,true);//获取个人发布的专利
63
		getDemands(1,true);//获取个人发布的需求
63
		attentCount();
64
		attentCount();
64
        getMyAnswer(professorId,true);//获取个人的回答
65
        getMyAnswer(professorId,true);//获取个人的回答
65
		if(userid!=professorId){
66
		if(userid!=professorId){
76
			watchType=0;
77
			watchType=0;
77
			attentMy();
78
			attentMy();
78
		}else{
79
		}else{
79
			collAttent(10,1,true);
80
			collAttent(1,true);
80
            getMyQuestion(userid,true);//获取个人的提问
81
            getMyQuestion(userid,true);//获取个人的提问
81
			$(".goSpanTo").show();
82
			$(".goSpanTo").show();
82
			$(".myoneself").show();
83
			$(".myoneself").show();
128
                getMyWatchQ(userid, true);
129
                getMyWatchQ(userid, true);
129
            }else{
130
            }else{
130
131
131
				collAttent(10,1,true);
132
				collAttent(1,true);
132
			}
133
			}
133
		})
134
		})
134
		$(".navconBox .moreBu>.moreBuUl").on("click","li.rightbtn",function(){
135
		$(".navconBox .moreBu>.moreBuUl").on("click","li.rightbtn",function(){
787
		})
788
		})
788
	}
789
	}
789
	//获取资源
790
	//获取资源
790
	function getResource(pageSize, pageNo,isbind){
791
	function getResource(pageNo,isbind){
791
		$.ajax({
792
		$.ajax({
792
			"url": "/ajax/resource/pqProPublish",
793
			"url": "/ajax/resource/pqProPublish",
793
			"type": "get",
794
			"type": "get",
838
							}
839
							}
839
						}
840
						}
840
						//分页
841
						//分页
841
						if(isbind==true){
842
							// $("#proResource").siblings(".tcdPageCode").off("click").createPage({
843
							// 	pageCount: Math.ceil(data.data.total / 10),
844
							// 	current: data.data.pageNo,
845
							// 	backFn: function(p) {
846
							// 		$("#proResource").html("");
847
							// 		getResource(10, p,false);
848
							// 		document.body.scrollTop = document.documentElement.scrollTop = 0;
849
							// 	}
850
							// });
842
						if(isbind){
851
                            $("#proResource").parent().find(".js-load-more").on("click", function () {
843
                            $("#proResource").parent().find(".js-load-more").on("click", function () {
852
                                getResource(10,++pageNo,false);
844
                                getResource(++pageNo,false);
853
                            });
845
                            });
854
						}
846
						}
855
                        if (pageNo >= Math.ceil(data.data.total / 10)) {
847
                        if (pageNo >= Math.ceil(data.data.total /pageSize)) {
856
                            $("#proResource").parent().find(".js-load-more").unbind("click");
848
                            $("#proResource").parent().find(".js-load-more").unbind("click");
857
                            $("#proResource").parent().find(".js-load-more").hide();
849
                            $("#proResource").parent().find(".js-load-more").hide();
858
                        }
850
                        }
859
					}else{
851
					}else{
860
						$("#proResource + .nodatabox").show();
852
						$("#proResource + .nodatabox").show();
861
						$("#proResource + .nodatabox").find(".noContip").text("用户尚未发布任何资源");
853
						$("#proResource + .nodatabox").find(".noContip").text("用户尚未发布任何资源");
862
						if(isbind == true) {
854
						if(isbind) {
863
                            $("#proResource").parent().find(".js-load-more").hide();
855
                            $("#proResource").parent().find(".js-load-more").hide();
864
                        }
856
                        }
865
					}
857
					}
871
		});
863
		});
872
	}
864
	}
873
	//获取文章
865
	//获取文章
874
	function getArticle(pageSize, pageNo,isbind){
866
	function getArticle(pageNo,isbind){
875
		$.ajax({
867
		$.ajax({
876
			url: "/ajax/article/pqProPublish",
868
			url: "/ajax/article/pqProPublish",
877
			dataType: 'json', //数据格式类型
869
			dataType: 'json', //数据格式类型
937
							}
929
							}
938
						}
930
						}
939
						//分页
931
						//分页
940
						if(isbind==true){
941
							// $("#proArticel").siblings(".tcdPageCode").off("click").createPage({
942
							// 	pageCount: Math.ceil(data.data.total / 10),
943
							// 	current: data.data.pageNo,
944
							// 	backFn: function(p) {
945
							// 		$("#proArticel").html("");
946
							// 		getArticle(10, p,false);
947
							// 		document.body.scrollTop = document.documentElement.scrollTop = 0;
948
							// 	}
949
							// });
932
						if(isbind){
950
                            $("#proArticel").parent().find(".js-load-more").on("click", function () {
933
                            $("#proArticel").parent().find(".js-load-more").on("click", function () {
951
                                getArticle(10,++pageNo,false);
934
                                getArticle(++pageNo,false);
952
                            });
935
                            });
953
						}
936
						}
954
                        if (pageNo >= Math.ceil(data.data.total / 10)) {
937
                        if (pageNo >= Math.ceil(data.data.total / pageSize)) {
955
                            $("#proArticel").parent().find(".js-load-more").unbind("click");
938
                            $("#proArticel").parent().find(".js-load-more").unbind("click");
956
                            $("#proArticel").parent().find(".js-load-more").hide();
939
                            $("#proArticel").parent().find(".js-load-more").hide();
957
                        }
940
                        }
958
					}else{
941
					}else{
959
						$("#proArticel + .nodatabox").show();
942
						$("#proArticel + .nodatabox").show();
960
						$("#proArticel + .nodatabox").find(".noContip").text("用户尚未发布任何文章");
943
						$("#proArticel + .nodatabox").find(".noContip").text("用户尚未发布任何文章");
961
						if(isbind==true) {
944
						if(isbind) {
962
                            $("#proArticel").parent().find(".js-load-more").hide();
945
                            $("#proArticel").parent().find(".js-load-more").hide();
963
                        }
946
                        }
964
					}
947
					}
973
		
956
		
974
	}
957
	}
975
	//获取专利
958
	//获取专利
976
	function getPatent(pageSize, pageNo,isbind){
959
	function getPatent(pageNo,isbind){
977
		$.ajax({
960
		$.ajax({
978
			url: "/ajax/ppatent/byProfessor",
961
			url: "/ajax/ppatent/byProfessor",
979
			dataType: 'json', //数据格式类型
962
			dataType: 'json', //数据格式类型
1025
							}
1008
							}
1026
						}
1009
						}
1027
						//分页
1010
						//分页
1028
						if(isbind==true){
1029
							// $("#proPatent").siblings(".tcdPageCode").off("click").createPage({
1030
							// 	pageCount: Math.ceil(data.data.total / 10),
1031
							// 	current: data.data.pageNo,
1032
							// 	backFn: function(p) {
1033
							// 		$("#proPatent").html("");
1034
							// 		getPatent(10, p,false);
1035
							// 		document.body.scrollTop = document.documentElement.scrollTop = 0;
1036
							// 	}
1037
							// });
1011
						if(isbind){
1038
                            $("#proPatent").parent().find(".js-load-more").on("click", function () {
1012
                            $("#proPatent").parent().find(".js-load-more").on("click", function () {
1039
                                getPatent(10,++pageNo,false);
1013
                                getPatent(++pageNo,false);
1040
                            });
1014
                            });
1041
						}
1015
						}
1042
                        if (pageNo >= Math.ceil(data.data.total / 10)) {
1016
                        if (pageNo >= Math.ceil(data.data.total / pageSize)) {
1043
                            console.log("xmtt");
1017
                            console.log("xmtt");
1044
                            $("#proPatent").parent().find(".js-load-more").unbind("click");
1018
                            $("#proPatent").parent().find(".js-load-more").unbind("click");
1045
                            $("#proPatent").parent().find(".js-load-more").hide();
1019
                            $("#proPatent").parent().find(".js-load-more").hide();
1047
					}else{
1021
					}else{
1048
						$("#proPatent + .nodatabox").show();
1022
						$("#proPatent + .nodatabox").show();
1049
						$("#proPatent + .nodatabox").find(".noContip").text("用户尚未发布任何专利");
1023
						$("#proPatent + .nodatabox").find(".noContip").text("用户尚未发布任何专利");
1050
						if(isbind==true) {
1024
						if(isbind) {
1051
                            $("#proPatent").parent().find(".js-load-more").hide();
1025
                            $("#proPatent").parent().find(".js-load-more").hide();
1052
                        }
1026
                        }
1053
					}
1027
					}
1059
		});
1033
		});
1060
	}
1034
	}
1061
	//获取论文
1035
	//获取论文
1062
	function getPaper(pageSize, pageNo,isbind){
1036
	function getPaper(pageNo,isbind){
1063
		$.ajax({
1037
		$.ajax({
1064
			url: "/ajax/ppaper/byProfessor",
1038
			url: "/ajax/ppaper/byProfessor",
1065
			dataType: 'json', //数据格式类型
1039
			dataType: 'json', //数据格式类型
1120
							}
1094
							}
1121
						}
1095
						}
1122
						//分页
1096
						//分页
1123
						if(isbind==true){
1124
							// $("#proPaper").siblings(".tcdPageCode").off("click").createPage({
1125
							// 	pageCount: Math.ceil(data.data.total / 10),
1126
							// 	current: data.data.pageNo,
1127
							// 	backFn: function(p) {
1128
							// 		$("#proPaper").html("");
1129
							// 		getPaper(10, p,false);
1130
							// 		document.body.scrollTop = document.documentElement.scrollTop = 0;
1131
							// 	}
1132
							// });
1097
						if(isbind){
1133
                            $("#proPaper").parent().find(".js-load-more").on("click", function () {
1098
                            $("#proPaper").parent().find(".js-load-more").on("click", function () {
1134
                                getPaper(10,++pageNo,false);
1099
                                getPaper(++pageNo,false);
1135
                            });
1100
                            });
1136
						}
1101
						}
1137
                        if (pageNo >= Math.ceil(data.data.total / 10)) {
1102
                        if (pageNo >= Math.ceil(data.data.total / pageSize)) {
1138
                            $("#proPaper").parent().find(".js-load-more").unbind("click");
1103
                            $("#proPaper").parent().find(".js-load-more").unbind("click");
1139
                            $("#proPaper").parent().find(".js-load-more").hide();
1104
                            $("#proPaper").parent().find(".js-load-more").hide();
1140
                        }
1105
                        }
1582
	}
1547
	}
1583
	
1548
	
1584
	//获取需求
1549
	//获取需求
1585
	function getDemands(pageSize, pageNo,isbind) {
1550
	function getDemands(pageNo,isbind) {
1586
		$.ajax({
1551
		$.ajax({
1587
			url: "/ajax/demand/pq",
1552
			url: "/ajax/demand/pq",
1588
			type: "GET",
1553
			type: "GET",
1592
				"state":'1',
1557
				"state":'1',
1593
				"uid":professorId,
1558
				"uid":professorId,
1594
				"pageNo": pageNo,
1559
				"pageNo": pageNo,
1595
				"pageSize":pageSize
1560
				"pageSize":5
1596
			},
1561
			},
1597
			beforeSend: function() {
1562
			beforeSend: function() {
1598
				$("#showDemand").append('<img src="../images/loading.gif" class="loading" />');
1563
				$("#showDemand").append('<img src="../images/loading.gif" class="loading" />');
1608
							var liStr=$("<li></li>").appendTo("#showDemand");
1573
							var liStr=$("<li></li>").appendTo("#showDemand");
1609
							demandHtml($info[i],liStr);
1574
							demandHtml($info[i],liStr);
1610
						}
1575
						}
1611
//						if(isbind == true) {
1612
//							$(".tcdPageCode").createPage({
1613
//								pageCount: Math.ceil(data.data.total / pageSize),
1614
//								current: data.data.data.pageNo,
1615
//								backFn: function(p) {
1616
//									demandList(false,10, p);
1617
//								}
1618
//							});
1619
//						}
1620
					}else{
1576
					}else{
1621
						$("#showDemand").parents(".needinfobox").addClass("displayNone");
1577
						$("#showDemand").parents(".needinfobox").addClass("displayNone");
1622
					}
1578
					}
1686
			}
1642
			}
1687
		});
1643
		});
1688
	}
1644
	}
1689
	function collAttent(pageSize, pageNo,isbind,num){
1645
	function collAttent(pageNo,isbind,num){
1690
		if(!num){
1646
		if(!num){
1691
			var num=watchType;
1647
			var num=watchType;
1692
		}
1648
		}
1701
				"pageSize":pageSize
1657
				"pageSize":pageSize
1702
			},
1658
			},
1703
            beforeSend: function() {
1659
            beforeSend: function() {
1704
                // $(".table-body").append('<img src="../images/loading.gif" class="loading" />');
1705
                $("#item8user").find(".js-load-more").attr("disabled",true);
1660
                $("#item8user").find(".js-load-more").attr("disabled",true);
1706
                $("#item8user").find(".js-load-more").addClass("active");
1661
                $("#item8user").find(".js-load-more").addClass("active");
1707
            },
1662
            },
1736
					}else if(num==7){
1691
					}else if(num==7){
1737
						detailDemand(datalist);
1692
						detailDemand(datalist);
1738
					}
1693
					}
1739
					if(isbind==true){
1740
						// tcdPage.off("click").createPage({
1741
						// 	pageCount: Math.ceil(data.data.total / 10),
1742
						// 	current: data.data.pageNo,
1743
						// 	backFn: function(p) {
1744
						// 		collAttent(10, p,false,num);
1745
						// 		document.body.scrollTop = document.documentElement.scrollTop = 0;
1746
						// 	}
1747
						// });
1694
					if(isbind){
1748
                        $("#item8user").append('<button class="js-load-more"></button>');
1695
                        $("#item8user").append('<button class="js-load-more"></button>');
1749
                        $("#item8user").find(".js-load-more").on("click", function () {
1696
                        $("#item8user").find(".js-load-more").on("click", function () {
1750
                            collAttent(10,++pageNo,false,num);
1697
                            collAttent(++pageNo,false,num);
1751
                        });
1698
                        });
1752
					}
1699
					}
1753
                    if (pageNo >= Math.ceil(data.data.total / 10)) {
1700
                    if (pageNo >= Math.ceil(data.data.total / pageSize)) {
1754
                        $("#item8user").find(".js-load-more").unbind("click");
1701
                        $("#item8user").find(".js-load-more").unbind("click");
1755
                        $("#item8user").find(".js-load-more").hide();
1702
                        $("#item8user").find(".js-load-more").hide();
1756
                    }
1703
                    }
1757
				}else{
1704
				}else{
1758
					if(num==1){
1705
					if(num==1){
1759
						document.getElementById("attendPro").parentNode.querySelector(".nodatabox").classList.remove("displayNone");
1706
						document.getElementById("attendPro").parentNode.querySelector(".nodatabox").classList.remove("displayNone");
1760
						if(isbind==true) {
1707
						if(isbind) {
1761
                            $("#attendPro").parent().find(".js-load-more").hide()
1708
                            $("#attendPro").parent().find(".js-load-more").hide()
1762
                        }
1709
                        }
1763
					}else if(num==2){
1710
					}else if(num==2){
1764
						document.getElementById("attendRes").parentNode.querySelector(".nodatabox").classList.remove("displayNone");
1711
						document.getElementById("attendRes").parentNode.querySelector(".nodatabox").classList.remove("displayNone");
1765
						if(isbind==true) {
1712
						if(isbind) {
1766
                            $("#attendRes").parent().find(".js-load-more").hide()
1713
                            $("#attendRes").parent().find(".js-load-more").hide()
1767
                        }
1714
                        }
1768
					}else if(num==3){
1715
					}else if(num==3){
1769
						document.getElementById("attendArt").parentNode.querySelector(".nodatabox").classList.remove("displayNone");
1716
						document.getElementById("attendArt").parentNode.querySelector(".nodatabox").classList.remove("displayNone");
1770
						if(isbind==true) {
1717
						if(isbind) {
1771
                            $("#attendArt").parent().find(".js-load-more").hide()
1718
                            $("#attendArt").parent().find(".js-load-more").hide()
1772
                        }
1719
                        }
1773
					}else if(num==4){
1720
					}else if(num==4){
1774
						document.getElementById("attendPatent").parentNode.querySelector(".nodatabox").classList.remove("displayNone");
1721
						document.getElementById("attendPatent").parentNode.querySelector(".nodatabox").classList.remove("displayNone");
1775
						if(isbind==true) {
1722
						if(isbind) {
1776
                            $("#attendPatent").parent().find(".js-load-more").hide()
1723
                            $("#attendPatent").parent().find(".js-load-more").hide()
1777
                        }
1724
                        }
1778
					}else if(num==5){
1725
					}else if(num==5){
1779
						document.getElementById("attendPaper").parentNode.querySelector(".nodatabox").classList.remove("displayNone");
1726
						document.getElementById("attendPaper").parentNode.querySelector(".nodatabox").classList.remove("displayNone");
1780
						if(isbind==true) {
1727
						if(isbind) {
1781
                            $("#attendPaper").parent().find(".js-load-more").hide()
1728
                            $("#attendPaper").parent().find(".js-load-more").hide()
1782
                        }
1729
                        }
1783
					}else if(num==6){
1730
					}else if(num==6){
1784
						document.getElementById("attendCmp").parentNode.querySelector(".nodatabox").classList.remove("displayNone");
1731
						document.getElementById("attendCmp").parentNode.querySelector(".nodatabox").classList.remove("displayNone");
1785
						if(isbind==true) {
1732
						if(isbind) {
1786
                            $("#attendCmp").parent().find(".js-load-more").hide()
1733
                            $("#attendCmp").parent().find(".js-load-more").hide()
1787
                        }
1734
                        }
1788
					}else if(num==7){
1735
					}else if(num==7){
1789
						document.getElementById("attendDemand").parentNode.querySelector(".nodatabox").classList.remove("displayNone");
1736
						document.getElementById("attendDemand").parentNode.querySelector(".nodatabox").classList.remove("displayNone");
1790
						if(isbind==true) {
1737
						if(isbind) {
1791
                            $("#attendDemand").parent().find(".js-load-more").hide()
1738
                            $("#attendDemand").parent().find(".js-load-more").hide()
1792
                        }
1739
                        }
1793
					}
1740
					}

+ 0 - 2
searchNew.html

9
<link href="css/bootstrap.min.css" rel="stylesheet">
9
<link href="css/bootstrap.min.css" rel="stylesheet">
10
<link type="text/css" href="css/common.css" rel="stylesheet">
10
<link type="text/css" href="css/common.css" rel="stylesheet">
11
<link type="text/css" href="css/genindex.css" rel="stylesheet">
11
<link type="text/css" href="css/genindex.css" rel="stylesheet">
12
<link type="text/css" href="css/popup.css" rel="stylesheet">
13
<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
12
<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
14

13

15
</head>
14
</head>
172
</footer>
171
</footer>
173
<script type="text/javascript" src="js/jquery.cookie.js"></script>
172
<script type="text/javascript" src="js/jquery.cookie.js"></script>
174
<script type="text/javascript" src="js/jquery.similar.msgbox.js"></script>
173
<script type="text/javascript" src="js/jquery.similar.msgbox.js"></script>
175
<script type="text/javascript" src="js/jquery.page.js"></script>
176
<script type="text/javascript" src="js/common.js"></script>
174
<script type="text/javascript" src="js/common.js"></script>
177
<script type="text/javascript" src="js/scrollfix.js"></script>
175
<script type="text/javascript" src="js/scrollfix.js"></script>
178
<script type="text/javascript" src="js/searchNew.js"></script>
176
<script type="text/javascript" src="js/searchNew.js"></script>

+ 0 - 2
userInforShow.html

9
<link rel="shortcut icon" type="image/x-icon" href="images/favicon.png" media="screen" />
9
<link rel="shortcut icon" type="image/x-icon" href="images/favicon.png" media="screen" />
10
<link href="css/bootstrap.min.css" rel="stylesheet">
10
<link href="css/bootstrap.min.css" rel="stylesheet">
11
<link type="text/css" href="css/common.css" rel="stylesheet">
11
<link type="text/css" href="css/common.css" rel="stylesheet">
12
<link type="text/css" href="css/popup.css" rel="stylesheet">
13
<link type="text/css" href="css/genindex.css" rel="stylesheet">
12
<link type="text/css" href="css/genindex.css" rel="stylesheet">
14
<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
13
<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
15
<style type="text/css">
14
<style type="text/css">
615
<script type="text/javascript" src="js/jquery.similar.msgbox.js"></script>
614
<script type="text/javascript" src="js/jquery.similar.msgbox.js"></script>
616
<script type="text/javascript" src="js/weixinshare/qrcode.min.js"></script>
615
<script type="text/javascript" src="js/weixinshare/qrcode.min.js"></script>
617
<script type="text/javascript" src="js/common.js"></script>
616
<script type="text/javascript" src="js/common.js"></script>
618
<script type="text/javascript" src="js/jquery.page.js"></script>
619
<script type="text/javascript" src="js/userInforShow.js"></script>
617
<script type="text/javascript" src="js/userInforShow.js"></script>
620
<script type="text/javascript" src="js/quickLogin.js"></script>
618
<script type="text/javascript" src="js/quickLogin.js"></script>
621
<script>
619
<script>