liting2017 hace 6 años
padre
commit
b23ca540d0
Se han modificado 7 ficheros con 275 adiciones y 423 borrados
  1. 7 7
      package-lock.json
  2. 12 21
      src/css/public.css
  3. 37 11
      src/css/register.css
  4. 11 14
      src/js/public.js
  5. 190 327
      src/js/register.js
  6. 1 7
      template/index.html
  7. 17 36
      template/register.html

+ 7 - 7
package-lock.json

@@ -1,6 +1,6 @@
 {
   "name": "aft-portal",
-  "version": "2.0.0",
+  "version": "2.0.6",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {
@@ -7808,12 +7808,6 @@
       "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=",
       "dev": true
     },
-    "string_decoder": {
-      "version": "0.10.31",
-      "resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-0.10.31.tgz",
-      "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
-      "dev": true
-    },
     "string-width": {
       "version": "1.0.2",
       "resolved": "http://registry.npm.taobao.org/string-width/download/string-width-1.0.2.tgz",
@@ -7825,6 +7819,12 @@
         "strip-ansi": "3.0.1"
       }
     },
+    "string_decoder": {
+      "version": "0.10.31",
+      "resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-0.10.31.tgz",
+      "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
+      "dev": true
+    },
     "stringstream": {
       "version": "0.0.5",
       "resolved": "http://registry.npm.taobao.org/stringstream/download/stringstream-0.0.5.tgz",

+ 12 - 21
src/css/public.css

@@ -1010,28 +1010,19 @@ header .nav_right .head_login {
 
 /*弹出消息提示*/
 
-.smg {
-	display: none;
-	width: 200px;
-	height: 50px;
-	background: rgba(200, 200, 200, .7);
-	position: fixed;
-	top: 10%;
-	left: 50%;
-	margin-left: -75px;
-	color: #00A2AE;
-	z-index: 999999;
-	border: 1px double #ccc;
-}
 
-.smg input {
-	width: 200px;
-	height: 50px;
-	border: none;
-	background: none;
-	text-align: center;
-	font-size: 16px;
-	line-height: 50px;
+/*弹出消息提示*/
+.smg{width: 260px;height: 40px;text-align: center;transform: scale(0) rotate(360deg);
+    line-height:40px;background:#17a2b8;border-radius: 10px;
+    position: fixed;top: -200px; left: 50%;margin-left: -130px;color:#ffffff;
+    transition: all .5s ease-in-out;
+}
+.smg input{width: 260px;height: 40px;border: none;background: none;text-align: center;font-size: 14px;}
+.smg.active{
+    transform: scale(1) rotate(0);
+    top: 200px;
+    z-index: 9999999999;
+    transition: all .5s ease-in;
 }
 
 

+ 37 - 11
src/css/register.css

@@ -25,9 +25,13 @@ ul,ol{padding: 0;margin: 0;list-style: none;}
 
 
 /*registered页面container的css*/
-.registered{width:100%;height:973px;}
+.registered{width:100%;height:973px;
+    background: -webkit-linear-gradient(left, #ccc , #17a2b8,#ccc); /* Safari 5.1 - 6.0 */
+    background: -o-linear-gradient(right, #ccc , #17a2b8,#ccc); /* Opera 11.1 - 12.0 */
+    background: -moz-linear-gradient(right, #ccc , #17a2b8,#ccc); /* Firefox 3.6 - 15 */
+    background: linear-gradient(to right, #ccc , #17a2b8,#ccc); /* 标准的语法 */}
 .reg_con{width:1200px;height:973px;margin:0 auto;
-    background-image:url(../../img/zhucebg5.jpg);}
+    background-image:url(../../img/zhucebg5.jpg) ;}
 .clear_first{width:100%;height:1px;}
 .zhuce{width:775px;height:515px;margin:0 auto;margin-top:80px;
     background: #fff; position: relative;}
@@ -38,7 +42,7 @@ line-height:50px;padding-left:50px;}
     position: absolute;top:50px;left:0;}
 .zhuce_input{width:255px;height:40px;border:1px solid #E5E5E5;
 margin-bottom:10px;line-height:38px;}
-.zhuce_input>input{border:none;}
+.zhuce_input>input{border:none;color:#ccc}
 .log_del{margin-left:15px;}
 .yanzheng{width:255px;height:40px;position: relative;margin-bottom:10px;}
 .yanzhengma{width:165px;height:40px;border:1px solid #E5E5E5;
@@ -53,7 +57,7 @@ margin-bottom:10px;line-height:38px;}
 input{border:none;padding-left:10px;}
 .cellcode>a{color:#F18101;}
 #photo{color:#ccc;display: inline-block;padding-left: 0;background: none;text-align: center;}
-#photo_num{display: inline-block;}
+#photo_num{display: inline-block}
 .leibie{width:120px;height:30px;display:inline-block;color:#F18101;font-size: 1.4rem;
     line-height: 28px;font-weight: bold;padding-left: 20px;position: relative;}
 .leibie input{display:inline-block;width:15px;height:15px;margin-right: 5px;position: absolute;
@@ -79,16 +83,21 @@ font-size: 1.8rem;font-weight: bold;letter-spacing:20px;}
 position: absolute;top:0;left:0;}
 .denglu>a{color:#F18101;}
 .huodong{position: absolute;top:20px;left:0;}
-.login_{width: 100%;background: rgba(6,6,6,.4);position: fixed;
+.login_{width: 100%;background: rgba(6,6,6,.4);position: fixed; display: none;height: 100%;
     top: 0;left: 0;z-index: 999;}
-.login_close_{position: absolute;top: 50px;right: 576px;width: 24px;
+.login_close_{position: absolute;top:21%;right: 576px;width: 24px;
     height: 22px;z-index: 2000;cursor: pointer;}
-.login_main_{width:800px;height:600px;background-color: #fff;
-margin:40px auto;padding: 20px 50px;overflow-y: auto;box-shadow: 0 10px 10px 0 #777;}
+.login_main_{width:800px;height:60%;background-color: #fff;position: absolute;top: 20%;left: 50%;margin-left: -400px;
+padding: 20px 50px;overflow-y: auto;box-shadow: 0 10px 10px 0 #777;}
 .title_{line-height: 50px;}
 .longin_foot{line-height: 50px;}
 #userpassword{width: 190px;}
 
+.star{
+    float: right;
+    color: red;
+    margin-right: -20px;
+}
 
 /*登陆页面*/
 .login{width: 100%;background: rgba(6,6,6,.4);position: fixed;top: 0;left: 0;z-index: 999;}
@@ -127,11 +136,28 @@ margin:40px auto;padding: 20px 50px;overflow-y: auto;box-shadow: 0 10px 10px 0 #
     background-size:120% 100%;}
 .bottom{margin-top:0;}
 
+.glyphicon-user,.glyphicon-phone{
+    vertical-align: top;
+    margin-top: 10px;
+    font-size: 18px;
+    padding: 0 10px;
+    border-right: 1px solid #E5E5E5;
+}
 
 /*弹出消息提示*/
-.smg{width: 260px;height: 40px;text-align: center;line-height:40px;background: rgba(100,100,100,.3);border-radius: 10px;position: fixed;top: 50%;margin-top: -15px;left: 50%;margin-left: -75px;color: dodgerblue;}
-.smg input{width: 260px;height: 40px;border: none;background: none;text-align: center;font-size: 16px;}
-
+.smg{width: 260px;height: 40px;text-align: center;transform: scale(0) rotate(360deg);
+    line-height:40px;background:#17a2b8;border-radius: 10px;
+    position: fixed;top: -200px; left: 50%;margin-left: -130px;color:#ffffff;
+    transition: all .5s ease-in-out;
+}
+.smg input{width: 260px;height: 40px;border: none;background: none;text-align: center;font-size: 14px;}
+.smg.active{
+    left: 50%;margin-left: -130px;
+    transform: scale(1) rotate(0);
+    top: 200px;
+    z-index: 9999999999;
+    transition: all .5s ease-in;
+}
 
 
 

+ 11 - 14
src/js/public.js

@@ -87,7 +87,7 @@ $(function(){
 		var Spass=$('#Lo_pass').val();	
 		var check_experts=$('#checks').prop('checked');		
 		var experts=check_experts?0:1;		
-		if(Suser==''||Spass==''||Suser=='用户名/邮箱/手机'||Spass=='请输入密码'){			
+		if(Suser==''||Spass==''){			
 			return false;
 		}else{			
 			$.ajax({
@@ -95,10 +95,9 @@ $(function(){
               dataType: "json",
               url: globalConfig.context + "/signin",
               data: {
-                      "mobile": Suser,
+                      "username": Suser,
                       "password": Spass,
-                      "type": experts,
-                      "remember": false
+                      "type": 0
               },
               success: function (rest) {				
 					if (rest.error && rest.error.length) {					
@@ -125,16 +124,14 @@ $(function(){
 		}			
 	})
 	//提示框渐隐函数    
-    function msg(){
-    	var lit=$('#msg').val();
-    	if(lit!==''){
-    		$('.smg').fadeIn(500)
-    	}
-    	setTimeout(function(){
-    		$('.smg').fadeOut(500)
-    		$('#msg').val('')
-    	},2000)
-    }  	  
+	function msg() {
+        $('.smg').addClass('active')
+        var lit = $('#msg').val();
+        setTimeout(function () {
+            $('.smg').removeClass('active')
+            $('#msg').val('');
+        }, 2000)
+    } 	  
     
     //在线客服
 		      (function(m, ei, q, i, a, j, s) {

+ 190 - 327
src/js/register.js

@@ -3,379 +3,242 @@ import 'bootstrap/dist/js/bootstrap.js';
 import '../css/public.css';
 import '../css/register.css';
 import './public.js';
+import { DH_NOT_SUITABLE_GENERATOR } from 'constants';
 
 
-$(function(){
+$(function () {
     //查看技淘网协议
-    var hht=$(window).height();
-    $('.login_').height(hht);    
-    $('.head_login_').click(function(e){
+    var hht = $(window).height();
+    $('.login_').height(hht);
+    $('.head_login_').click(function (e) {
         e.preventDefault();
         $('.login_').fadeIn(800)
     })
-    $('.login_close_').click(function(){
+    $('.login_close_').click(function () {
         $('.login_').fadeOut(800)
     })
     //登陆
-    var hht=$(window).height();
+    var hht = $(window).height();
     $('.login').height(hht);
     $('.login').hide()
-    $('.head_login').click(function(e){
+    $('.head_login').click(function (e) {
         e.preventDefault();
         $('.login').fadeIn(800)
     })
-    $('.login_close').click(function(){
+    $('.login_close').click(function () {
         $('.login').fadeOut(800)
     })
-    //选择专家和企业时要切换
-    var panduan;
-    $("#qiye").click(function(){
-        panduan=$('#zhuangjia').prop("checked") ? '0' : '1';        
-        if(panduan==1){
-            $(".businessName").css("display","block");
-            $(".linkmanName").css("display","block");
-            $(".zhuangjiaName").css("display","none");
-        }
-    });
-    $("#zhuangjia").click(function(){
-        panduan=$('#zhuangjia').prop("checked") ? '0' : '1';      
-        if(panduan==0){
-            $(".businessName").css("display","none");
-            $(".linkmanName").css("display","none");
-            $(".zhuangjiaName").css("display","block");
-        }
-    });
     //点击账号后面那个×,清空账号
-    $(".log_del").click(function(){
-        $("#username").val("");     
-        $("#photo").css("color","#ccc");            
-    });
-    //修改单选框的样式
-    $("#qiye").prop('checked',true); 
-    $('#qiye').click(function(){
-        var Cheack=$(this).prop('checked')       
-        if(Cheack){
-            $(this).parent().addClass('cheackeds').removeClass('cheackeds_no');
-            $('#zhuangjia').prop('checked',false)
-            $('#zhuangjia').parent().addClass('cheackeds_no').removeClass('cheackeds');
-        }else{
-            $('#zhuangjia').prop('checked',true)
-            $('#zhuangjia').parent().addClass('cheackeds').removeClass('cheackeds_no');
-            $(this).parent().addClass('cheackeds_no').removeClass('cheackeds');
-        }
-    })
-    $('#zhuangjia').click(function(){
-        var Cheack_no=$(this).prop('checked')     
-        if(Cheack_no){
-            $(this).parent().addClass('cheackeds').removeClass('cheackeds_no');
-            $('#qiye').prop('checked',false)
-            $('#qiye').parent().addClass('cheackeds_no').removeClass('cheackeds');
-        }else{
-            $('#qiye').prop('checked',true)
-            $('#qiye').parent().addClass('cheackeds').removeClass('cheackeds_no');
-            $(this).parent().removeClass('cheackeds').addClass('cheackeds_no');
-        }
-    })     
-    var xieyi=$('#protocol').prop("checked",false);
+    $(".log_del").click(function () {
+        $("#username").focus().val("").css('color','#666');
+    });    
+    var xieyi = $('#protocol').prop("checked", false);
     $('.sub').attr('disabled', true)
-    $('.sub').css({background: '#CCCCCC',border: 'none'})
-    $('#protocol').click(function(){
-        var Cheack_no=$(this).prop('checked')        
-        if(Cheack_no){        	
+    $('.sub').css({
+        background: '#CCCCCC',
+        border: 'none'
+    })
+    $('#protocol').click(function () {
+        var Cheack_no = $(this).prop('checked')
+        if (Cheack_no) {
             $(this).parent().removeClass('cheackeds_no').addClass('cheackeds');
             $('.sub').attr('disabled', false);
-            $('.sub').css({background: '#F18101',border: 'none'})    
-        }else{
-             $(this).prop('checked',false)	
-             $(this).parent().addClass('cheackeds_no').removeClass('cheackeds');
-       		 $('.sub').attr('disabled', true)
-   	         $('.sub').css({background: '#CCCCCC',border: 'none'}) 
-        }       
+            $('.sub').css({
+                background: '#F18101',
+                border: 'none'
+            })
+        } else {
+            $(this).prop('checked', false)
+            $(this).parent().addClass('cheackeds_no').removeClass('cheackeds');
+            $('.sub').attr('disabled', true)
+            $('.sub').css({
+                background: '#CCCCCC',
+                border: 'none'
+            })
+        }
     })
 
-    //密码
-    function pass1(){
-        $('#userpassword').blur(function () {
-        	var pass_pattern=/^\w{6,12}$/;
-            var pass1 = $(this).val();
-            var tt=$('#userpassword2').val();
-            if (pass1==''||!pass_pattern.test(pass1)) {
-                $(this).val('');
-                $(this).attr('placeholder', '请输入6-12位数密码');
-            } ; 
-            if ($(this).val() == ''||tt!==pass1) {
-            	$('#userpassword2').val('')
-                $('#userpassword2').attr('placeholder', '确认密码')
-            } ;
-        });
-    }
-    pass1();
-    //密码相同
-    pass2();
-    function pass2(){
-        //密码相同验证			
-        $('#userpassword2').blur(function () {
-            var orepeat = $(this).val();
-            var passw = $('#userpassword').val();
-            if (passw !== orepeat||passw == '') {
-                $(this).val('');
-                $(this).attr('placeholder', '确认密码')
-            } 
-        });      
-    }
     //手机号码
-    function photo1(){
-        var pho_pattern=/^1[3|4|5|7|8][0-9]{9}$/;
-        $("#username").keyup(function(){       	
-            var phol= $(this).val();            
-            if(pho_pattern.test(phol)){
+    let oldPhoto='';
+    $('#photo').attr('disabled', true);
+    function photo1() {
+        var pho_pattern = /^1[3|4|5|7|8][0-9]{9}$/;
+        $("#usePhoto").keyup(function () {
+            oldPhoto = $(this).val();
+            if (pho_pattern.test(oldPhoto)) {
                 $('#photo').attr('disabled', false);
-                $("#photo").css("color","#F18101");
-            }else if(!pho_pattern.test(phol)){
+                $("#photo").css("color", "#F18101");
+            } else if (!pho_pattern.test(oldPhoto)) {
                 $('#photo').attr('disabled', true);
-                $("#photo").css("color","#ccc");
+                $("#photo").css("color", "#ccc");
             }
         });
-        $('#username').blur(function () {
-            var pho= $(this).val();
-            if (pho==''||!pho_pattern.test(pho)) {
-                $(this).val('');
-                $(this).attr('placeholder', '请输入正确的号码')               
-            } else{
-                $('#photo').attr('disabled', false);
-                $("#photo").css("color","#F18101");
-            }
-        })
     }
     photo1();
-
     //手机验证码
-    function photo_num(){
+    function photo_num() {
         $('#photo_num').blur(function () {
             var phoa = $(this).val();
-            if (phoa=='') {
-                $(this).val('');
-                $(this).attr('placeholder', '请输入手机上的验证码');
+            if (phoa == '') {
+                $(this).val('验证码不能为空').css({color:'#f00'});
             }
         })
     }
     photo_num();
-    //单位名称
-    function photo_name(){
-        $('#business').blur(function () {
-            var name = $(this).val();
-            if (name=='') {
-                $(this).val('');
-                $(this).attr('placeholder', '单位名称');
+    /* 获得焦点处理 */
+    $('#username,#customerName,#usePhoto,#photo_num').focus(function(){
+        let val = $(this).val();
+        if(val.indexOf('用户名')>-1||val.indexOf('下划线')>-1||val.indexOf('客户')>-1||val.indexOf('手机')>-1||val.indexOf('验证码')>-1){
+            $(this).val('').css({color:'#333'})
+        }
+    })
+    $('#userpassword,#userpassword2').focus(function(){
+        let passVal =$(this).val();
+        if(passVal.indexOf('密码')){
+            $(this).attr('type','password').val('').css({color:'#333'})
+        }
+    })
+    /*失去焦点处理 */
+    blurFun();
+    function blurFun(){
+        $('#username').blur(function(){
+            let nameRax  =  /^[a-zA-Z0-9_-]{6,32}$/;
+            if(!$(this).val().trim()){
+                $(this).val('请填写用户名').css({color:'#f00'})
+            }else if(!nameRax.test($(this).val())){
+                $(this).val('6-32位字母/数字/下划线').css({color:'#f00'})
             }
         })
-    }
-    photo_name();
-    //联系人名称
-    function lxr_name(){
-        $('#linkman').blur(function () {
-            var name = $(this).val();
-            if (name=='') {
-                $(this).val('');
-                $(this).attr('placeholder', '单位联系人姓名');
+        $('#userpassword').blur(function () {
+            var pass_pattern = /^[a-zA-Z\d_]{6,12}$/;
+            var pass1 = $(this).val().trim();
+            var tt = $('#userpassword2').val().trim();
+            if (!pass1|| !pass_pattern.test(pass1)) {
+               $(this).attr('type',"text")
+               $(this).val('请输入6-12位数字母开头密码').css({color:'#f00'});
+                return;
+            }else{
+                $(this).attr('type','password');   
+            };
+            if (pass1 || tt !== pass1) {
+                $('#userpassword2').attr('type',"text")
+                $('#userpassword2').val('两次密码不一致').css({color:'#f00'});
+                return;
+            };
+        });
+        $('#customerName').blur(function(){
+            if(!$(this).val().trim()){
+                $(this).val('请填写客户名称').css({color:'#f00'})
             }
-        })
-    }
-    lxr_name();
-    //专家名称
-    function zj_name(){
-        $('#man').blur(function () {
-            var name = $(this).val();
-            if (name=='') {
-                $(this).val('');
-                $(this).attr('placeholder', '请填写您的姓名');
+        });
+        $('#usePhoto').blur(function(){
+            if(!$(this).val().trim()){
+                $(this).val('请填写手机号码').css({color:'#f00'})
             }
-        })
+        });
+        $('#userpassword2').blur(function () {
+            var orepeat = $(this).val();
+            var passw = $('#userpassword').val();
+            if (passw !== orepeat || passw == '') {
+                $(this).attr('type','text')
+                $(this).val('两次密码不一致').css({color:'#f00'})
+            }
+        });
     }
-    zj_name();   
     //表单提交
-    $("#form_register").submit(function(e) {    	
-        var user = $("#username").val();
-        var password1 = $("#userpassword").val();
-        var password2 = $("#userpassword2").val();
-        var types = $('#zhuangjia').prop("checked") ? '0' : '1';//团体/个人
-        var oname = $('#business').val();//企业名称
-        var opeople = $('#linkman').val();//企业联系人
-        var people=$('#man').val();//企业联系人
-        var Code = $("#piccode").val();
-        var mobileCode = $('#photo_num').val();//手机验证码
-        e.preventDefault();  
-        if(user==''||password1==''||password2==''||Code==''||mobileCode==''){       	
-        	return false;
-        }else if(types==0){
-        	if(people==''){        		
-        		return false;
-        	}else{       		        	        		
-	            $.ajax({
-	                type: "POST",
-	                dataType: "json",
-	                url: globalConfig.context + "/register",	                
-	                data: {
-	                    "mobile": user,
-	                    "password": password1,
-	                    "type": types,
-	                    "unitName": people,
-	                    "username": people,
-	                    "mobileCode": mobileCode
-	                },
-	                success: function (rest) {
-	                    if (rest.error && rest.error.length) {
-	                         $('#msg').val(rest.error[0].message);
-	                         msg();
-	                    } 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;
-	                    }
-	                }
-	            })
-	           
-        	}
-        }	
-	     else if(types==1){
-	        	if(opeople==''||oname==''){	        		
-	        		return false;
-        		}else{
-		            $.ajax({
-		                type: "POST",
-		                dataType: "json",
-		                url: globalConfig.context + "/register",
-		                data: {
-		                    "mobile": user,
-		                    "password": password1,
-		                    "type": types,
-		                    "unitName": oname,
-		                    "username": opeople,
-		                    "mobileCode": mobileCode
-		                },
-		                success: function (rest) {
-		                    if (rest.error && rest.error.length) {
-		                        $('#msg').val(rest.error[0].message);
-		                        msg();
-		                    } 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;
-		                    }
-		                }
-		            })
-	       		}       
-  		}
-	})
-    //点击刷新图片验证码
-    $('.yanzhengma_cont').click(function () {
-        $('.yanzhengma_cont img').attr('src', (globalConfig.context + "/open/getVCode?t=" + Math.random()))
+    $("#form_register").submit(function (e) {
+        var user = $("#username").val(),
+            usePhoto = $('#usePhoto').val(),
+            password1 = $("#userpassword").val(),
+            password2 = $("#userpassword2").val(),
+            customerName = $('#customerName').val(),
+            mobileCode = $('#photo_num').val(); //手机验证码
+        e.preventDefault();
+        if(user.indexOf('用户名')>-1||customerName.indexOf('客户')>-1||password1.indexOf('密码')>-1||password2.indexOf('密码')>-1||usePhoto.indexOf('手机')>-1||mobileCode.indexOf('验证码')>-1){
+            $('#msg').val('请填写必填项');
+            msg();
+            return;
+        } else {
+            $.ajax({
+                type: "POST",
+                dataType: "json",
+                url: globalConfig.context + "/register",
+                data: {
+                    "username": user,
+                    "password": password1,
+                    "unitName": customerName,
+                    "mobile": usePhoto,
+                    "mobileCode": mobileCode
+                },
+                success: function (rest) {
+                    if (rest.error && rest.error.length) {
+                        $('#msg').val(rest.error[0].message);
+                        msg();
+                    } else {
+                        var data = rest.data;
+                        console.log(data)
+                        $('#msg').val("注册成功!");
+                        msg();
+                        setTimeout(()=>{
+                            window.location.href = globalConfig.context + "/user/signIn.html";
+                        },2000)
+                    }
+                }
+            })
+        }
     })
-    var tt = 30;    
-    $('#photo').attr('disabled',false)
-    $('#photo').css({color:'#f18101',lineHeight:'37px',padding:'0px 1px'})
+    var tt = 30;
     $('#photo').click(function () {
-    	if(piccode.value&&username.value){
-        //手机验证功能
-        var ophoto = $('#username').val();
-        var types = $('#zhuangjia').prop("checked") ? '0' : '1';        
-        var phott = $('#piccode').val();
-        $.ajax({
-            type: "GET",
-            url: globalConfig.context + "/open/getMCode",
-            data: {
-                "mobile": ophoto,
-                "sign": false,
-                "type": types,
-                "verificationCode": phott
-            },
-            success: function (data) {
-                if (data.error && data.error.length) {
-                    $('#msg').val(data.error[0].message); 
-                    msg();
-                    $('.yanzhengma_cont').click();
-                } else { 
-                	$('#msg').val('发送成功');
-                     //验证码倒计时
-                    $('#photo').attr('disabled', true);
-                    var timer = setInterval(function () {
-			            tt -= 1;
-			            $('#photo').val("发送"+'('+tt+'s'+')');
-			            $('#photo').css({color:'#cccccc'})
-			            if (tt == 0) {
-			                clearInterval(timer);
-			                $('#photo').attr('disabled', false);
-			                tt=30;
-			                $('#photo').css({color:'#f18101'})
-			                $('#photo').val('重新发送');
-			            }
-			        }.bind(this), 1000);
-			        msg();
+        var ophoto = $('#usePhoto').val().trim();
+        if (ophoto) {
+            $.ajax({
+                type: "GET",
+                url: globalConfig.context + "/open/getMCode",
+                data: {
+                    "mobile": ophoto,
+                    "sign": false,
+                },
+                success: function (data) {
+                    if (data.error && data.error.length) {
+                        $('#msg').val(data.error[0].message);
+                        msg();
+                    } else {
+                        $('#msg').val('发送成功');
+                        //验证码倒计时
+                        $('#photo').attr('disabled', true);
+                        var timer = setInterval(function () {
+                            tt -= 1;
+                            $('#photo').val("发送" + '(' + tt + 's' + ')');
+                            $('#photo').css({
+                                color: '#cccccc'
+                            })
+                            if (tt == 0) {
+                                clearInterval(timer);
+                                $('#photo').attr('disabled', false);
+                                tt = 30;
+                                $('#photo').css({
+                                    color: '#f18101'
+                                })
+                                $('#photo').val('重新发送');
+                            }
+                        }.bind(this), 1000);
+                        msg();
+                    }
+                    return true;
                 }
-                return true;
-            }
-        });
-        }else{
-        	$('#msg').val('验证码/手机号码不能为空');
+            });
+        } else {
+            $('#msg').val('请填写手机号码!');
             msg();
         }
     });
     //提示框渐隐函数
-    $('.smg').hide();
-    function msg(){
-    	var lit=$('#msg').val();
-    	if(lit!==''){
-    		$('.smg').fadeIn(500);
-    	}
-    	setTimeout(function(){
-    		$('.smg').fadeOut(500);
-    		$('#msg').val('');
-    	},2000)
-    }  
-    
-   
-   
-});
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+    function msg() {
+        $('.smg').addClass('active')
+        var lit = $('#msg').val();
+        setTimeout(function () {
+            $('.smg').removeClass('active')
+            $('#msg').val('');
+        }, 2000)
+    }
+});

+ 1 - 7
template/index.html

@@ -885,7 +885,7 @@
 				<form  id="form_login">
 					<div class="login_uesr">
 						<label for="uesname"><img src="../img/login_use.png"/></label>
-						<input type="text" name="uesname" id="Lo_user" placeholder="用户名/邮箱/手机" />
+						<input type="text" name="uesname" id="Lo_user" placeholder="用户名" />
 						<img src="../img/login_del.png" class="log_del"/>
 					</div>
 					<div class="login_pass">
@@ -893,12 +893,6 @@
 						<input type="password" name="pass" id="Lo_pass" placeholder="请输入密码" />
 					</div>
 					<div class="login_check">
-						<label for="checks" class="lab_check">
-							<input type="checkbox" name="type" id="checks" />我是专家
-						</label>
-						<label for="checkst" class="lab_checkno">
-							<input type="checkbox" name="type" id="checkst" />我是企业
-						</label>
 						<a href="">忘记密码?</a>
 					</div>
 					<input type="submit" value="登 陆" class="login_submit"/>

+ 17 - 36
template/register.html

@@ -42,49 +42,36 @@
 				<div class="regist">
 					<div class="zhuce_input">
 						<img src="../img/name.jpg" alt=""/>
-						<input type="text" name="userName" placeholder="用户名/邮箱/手机"  id="username"/>
+						<input type="text" name="userName" value="请输入用户名"  id="username" autocomplete="off"/>
 						<img src="../img/login_del.png" class="log_del"/>
+						<span class="star"> * </span>
 					</div>
 					<div class="zhuce_input">
 						<img src="../img/pass2.jpg" alt=""/>
-						<input type="password" name="userPassword" placeholder="请输入密码" id="userpassword"/>
+						<input type="text" name="userPassword" value="请输入密码" id="userpassword" autocomplete="off"/>
+						<span class="star"> * </span>
 					</div>
 					<div class="zhuce_input">
 						<img src="../img/pass2.jpg" alt=""/>
-						<input type="password" name="userPassword2" placeholder="确认密码" id="userpassword2"/>
+						<input type="text" name="userPassword2" value="确认密码" id="userpassword2" autocomplete="off"/>
+						<span class="star"> * </span>
 					</div>
-					<div class="yanzheng">
-						<div class="yanzhengma">
-							<input type="text" name="picCode" placeholder="验证码" id="piccode"/>
-						</div>
-						<div class="yanzhengma_cont">
-							<img th:src="${basePath+'/open/getVCode'}"/>
-						</div>
+					<div class="zhuce_input">
+						<span class="glyphicon glyphicon-user"></span>
+						<input type="text" name="customerName" value="请输入客户名称" id="customerName" autocomplete="off"/>
+						<span class="star"> * </span>
+					</div>
+					<div class="zhuce_input">
+						<span class="glyphicon glyphicon-phone"></span>
+						<input type="text" name="photo" value="请输入手机号码" id="usePhoto" autocomplete="off"/>
+						<span class="star"> * </span>
 					</div>
 					<div class="cellcode">
 						<div>
-							<input type="text" name="cellCode" placeholder="手机验证码" id="photo_num"/>
+							<input type="text" name="cellCode" value="手机验证码" id="photo_num" autocomplete="off" />
 						</div>
 						<input type="button" id="photo" value="获取验证码" />
 					</div>
-					<div class="login_check">
-						<label for="qiye" class="qiye_lab cheackeds">
-							<input type="radio" name="leibie" id="qiye" value="1" checked/>
-							我是企业</label>
-
-						<label for="zhuangjia" class="zhuangjia_lab cheackeds_no">
-							<input type="radio" name="leibie" id="zhuangjia" value="0"/>
-							我是专家</label>
-					</div>
-					<div class="businessName">
-						<input type="text" name="businessName" placeholder="单位名称" id="business"/>
-					</div>
-					<div class="linkmanName">
-						<input type="text" name="linkmanName" placeholder="单位联系人姓名" id="linkman"/>
-					</div>
-					<div class="zhuangjiaName">
-						<input type="text" name="manName" placeholder="您的姓名" id="man"/>
-					</div>
 					<div class="protocol">
 						<label for="protocol" class="cheackeds_no">
 							<input type="checkbox" name="pro" id="protocol"/>
@@ -233,7 +220,7 @@
 			<form action="" method="post"  id="form_login">
 				<div class="login_uesr">
 					<label for="uesname"><img src="../img/login_use.png"/></label>
-					<input type="text" name="uesname" id="Lo_user" placeholder="用户名/邮箱/手机" />
+					<input type="text" name="uesname" id="Lo_user" placeholder="用户名" />
 					<img src="../img/login_del.png" class="log_del"/>
 				</div>
 				<div class="login_pass">
@@ -241,12 +228,6 @@
 					<input type="password" name="pass" id="Lo_pass" placeholder="请输入密码" />
 				</div>
 				<div class="login_check">
-					<label for="checks" class="lab_check">
-						<input type="checkbox" name="type" id="checks" />专家
-					</label>
-					<label for="checkst" class="lab_checkno">
-						<input type="checkbox" name="type" id="checkst" />企业
-					</label>
 					<u><a href="">忘记密码?</a></u>
 				</div>
 				<input type="submit" value="登 陆" class="login_submit"/>