Browse Source

添加身份标识
公共判断用户登录身份,解决用户登录状态闪现的问题
单独控制首页和搜索页面顶部导航栏的状态样式

luyanan 8 years ago
parent
commit
b07e10b33d

+ 7 - 39
articalInfo.html

@ -4,53 +4,23 @@
4 4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 5
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
6 6
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7
<title>科袖-文章信息</title>
7
<title>浏览文章-科袖网</title>
8 8
<link href="css/bootstrap.min.css" rel="stylesheet">
9 9
<link rel="stylesheet" href="css/reset.css" />
10 10
<link rel="stylesheet" type="text/css" href="css/style.css" />
11 11
<link type="text/css" href="css/common.css" rel="stylesheet">
12 12
<link type="text/css" href="css/index.css" rel="stylesheet">
13
13
<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
14 14
15 15
</head>
16 16
17 17
<body>
18 18
19
<div id="header">
20
	<div class="containerCon">
21
	<a href="index.html" alt="科袖" class="logo"></a>
22
	<div class="searchblock" style="display:block;">
23
		<input type="text" placeholder="搜索专家、研发资源" class="search-txt" id="hsearchContent">
24
		<div class="search-btn" id="hsearch"><span class="search-icon"></span></div>
25
	</div>
26
	<div class="header-right"> 
27
        <!--未登录-->
28
        <div class="unlogin">
29
        	<a class="loginbtn loginlbtn" href="login-invite-code.html">特邀专家登录</a>
30
        	<a class="loginbtn loginrbtn" href="login.html">登录&nbsp;&nbsp;|</a>
31
        	<a class="loginbtn loginrbtn" href="register.html">注册</a>
32
        </div>
33
        <!--已登录-->
34
        <div class="onlogin">
35
        	<a class="myWorkspace" href="workspaces.html">我的工作台</a>
36
	        <div class="head-portrait headRadius">
37
	        	<img class="portrait-p" />
38
	            <div class="personal-infor">
39
	                <div class="triangleB"></div>
40
	                <div class="personal-box bgRadius">
41
	                    <!-- <a href="#"><span class="icon icon1"></span>我的主页</a> -->
42
	                    <a href="information.html"><span class="icon icon2"></span>修改资料</a>
43
	                    <a href="account-set.html"><span class="icon icon3"></span>账户设置</a>
44
	                    <a href="#" onClick="exit()"><span class="icon icon4"></span>退出登录</a>
45
	                </div>
46
	                
47
	            </div>
48
	        </div>
49
	        
50
        </div>
51
	</div>
52
	</div>
53
</div>
19
<!--头部-->
20
<header id="header">
21
	<script src="js/header.js"></script>
22
</header>
23
54 24
<div id="container" style="background: #f8f8f8;">
55 25
	<div class="contentBody clearfix">
56 26
		<div class="resouLeft floatL">
@ -153,11 +123,9 @@
153 123
	<script type="text/javascript" src="js/footer.js"></script>
154 124
</footer>
155 125
156
<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
157 126
<script type="text/javascript" src="js/jquery.cookie.js"></script>
158 127
<script type="text/javascript" src="js/scrollfix.js"></script>
159 128
<script type="text/javascript" src="js/weixinshare/qrcode.min.js"></script>
160
<script type="text/javascript" src="js/index.js"></script>
161 129
<script type="text/javascript" src="js/common.js"></script>
162 130
<script type="text/javascript" src="js/articalInfo.js"></script>
163 131
<script type="text/javascript">

+ 6 - 0
cmp-portal/js/companybrowinfor.js

@ -12,6 +12,12 @@ $(document).ready(function() {
12 12
				if(data.success) {
13 13
					console.log(data);
14 14
					var $data = data.data;
15
					
16
					var companytitle = $data.name + "-科袖网";
17
						window.setInterval(function() {
18
							document.title = companytitle;
19
						}, 500);
20
					
15 21
					$(".h1Font").text($data.name);
16 22
					if($data.hasOrgLogo) {
17 23
						$("#oimg").attr("src", "/images/org/" + $data.id + ".jpg");

BIN
images/home_icon_logo_orange.png


BIN
images/porfile_icon_qiye_hig.png


BIN
images/porfile_icon_qiye_nor.png


BIN
images/porfile_icon_shimin_nor.png


BIN
images/porfile_icon_yuangong_hig.png


BIN
images/porfile_icon_yuangong_nor.png


BIN
images/porfile_icon_zhuanjia_nor.png


+ 15 - 40
index.html

@ -6,15 +6,17 @@
6 6
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
7 7
<meta http-equiv="X-UA-Compatible" content="IE=edge">
8 8
<meta content="科袖网是一个致力于整合行业内优秀的科研专家与研发资源的共享经济平台。通过提供互联网服务,帮助企业寻找攻克技术难题的专家,从而提高企业的研发与创新能力;帮助专家实现研究成果的应用,使科研价值转化为经济价值;让闲置的研发资源得到充分利用,创造更多价值。" name="description">
9
<title>科袖网 - 搭建企业与专家的桥梁</title>
9
<title>科袖网-搭建企业与专家的桥梁</title>
10 10
<link rel="shortcut icon" href="images/favicon.png"/>
11 11
<!-- <link rel="Bookmark" href="images/favicon.png" /> -->
12 12
<link href="css/bootstrap.min.css" rel="stylesheet">
13 13
<link rel="stylesheet" href="css/reset.css" />
14 14
<link type="text/css" href="css/index.css" rel="stylesheet">
15 15
<link type="text/css" href="css/common.css" rel="stylesheet">
16
<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
16 17
<style type="text/css">
17
	#header{background:rgba(255,153,0,0);top:30px;}
18
	#header{top:30px;}
19
	.searchblock{display:none;} 
18 20
</style>
19 21
</head>
20 22
<body>
@ -24,42 +26,11 @@
24 26
		<a id="gocmp" href="javascript:;">进入企业版</a>
25 27
	</div>
26 28
</div>
29
<!--头部-->
30
<header id="header">
31
	<script src="js/header.js"></script>
32
</header>
27 33
<div id="container">
28
	<div id="header">
29
		<div class="containerCon">
30
	        <a href="index.html" alt="科袖" class="logo"></a>
31
	        <div class="searchblock" id="serc-index">
32
	            <input type="text" placeholder="搜索专家、研发资源" class="search-txt" id="hsearchContent" />
33
	            <div class="search-btn" id="hsearch"><span class="search-icon" ></span></div>
34
	        </div>
35
	        <div class="header-right"> 
36
		        <!--未登录-->
37
		        <div class="unlogin">
38
		        	<a class="loginbtn loginlbtn" href="login-invite-code.html">特邀专家登录</a>
39
		        	<a class="loginbtn loginrbtn" href="login.html">登录&nbsp;&nbsp;|</a>
40
		        	<a class="loginbtn loginrbtn" href="register.html">注册</a>
41
		        </div>
42
		        
43
		        <!--已登录-->
44
		        <div class="onlogin">
45
		        	<a class="myWorkspace" href="workspaces.html">我的工作台</a>
46
			        <div class="head-portrait headRadius">
47
			        	<img class="portrait-p" />
48
			            <div class="personal-infor">
49
			                <div class="triangleB"></div>
50
			                <div class="personal-box bgRadius">
51
			                    <!-- <a href="#"><span class="icon icon1"></span>我的主页</a> -->
52
			                    <a href="information.html"><span class="icon icon2"></span>修改资料</a>
53
			                    <a href="account-set.html"><span class="icon icon3"></span>账户设置</a>
54
			                    <a href="#" onClick="exit()"><span class="icon icon4"></span>退出登录</a>
55
			                </div>
56
			                
57
			            </div>
58
			        </div> 
59
		        </div>
60
		    </div>
61
        </div>
62
    </div>
63 34
	<!--banner部分-->
64 35
	<div id="banner">
65 36
		<div class="banner"></div>
@ -200,7 +171,6 @@
200 171
	    <script type="text/javascript" src="js/footer.js"></script>
201 172
	</footer>
202 173

203
<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
204 174
<script type="text/javascript" src="/js/jquery.cookie.js"></script>
205 175
<script type="text/javascript" src="js/common.js"></script>
206 176
<script type="text/javascript" src="js/index.js"></script>
@ -209,12 +179,17 @@
209 179
		var top = $(document).scrollTop();
210 180
		if (top == 0) {
211 181
			$("#header").css("top","30px");
212
			$("#header").removeClass("firstL").removeClass('firstB');
182
			//$("#header").removeClass("firstL").removeClass('firstB');
213 183
		} else {
214 184
			$("#header").css("top","0");
215
			$("#header").addClass("firstB");
185
			//$("#header").addClass("firstB");
216 186
	
217 187
		}
188
		if (top >= 360) {
189
			$(".searchblock").stop(true,false).fadeIn();
190
		}else{
191
			$(".searchblock").stop(true,false).fadeOut();
192
		}
218 193
//		if (top == 0) {
219 194
//			$("#header").removeClass('firstB');
220 195
//		} else {

+ 85 - 33
js/common.js

@ -1,4 +1,14 @@
1 1
$(document).ready(function(){
2
	$(".unlogin").show();
3
	$(".onlogin").hide();
4
	
5
	//加载页面时,判断是否登陆
6
	var userid = $.cookie("userid");
7
	if (userid && userid != "null" && userid != null) {
8
		$(".myWorkspace").attr("href","workspaces.html?"+userid);
9
		loginStatus();
10
	}
11
	
2 12
	var footerHeight = $("footer").outerHeight(true);
3 13
	$('#container').css("padding-bottom", footerHeight +"px" );
4 14
	//窗口大小变更事件
@ -18,30 +28,80 @@ $(document).ready(function(){
18 28
	})
19 29
20 30
});
31
//搜索框跳转页面
32
	function synContent(type) {
33
		if (type == 1) {		
34
			$("#searchContent").val($("#hsearchContent").val());
35
		} else {	
36
			$("#hsearchContent").val($("#searchContent").val());
37
		}
38
	}
39
	$("#hsearchContent").blur(function() {
40
		synContent(1);
41
	});
42
	$("#searchContent").blur(function() {
43
		synContent(2);
44
	});
45
	
46
	
47
	var lookFor = 0;
48
	$("#lookFor ul li").on("click",function(){
49
		lookFor=$(this).index();
50
		console.log(lookFor);
51
	});
52
	$("#search").on("click", function() {
53
		var searchContent = $("#searchContent").val();
54
		location.href = "search.html?searchContent=" + encodeURI(searchContent)+"&lookFor=" + lookFor;
55
	});
56
	
57
	//enter绑定时间
58
	$("#searchContent").keydown(function(e){
59
		if(e.which==13) {
60
			synContent(2);
61
		 var searchContent = $("#searchContent").val();
62
		 console.log(searchContent);
63
			location.href = "search.html?searchContent=" + encodeURI(searchContent)+"&lookFor=" + lookFor;
64
		}
65
		
66
	})
67
	$("#hsearchContent").keydown(function(e){
68
		if(e.which==13) {
69
			synContent(1);			
70
			var searchContent = $("#hsearchContent").val();		
71
			console.log(searchContent);
72
			location.href = "search.html?searchContent=" + encodeURI(searchContent);
73
		}	
74
	})
75
	
76
	$("#hsearch").on("click", function() {
77
		var searchContent = $("#hsearchContent").val();
78
		location.href = "search.html?searchContent=" + encodeURI(searchContent);
79
	});
21 80
/*向下滚动时,header背景变半透明*/
22 81
$(document).scroll(function() {
23 82
	var top = $(document).scrollTop();
24
	if (top == 0) {
25
		$("#header").addClass("firstL");
26
	} else {
27
		$("#header").addClass("firstB").removeClass("firstL");
28
//		$("#header").removeClass("firstL").addClass("firstH");
29
30
	}
31
	if (top != 0) {
32
		$(".searchbox").fadeIn(1000);
33
34
	} else {
35
		$(".searchbox").fadeOut(1000);
36
	}
83
	
84
//	if (top == 0) {
85
//		$("#header").addClass("firstL");
86
//	} else {
87
//		$("#header").addClass("firstB").removeClass("firstL");
88
////		$("#header").removeClass("firstL").addClass("firstH");
89
//
90
//	}
91
//	if (top != 0) {
92
//		$(".searchbox").fadeIn(1000);
93
//
94
//	} else {
95
//		$(".searchbox").fadeOut(1000);
96
//	}
37 97
	//小搜索框滚动大于等于350,显示在头部
38
	if (top >= 350) {
39
		$("#serc-index").fadeIn(1000);
40
41
	} else {
42
		$("#serc-index").fadeOut(1000);
43
44
	}
98
//	if (top >= 350) {
99
//		$("#serc-index").fadeIn(1000);
100
//
101
//	} else {
102
//		$("#serc-index").fadeOut(1000);
103
//
104
//	}
45 105
46 106
	if (top >= 300) {
47 107
		$(".content-left").css({
@ -64,7 +124,7 @@ function exit(){
64 124
	$.cookie('userMobilePhone', null); 
65 125
	$.cookie('userName', null); 
66 126
	$.cookie('userType', null); 
67
	location.href="index.html"	
127
	location.href="index.html"
68 128
}
69 129
70 130
@ -78,7 +138,7 @@ function valUser(){
78 138
79 139
 function GetQueryString(name) { 
80 140
		var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); 	
81
		var r = window.location.search.substr(1).match(reg);  //��ȡurl��"?"�����ַ�����ƥ��
141
		var r = window.location.search.substr(1).match(reg); 
82 142
	
83 143
		var context = ""; 
84 144
		if (r != null) 
@ -105,14 +165,14 @@ function loginStatus(){
105 165
	userAuth = $.cookie('userAuth');
106 166
	userName = $.cookie('userName');
107 167
	if(userid == null && userName == null && userAuth == "false"){
108
		$(".onlogin").hide();
109 168
		$(".unlogin").show();
169
		$(".onlogin").hide();
110 170
	}else if(userid != null && userAuth == "false" && userName != null){
111 171
		location.href="login-first.html";
112 172
	}else if(userid != null && userAuth == "true" && userName == ""){
113 173
		location.href="information-add.html";
114 174
	}else{
115
			$(".onlogin").show();
175
		$(".onlogin").show();
116 176
		$(".unlogin").hide();
117 177
 		$(".portrait-p").attr("src","/images/head/"+userid+"_m.jpg");
118 178
		$(".portrait-p").load(function(){//判断图片是否加载,加载不成功默认有默认的图像									
@ -123,14 +183,6 @@ function loginStatus(){
123 183
	}
124 184
}
125 185
126
//底部导航code显示隐藏
127
$(".codehover").hover(function(){
128
	$(".codehover .code").stop(true, false).fadeOut();
129
	$(this).find(".code").stop(true, false).fadeIn();
130
	},function(){
131
		$(this).find(".code").stop(true, false).hide();
132
		})
133
134 186
//转换格式
135 187
function changeTime(dealtime){
136 188
	   var s = dealtime;
@ -482,7 +534,7 @@ if ($.cookie('userid') && $.cookie('userid') != "null" && $.cookie('userid') !=
482 534
		$("#repalyf").addClass("repalyf");
483 535
		/*点击未读咨询消息查看*/
484 536
		$("#gozixu").on("click", function() {
485
			window.location.href = "demand.html";
537
			window.location.href = "myConsult.html";
486 538
		})
487 539
	}else{
488 540
		$(".nohide").show();

+ 15 - 21
js/header.js

@ -4,13 +4,13 @@ headerHtml += '<div class="container-fulid">'+
4 4
				  '<div class="containerCon">'+
5 5
				  		'<div class="floatL">'+
6 6
								'<div class="headlogo floatL">'+
7
										'<a href="//www.ekexiu.com/"><h1></h1></a>'+
7
										'<a href="index.html"><h1></h1></a>'+
8 8
								'</div>' +
9 9
								'<ul class="headnav floatL">'+
10
										'<li class="navcurrent"><a href="//www.ekexiu.com/">首页</a></li>'+
10
										'<li class="navcurrent"><a href="index.html">首页</a></li>'+
11 11
										'<li><a href="">专家</a></li>'+
12 12
										'<li><a href="">资源</a></li>'+
13
										'<li><a href="">发现</a></li>'+
13
										'<li><a href="discover.html">发现</a></li>'+
14 14
										'<li><a href="">我的工作台</a></li>'+
15 15
								'</ul>' +
16 16
							'</div>' +
@ -29,8 +29,12 @@ headerHtml += '<div class="container-fulid">'+
29 29

30 30
//旧版header
31 31
var hHtml = '';
32
hHtml +='<a href="index.html" alt="科袖" class="logo"></a>'+
33
	'<div class="searchblock" style="display:block;">'+
32
hHtml +='<div class="containerCon"><a href="index.html" alt="科袖" class="logo"></a>'+
33
	'<ul class="headnav floatL" style="margin-left:40px">'+
34
			'<li><a href="index.html">首页</a></li>'+
35
			'<li><a href="discover.html">发现</a></li>'+
36
	'</ul>' +
37
	'<div class="searchblock">'+
34 38
   '<input type="text" placeholder="搜索专家、研发资源" class="search-txt" id="hsearchContent">'+
35 39
		'<div class="search-btn" id="hsearch"><span class="search-icon"></span></div>'+
36 40
	'</div>'+
@ -45,7 +49,7 @@ hHtml +='<a href="index.html" alt="科袖" class="logo"></a>'+
45 49
        '<div class="onlogin">'+
46 50
        	'<a class="myWorkspace" href="workspaces.html">我的工作台</a>'+
47 51
	        '<div class="head-portrait headRadius">'+
48
	        	'<img class="portrait-p" />'+
52
	        	'<img class="portrait-p" src="images/default-photo.jpg" />'+
49 53
	            '<div class="personal-infor">'+
50 54
	                '<div class="triangleB"></div>'+
51 55
	                '<div class="personal-box bgRadius">'+
@ -57,24 +61,14 @@ hHtml +='<a href="index.html" alt="科袖" class="logo"></a>'+
57 61
	            '</div>'+
58 62
	        '</div>'+
59 63
        '</div>'+
60
	'</div>';
64
	'</div></div>';
61 65

62 66

63 67
document.write(hHtml);
64 68

65
/*新版header*/
66
//header{background: #373d41;color:#888;font-size:16px;line-height:32px;height:60px;}
67
//header .containerCon{background: #373d41;}
68
//header .headlogo h1 {width: 64px;height: 32px;margin:14px 14px 14px 0;padding: 0;background-image: url(../images/home_icon_logo2.png);background-size:contain;overflow: hidden;}
69
//header .headnav{margin:0 14px;}
70
//header .headnav li{float:left;margin:0 4px; padding:12px 0;}
71
//header .headnav li a{ color:#FFFFFF; padding:14px 18px;}
72
//header .headuser{overflow: hidden; width: 38px;height: 38px;margin:10px 0 12px 20px;cursor: pointer;}
73
//header .headnavbtn{margin:20px 6px;}
74
//header .headnavbtn li{float:right;margin:0 6px;}
75
//header .navbtn{width: 18px;height:20px;cursor: pointer; padding:10px 18px;background-position:center;background-repeat:no-repeat;}
76
//header .navnews{background-image: url(../images/nav_button_news_nor.png);background-size:contain;}
77
//header .navsearch{background-image: url(../images/nav_button_search_nor_2.png);background-size:contain;}
78
//header .headnav li.navcurrent{border-bottom:4px solid #28b8fa;}
69
$(".head-portrait").hover(function(){
70
		$(".personal-infor").stop(false,true).slideToggle();
71
	})
72

79 73

80 74


+ 18 - 82
js/index.js

@ -1,13 +1,5 @@
1 1

2 2
$(function(){
3

4
	//加载页面时,判断是否登陆
5
	var userid = $.cookie("userid");
6
	if (userid && userid != "null" && userid != null) {
7
		$(".myWorkspace").attr("href","workspaces.html?"+userid);
8
		loginStatus();
9
	}
10
	
11 3
	//加载页面时,判断企业账号是否登录
12 4
	var orgid = $.cookie('orgId');
13 5
	$("#cmpSettled").on("click",function(){
@ -26,80 +18,6 @@ $(function(){
26 18
		}
27 19
	})
28 20
	
29
	
30
	//登陆个人信息下拉菜单
31
	$('.head-portrait').hover(function() {
32
		$(".personal-infor").stop(true, false).slideDown(500);
33
	}, function() {
34
		$(".personal-infor").stop(true, false).slideUp(500);
35
	});
36
	
37
	//搜索框跳转页面
38
	function synContent(type) {
39
		if (type == 1) {		
40
			$("#searchContent").val($("#hsearchContent").val());
41
		} else {	
42
			$("#hsearchContent").val($("#searchContent").val());
43
		}
44
	}
45
	$("#hsearchContent").blur(function() {
46
		synContent(1);
47
	});
48
	$("#searchContent").blur(function() {
49
		synContent(2);
50
	});
51
	
52
	
53
	var lookFor = 0;
54
	$("#lookFor ul li").on("click",function(){
55
		lookFor=$(this).index();
56
		console.log(lookFor);
57
	});
58
	$("#search").on("click", function() {
59
		var searchContent = $("#searchContent").val();
60
		location.href = "search.html?searchContent=" + encodeURI(searchContent)+"&lookFor=" + lookFor;
61
	});
62
	
63
	//enter绑定时间
64
	$("#searchContent").keydown(function(e){
65
		if(e.which==13) {
66
			synContent(2);
67
		 var searchContent = $("#searchContent").val();
68
		 console.log(searchContent);
69
			location.href = "search.html?searchContent=" + encodeURI(searchContent)+"&lookFor=" + lookFor;
70
		}
71
		
72
	})
73
	$("#hsearchContent").keydown(function(e){
74
		if(e.which==13) {
75
			synContent(1);			
76
			var searchContent = $("#hsearchContent").val();		
77
			console.log(searchContent);
78
			location.href = "search.html?searchContent=" + encodeURI(searchContent);
79
		}	
80
	})
81
	
82
	$("#hsearch").on("click", function() {
83
		var searchContent = $("#hsearchContent").val();
84
		location.href = "search.html?searchContent=" + encodeURI(searchContent);
85
	});
86
	
87
	//热门领域
88
	$(".field").bind("click",function(){
89
		location.href = "search.html?subject=" + encodeURI($(this).text());
90
	})
91
	//热门专家
92
	$('.professor').hover(function() {
93
		$(this).find(".professor-data").stop(true, false).animate({
94
			"padding": "94px 0",
95
			"top": "-50px"
96
		})
97
	}, function() {
98
		$(this).find(".professor-data").stop(true, false).animate({
99
			"padding": "25px 0",
100
			"top": "58%"
101
		})
102
	})
103 21
	/*发布需求*/
104 22
	$("#postNow").click(function(){
105 23
		if(userid=="null"||userid==undefined){
@ -160,4 +78,22 @@ $(function(){
160 78
			}
161 79
		})
162 80
	})
81
	
82
	//热门领域
83
	$(".field").bind("click",function(){
84
		location.href = "search.html?subject=" + encodeURI($(this).text());
85
	})
86
	//热门专家
87
	$('.professor').hover(function() {
88
		$(this).find(".professor-data").stop(true, false).animate({
89
			"padding": "94px 0",
90
			"top": "-50px"
91
		})
92
	}, function() {
93
		$(this).find(".professor-data").stop(true, false).animate({
94
			"padding": "25px 0",
95
			"top": "58%"
96
		})
97
	})
98
	
163 99
})

+ 5 - 27
js/search.js

@ -1,21 +1,9 @@
1 1
$(function() {
2
	var userid = $.cookie("userid");
3
	if(userid && userid != "null" && userid != null) {
4
		$(".myWorkspace").attr("href", "workspaces.html?" + userid);
5
		loginStatus();
6
	}
7 2
8
	//登陆个人信息下拉菜单
9
	$('.head-portrait').hover(function() {
10
		$(".personal-infor").stop(true, false).slideDown(500);
11
	}, function() {
12
		$(".personal-infor").stop(true, false).slideUp(500);
13
	});
14 3
	$(document).scroll(function() {
15 4
		var top = $(document).scrollTop();
16 5
		if(top != 0) {
17 6
			$(".searchbox").fadeIn(1000);
18
19 7
		} else {
20 8
			$(".searchbox").fadeOut(1000);
21 9
		}
@ -404,20 +392,8 @@ $(function() {
404 392
			pageSize = 10;
405 393
			getData(key, subject, industry, pageSize, 1, true, address);
406 394
		}
407
		// enter键搜索
408
	function synContent(type) {
409
		if(type == 1) {
410
			$("#searchContent").val($("#hsearchContent").val());
411
		} else {
412
			$("#hsearchContent").val($("#searchContent").val());
413
		}
414
	}
415
	$("#hsearchContent").blur(function() {
416
		synContent(1);
417
	});
418
	$("#searchContent").blur(function() {
419
		synContent(2);
420
	});
395
	
396
//搜索框跳转页面 enter键搜索
421 397
	$("#searchContent").keydown(function(e) {
422 398
		if(e.which == 13) {
423 399
			synContent(2);
@ -455,11 +431,13 @@ $(function() {
455 431
			$(".aboutpro").append('<div class="tcdPageCode"></div>');
456 432
			getData(key, subject, industry, 10, 1, true, address);
457 433
		})
458
	$("#hsearch1").on(
434
//	$("#hsearch1")
435
	$("#hsearch").on(
459 436
		"click",
460 437
		function() {
461 438
			$("#searchContent").val($("#hsearchContent").val());
462 439
			key = $("#hsearchContent").val();
440
			location.href = "javascript:;";
463 441
			$("#professorList").remove();
464 442
			$(".aboutpro").append(
465 443
				'<div class="about-in" id="professorList"></div>')

+ 5 - 38
resourceInfo.html

@ -4,7 +4,7 @@
4 4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 5
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
6 6
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7
<title>科袖-资源信息</title>
7
<title>浏览资源信息-科袖网</title>
8 8
<link rel="shortcut icon" type="image/x-icon" href="images/favicon.png" media="screen" />
9 9
<link href="css/bootstrap.min.css" rel="stylesheet">
10 10
<link rel="stylesheet" href="css/reset.css" />
@ -12,6 +12,7 @@
12 12
<link type="text/css" href="css/index.css" rel="stylesheet">
13 13
<link type="text/css" href="css/common.css" rel="stylesheet">
14 14
<link type="text/css" href="css/popup.css" rel="stylesheet">
15
<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
15 16
<style type="text/css">
16 17
	.middleImg{background:#FAFAFA;padding:2px;width:296px;height:296px;display: table-cell;vertical-align:middle; text-align:center;overflow: hidden;}
17 18
	.middleImg .maxImgsize{display:inline-block;vertical-align:middle;max-width: 296px;max-height: 296px;}
@ -20,41 +21,9 @@
20 21
21 22
<body>
22 23
23
<div id="header">
24
	<div class="containerCon">
25
	<a href="index.html" alt="科袖" class="logo"></a>
26
	<div class="searchblock" style="display:block;">
27
		<input type="text" placeholder="搜索专家、研发资源" class="search-txt" id="hsearchContent">
28
		<div class="search-btn" id="hsearch"><span class="search-icon"></span></div>
29
	</div>
30
	<div class="header-right"> 
31
        <!--未登录-->
32
        <div class="unlogin">
33
        	<a class="loginbtn loginlbtn" href="login-invite-code.html">特邀专家登录</a>
34
        	<a class="loginbtn loginrbtn" href="login.html">登录&nbsp;&nbsp;|</a>
35
        	<a class="loginbtn loginrbtn" href="register.html">注册</a>
36
        </div>
37
        <!--已登录-->
38
        <div class="onlogin">
39
        	<a class="myWorkspace" href="workspaces.html">我的工作台</a>
40
	        <div class="head-portrait headRadius">
41
	        	<img class="portrait-p" />
42
	            <div class="personal-infor">
43
	                <div class="triangleB"></div>
44
	                <div class="personal-box bgRadius">
45
	                    <!-- <a href="#"><span class="icon icon1"></span>我的主页</a> -->
46
	                    <a href="information.html"><span class="icon icon2"></span>修改资料</a>
47
	                    <a href="account-set.html"><span class="icon icon3"></span>账户设置</a>
48
	                    <a href="#" onClick="exit()"><span class="icon icon4"></span>退出登录</a>
49
	                </div>
50
	                
51
	            </div>
52
	        </div>
53
	        
54
        </div>
55
	</div>
56
	</div>
57
</div>
24
<header id="header">
25
	<script src="js/header.js"></script>
26
</header>
58 27
<div id="container" style="background: #f8f8f8;">
59 28
	<div class="contentBody clearfix">
60 29
		<div class="resouLeft floatL">
@ -136,11 +105,9 @@
136 105
	<script type="text/javascript" src="js/footer.js"></script>
137 106
</footer>
138 107
139
<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
140 108
<script type="text/javascript" src="js/jquery.cookie.js"></script>
141 109
<script type="text/javascript" src="js/jquery.similar.msgbox.js"></script>
142 110
<script type="text/javascript" src="js/weixinshare/qrcode.min.js"></script>
143
<script type="text/javascript" src="js/index.js"></script>
144 111
<script type="text/javascript" src="js/common.js"></script>
145 112
<script type="text/javascript" src="js/popup.js"></script>
146 113
<script type="text/javascript" src="js/resourceInfo.js"></script>

+ 22 - 34
search.html

@ -4,50 +4,29 @@
4 4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 5
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
6 6
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7
<title>找专家,搜资源 - 科袖网</title>
7
<title>找专家,搜资源-科袖网</title>
8 8
<link rel="shortcut icon" type="image/x-icon" href="images/favicon.png" media="screen" />
9 9
<link href="css/bootstrap.min.css" rel="stylesheet">
10 10
<link rel="stylesheet" href="css/reset.css" />
11 11
<link type="text/css" href="css/index.css" rel="stylesheet">
12 12
<link type="text/css" href="css/common.css" rel="stylesheet">
13 13
<link type="text/css" href="css/popup.css" rel="stylesheet">
14
<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
15
<style type="text/css">
16
	.searchblock{display:none;} 
17
</style>
14 18
</head>
15 19
<body>
16
<div id="header">
17
	<div class="containerCon">
18
	<a href="index.html" alt="科袖" class="logo"></a>
19
	<div class="searchblock searchbox">
20
<!--头部-->
21
<header id="header">
22
	<script src="js/header.js"></script>
23
</header>
24
	
25
	<!--<div class="searchblock searchbox">
20 26
		<input type="text" placeholder="搜索专家、研发资源" class="search-txt" id="hsearchContent">
21 27
		<div class="search-btn" id="hsearch1"><span class="search-icon"></span></div>
22
	</div>
28
	</div>-->
23 29

24
	<div class="header-right"> 
25
        <!--未登录-->
26
        <div class="unlogin">
27
	        	<a class="loginbtn loginlbtn" href="login-invite-code.html">特邀专家登录</a>
28
	        	<a class="loginbtn loginrbtn" href="login.html">登录&nbsp;&nbsp;|</a>
29
	        	<a class="loginbtn loginrbtn" href="register.html">注册</a>
30
	        </div>
31
        <!--已登录-->
32
        <div class="onlogin">
33
        	<a class="myWorkspace" href="workspaces.html">我的工作台</a>
34
	        <div class="head-portrait headRadius">
35
	        	<img class="portrait-p" />
36
	            <div class="personal-infor">
37
	                <div class="triangleB"></div>
38
	                <div class="personal-box bgRadius">
39
	                    <!-- <a href="#"><span class="icon icon1"></span>我的主页</a> -->
40
	                    <a href="information.html"><span class="icon icon2"></span>修改资料</a>
41
	                    <a href="account-set.html"><span class="icon icon3"></span>账户设置</a>
42
	                    <a href="#" onClick="exit()"><span class="icon icon4"></span>退出登录</a>
43
	                </div>
44
	                
45
	            </div>
46
	        </div>
47
        </div>
48
	</div>
49
	</div>
50
</div>
51 30
<div id="container">
52 31
	<div class="content">
53 32
        <div class="content-in">
@ -131,12 +110,21 @@
131 110
	<script type="text/javascript" src="js/footer.js"></script>
132 111
</footer>
133 112

134
<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
135 113
<script type="text/javascript" src="js/jquery.cookie.js"></script>
136 114
<script type="text/javascript" src="js/jquery.similar.msgbox.js"></script>
137 115
<script type="text/javascript" src="js/common.js"></script>
138 116
<script type="text/javascript" src="js/jquery.page.js"></script>
139 117
<script type="text/javascript" src="js/popup.js"></script>
140 118
<script type="text/javascript" src="js/search.js"></script>
119
<script type="text/javascript">
120
	$(document).scroll(function() {
121
		var top = $(document).scrollTop();
122
		if (top >= 80) {
123
			$(".searchblock").stop(true,false).fadeIn();
124
		}else{
125
			$(".searchblock").stop(true,false).fadeOut();
126
		}
127
	})
128
</script>
141 129
</body>
142 130
</html>