ws2z3gr2017 %!s(int64=7) %!d(string=hai) anos
pai
achega
146ccd431d
Modificáronse 5 ficheiros con 58 adicións e 77 borrados
  1. 4 2
      src/css/public.css
  2. 45 9
      src/js/public.js
  3. 6 6
      template/index.html
  4. 0 57
      template/registered.html
  5. 3 3
      webpack.config.js

+ 4 - 2
src/css/public.css

@@ -22,7 +22,7 @@ ul,ol{padding: 0;margin: 0;list-style: none;}
 /*顶部区域*/
 header{width: 100%;background: #ffffff;line-height: 74px;height: 74px;}
 header .logo{float: left;padding-left: 20px;}
-.h_fix{position: fixed;top: 0;left: 0;z-index: 99;box-shadow: 2px 4px 10px #CCCCCC;}
+.h_fix{position: fixed;top: 0px;left: 0;z-index: 99;box-shadow: 2px 4px 10px #CCCCCC;display:none;}
 
 header .nav{float: left;padding-left: 90px;}
 header .nav ul li{float: left;width: 120px;text-align: center;line-height: 76px;}
@@ -83,7 +83,7 @@ header .nav_right a:hover{color: #2a6597;}
 
 
 /*右侧挂件*/
-.pub_fix{width: 70px;position: fixed;right: 68px;bottom: 150px;border-radius: 10px;border: 1px solid #e0e0e0;overflow: hidden;text-align: center;height: 382px;}
+.pub_fix{width: 70px;position: fixed;right: 68px;bottom: 150px;border-radius: 10px;border: 1px solid #e0e0e0;overflow: hidden;text-align: center;height: 382px;background: #ffffff;}
 .pub_fix .index_blur{width: 100%;height: 30px;line-height: 30px;background: #4c7fa9;display: inline-block;}
 .pub_fix .index_orange{width: 100%;height: 30px;line-height: 30px;background: #ffd68f;display: inline-block;}
 .pub_fix ul li:first-child{border: none;}
@@ -93,6 +93,7 @@ header .nav_right a:hover{color: #2a6597;}
 .pub_fix ul li p {color: #074d88;font-size: 14px;}
 .pub_fix ul li a{text-decoration: none;}
 
+
 /*登陆页面*/
 .login{width: 100%;background: rgba(6,6,6,.4);position: fixed;top: 0;left: 0;z-index: 999;}
 .login_mian{width: 600px;background: #ffffff;position: absolute;top: 50%;margin-top: -200px;left: 50%;margin-left: -300px;padding-left: 60px;padding-top: 60px;padding-bottom: 96px;}
@@ -123,3 +124,4 @@ header .nav_right a:hover{color: #2a6597;}
 .login_close:hover{cursor: pointer;}
 
 .login_check label:first-child{margin-right: 15px;}
+.head_login:focus{text-decoration: none;}

+ 45 - 9
src/js/public.js

@@ -52,14 +52,15 @@ $(function(){
 	   $('.banner_box ul li').eq(curidx+1).find('img').attr('src',simg)
 	})	
 	//导航
+	 var headt=$('header').clone();
 	$(window).scroll(function(){
-		var scrolltop=$(document).scrollTop()
-			if(scrolltop>400){				
-				$('header').addClass('h_fix')				
-				$('body').css({paddingTop:'74px'})
-			}else{
-				$('header').removeClass('h_fix')
-				$('body').css({paddingTop:0})
+		var scrolltop=$(document).scrollTop()		
+			if(scrolltop>600){					
+				headt.addClass('h_fix');
+				$('body').append(headt)
+				$('.h_fix').slideDown(200)
+			}else{				
+				$('.h_fix').slideUp(200)					
 			}
 		});	
 		
@@ -141,11 +142,46 @@ $(function(){
 	})
 	$('form').submit(function(){
 		var Suser=$('#Lo_user').val();
-		var Spass=$('#Lo_pass').val();			
+		var Spass=$('#Lo_pass').val();	
+		var check_experts=$('#checks').prop('checked');		
+		var experts=check_experts?0:1;
+		console.log(Suser,Spass,experts)
 		if(Suser==''||Spass==''||Suser=='用户名/邮箱/手机'||Spass=='请输入密码'){			
 			return false;
 		}else{			
-			return true;																						
+			$.ajax({
+              method: "POST",
+              dataType: "json",
+              url: globalConfig.context + "/signin",
+              data: {
+                      "mobile": Suser,
+                      "password": Spass,
+                      "type": experts,
+                      "remember": false,
+              },
+              success: function (rest) {				
+					if (rest.error && rest.error.length) {					
+						message.warning(rest.error[0].message);		       			       																
+					} else {						
+						var  data = rest.data;
+                        if (data && data.requestURI) {
+                            var path = globalConfig.context + data.requestURI
+                            if (data.queryString) {
+                                path += '?' + data.queryString;
+                            }
+                            if (window.location.hash) {
+                                path += window.location.hash;
+                            }
+                            window.location.href = path;
+                        } else {
+                            window.location.href = globalConfig.context + "/user/account/index.html";
+                        }
+                        return true;
+					}
+				
+			   }
+          })
+                
 		}			
 	})
 		

+ 6 - 6
template/index.html

@@ -9,9 +9,9 @@
 	<meta name="viewport" content="width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1,user-scalable=no">
 	<meta http-equiv="x-ua-compatible" content="ie=edge">
     <title>首页</title>
-    <!--<link rel="stylesheet" href="../src/css/bootstrap.css" />
+    <link rel="stylesheet" href="../src/css/bootstrap.css" />
     <link rel="stylesheet" href="../src/css/public.css" />
-    <link rel="stylesheet" type="text/css" href="../src/css/index_home.css"/>-->
+    <link rel="stylesheet" type="text/css" href="../src/css/index_home.css"/>
 </head>
 <body>  	
   	<header>
@@ -19,8 +19,8 @@
   			<div class="logo"><a href="../template/index.html"><img src="../img/Logo111.png" alt="" title="技淘"/></a></div>
   			<div  class="nav">
   				<ul>
-  					<li class="active"><a href="#">科技服务</a><img src="../img/hot.png"/></li>
   					<li><a href="#">技术交易</a></li>
+  					<li><a href="#">科技服务</a><img src="../img/hot.png"/></li><!-- class="active"-->
   					<li><a href="#">智库咨询</a></li>
   					<li><a href="#">科技金融</a></li>
   					<li><a href="#">科技活动</a></li>
@@ -28,7 +28,7 @@
   				</ul>
   			</div>
   			<div class="nav_right">
-  				<a href="">注册</a>
+  				<a href="../template/registered.html">注册</a>
   				<a href="javascript:;" class="head_login">登陆</a>
   				<a href="">关于我们</a>
   			</div>
@@ -446,8 +446,8 @@
 		</div>
 		<img src="../img/login_close.png" alt="" class="login_close"/>
 	</div>
-	<!--<script type="text/javascript" src="../src/js/jquery-2.1.0.js"></script>
+	<script type="text/javascript" src="../src/js/jquery-2.1.0.js"></script>
 	<script type="text/javascript" src="../src/js/index.js"></script>
-	<script type="text/javascript" src="../src/js/public.js"></script>-->
+	<script type="text/javascript" src="../src/js/public.js"></script>
 </body>
 </html>

+ 0 - 57
template/registered.html

@@ -35,63 +35,6 @@
   			</div>
   		</div>
   	</header>
-  	<!--<div class="banner container">
-  		<div class="banner_box" >  			 		
-	  		<ul>
-	  			<li><img src="../img/banner1.png" alt="" class="banner_imgs"/></li>	  					  					  				  						  					  		
-	  			<li><img src="../img/x_banner02.png" alt="" class="banner_imgs"/></li> 		  					  					  									  					  			
-	  			<li><img src="../img/banner1.png" alt="" class="banner_imgs"/></li>	  			
-	  		</ul>
-	  	</div>
-  		<div class="index_tt">
-  			<div class="banner_txt">
-				<h3>1让每一项优秀的技术产生价值</h3>
-				<p>全方位的服务,一应俱全</p>
-				<p>专业的团队助您开启科技成果转化之路</p>
-				<div class="img_list">
-					<ol>
-						<li><img src="../img/x_banner01.png" alt="" /></li>
-						<li><img src="../img/x_banner02.png" alt="" /></li>
-						<li><img src="../img/x_banner03.png" alt="" /></li>
-						<li><img src="../img/x_banner04.png" alt="" /></li>
-						<li><img src="../img/x_banner05.png" alt="" /></li> 							
-					</ol>
-				</div>
-  			</div>
-  			<div class="banner_txt">
-				<h3>2让每一项优秀的技术产生价值</h3>
-				<p>全方位的服务,一应俱全</p>
-				<p>专业的团队助您开启科技成果转化之路</p>
-				<div class="img_list">
-					<ol>
-						<li><img src="../img/x_banner01.png" alt="" /></li>
-						<li><img src="../img/x_banner02.png" alt="" /></li>
-						<li><img src="../img/x_banner03.png" alt="" /></li>
-						<li><img src="../img/x_banner04.png" alt="" /></li>
-						<li><img src="../img/x_banner05.png" alt="" /></li> 							
-					</ol>
-				</div>
-  			</div>
-  			<div class="banner_txt">
-				<h3>3让每一项优秀的技术产生价值</h3>
-				<p>全方位的服务,一应俱全</p>
-				<p>专业的团队助您开启科技成果转化之路</p>
-				<div class="img_list">
-					<ol>
-						<li><img src="../img/x_banner01.png" alt="" /></li>
-						<li><img src="../img/x_banner02.png" alt="" /></li>
-						<li><img src="../img/x_banner03.png" alt="" /></li>
-						<li><img src="../img/x_banner04.png" alt="" /></li>
-						<li><img src="../img/x_banner05.png" alt="" /></li> 							
-					</ol>
-				</div>
-  			</div>
-  		</div>  		
-  		<div class="banner_mid">
-  			<img src="../img/index_pre.png" alt="" class="index_pre" />
-  			<img src="../img/index_next.png" alt="" class="banner_next" />
-  		</div>
-  	</div>-->
   	<!--主体内容区域开始-->
   	<div class="registered">
   		<div class="reg_con">

+ 3 - 3
webpack.config.js

@@ -26,10 +26,10 @@ module.exports = (function () {
         //         optimizationLevel: 9
         //     }
         // }),
-        new webpack.optimize.CommonsChunkPlugin({
+       new webpack.optimize.CommonsChunkPlugin({
             name: 'vendors'
         }),
-        new ExtractTextPlugin({
+         new ExtractTextPlugin({
             filename: "[name].css",
             disable: false,
             allChunks: true
@@ -51,7 +51,7 @@ module.exports = (function () {
             chunks: ['news', 'vendors']
         }),
          new HtmlWebpackPlugin({
-            title: '注册/登陆',
+            title: '注册',
             filename: 'html/registered.html',
             template: './template/registered.html',
             chunks: ['registered', 'vendors']