You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

145 lines
5.3 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. <!DOCTYPE html><html><head><meta http-equiv="content-type" content="text/html;charset=utf-8"/>
  2. <title>注册</title><meta name="keywords" content="关键词"><meta name="description" content="描述"><meta content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport">
  3. <link href="<?php echo env('APP_URL'); ?>/css/weixin/style.css" type="text/css" rel="stylesheet">
  4. <script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/jquery.min.js"></script>
  5. <script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/weixin/mobile.js"></script>
  6. <link href="<?php echo env('APP_URL'); ?>/css/font-awesome.min.css" type="text/css" rel="stylesheet"></head><body>
  7. <div class="classreturn loginsignup">
  8. <div class="ds-in-bl return"><a href="javascript:history.back(-1);"><img src="<?php echo env('APP_URL'); ?>/images/weixin/return.png" alt="返回"></a></div>
  9. <div class="ds-in-bl tit center"><span>注册</span></div>
  10. <div class="ds-in-bl nav_menu"><a href="javascript:void(0);"><img src="<?php echo env('APP_URL'); ?>/images/weixin/class1.png" alt="菜单"></a></div>
  11. </div>
  12. @include('weixin.common.headerNav')
  13. <style>
  14. .account{text-align:center;margin-top:30px;}
  15. .account .icon{color:#FFCC00;font-size:100px;}
  16. .bottoma{display:block;font-size:18px;padding:10px;border-radius:2px;}
  17. .adr_add{margin:0 10px;}
  18. .adr-form-group{margin-top:10px;}
  19. .adr-form-group input[type=text],.adr-form-group input[type=password]{display:block;width:100%;font-size:16px;padding:12px;color:#777;vertical-align:middle;background-color:#fff;background-image:none;border:1px solid #ddd;border-radius:0;box-sizing:border-box;}
  20. .reg a{color:#2393df;}
  21. </style>
  22. <div class="floor account">
  23. <div class="icon"><i class="fa fa-user-circle" aria-hidden="true"></i></div>
  24. <br>
  25. <form id="login" action="" method="post">
  26. <div class="adr_add">
  27. <div class="adr-form-group">
  28. <input type="text" name="user_name" class="" id="user_name" placeholder="请输入用户名">
  29. </div>
  30. <div class="adr-form-group">
  31. <input type="text" name="mobile" class="" id="mobile" placeholder="请输入手机号码">
  32. </div>
  33. <div class="adr-form-group">
  34. <input type="password" name="password" class="" id="password" placeholder="请设置6-20位登录密码">
  35. </div>
  36. <div class="adr-form-group">
  37. <input type="password" name="re_password" class="" id="re_password" placeholder="确认密码">
  38. </div>
  39. <div class="adr-form-group">
  40. <input type="text" name="parent_mobile" class="" id="parent_mobile" placeholder="请输入推荐人手机号,选填">
  41. </div>
  42. </div>
  43. </form>
  44. <a style="margin:10px;background-color:#1aad19;text-align:center;color:white;border:1px solid #179e16;" class="bottoma" href="javascript:submit();">提交</a>
  45. </div>
  46. <div class="box reg">
  47. <a style="float:left;" href="<?php echo route('weixin_login'); ?>">已有账号</a> <span style="float:right;"><a href="<?php echo route('weixin_login'); ?>">注册协议</a></span>
  48. </div><br><br>
  49. <script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/md5.min.js"></script>
  50. <script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/layer/mobile/layer.js"></script>
  51. <script>
  52. function submit()
  53. {
  54. var user_name = $("#user_name").val();
  55. var mobile = $("#mobile").val();
  56. var password = $("#password").val();
  57. var re_password = $("#re_password").val();
  58. var parent_mobile = $("#parent_mobile").val();
  59. if(user_name == '')
  60. {
  61. layer.open({
  62. content: '用户名不能为空'
  63. ,skin: 'msg'
  64. ,time: 2 //2秒后自动关闭
  65. });
  66. return false;
  67. }
  68. if(mobile == '')
  69. {
  70. layer.open({
  71. content: '手机号不能为空'
  72. ,skin: 'msg'
  73. ,time: 2 //2秒后自动关闭
  74. });
  75. return false;
  76. }
  77. if(!validatemobile(mobile))
  78. {
  79. layer.open({
  80. content: '手机号格式不正确'
  81. ,skin: 'msg'
  82. ,time: 2 //2秒后自动关闭
  83. });
  84. return false;
  85. }
  86. if(password == '')
  87. {
  88. layer.open({
  89. content: '密码不能为空'
  90. ,skin: 'msg'
  91. ,time: 2 //2秒后自动关闭
  92. });
  93. return false;
  94. }
  95. if(password != re_password)
  96. {
  97. layer.open({
  98. content: '两次密码不一致'
  99. ,skin: 'msg'
  100. ,time: 2 //2秒后自动关闭
  101. });
  102. return false;
  103. }
  104. //$("#login").submit();
  105. $.post('<?php echo env('APP_API_URL').'/wx_register'; ?>',{user_name:user_name,mobile:mobile,parent_mobile:parent_mobile,password:md5(password)},function(res)
  106. {
  107. if(res.code==0)
  108. {
  109. //提示
  110. layer.open({
  111. content: '注册成功'
  112. ,skin: 'msg'
  113. ,time: 2 //2秒后自动关闭
  114. });
  115. setInterval(function(){location.href = '<?php echo route('weixin_login'); ?>';},5000);
  116. }
  117. else
  118. {
  119. layer.open({
  120. content: res.msg
  121. ,skin: 'msg'
  122. ,time: 2 //2秒后自动关闭
  123. });
  124. }
  125. },'json');
  126. }
  127. </script>
  128. @include('weixin.common.footer')
  129. </body></html>