Sin descripción
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.

users_reg.htm 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>注册账号-{eyou:global name='web_name' /}</title>
  6. <meta name="renderer" content="webkit">
  7. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  8. <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
  9. <link href="{eyou:global name='web_cmspath'/}/favicon.ico" rel="shortcut icon" type="image/x-icon" />
  10. {eyou:static file="users/skin/css/basic.css" /}
  11. {eyou:static file="users/skin/css/eyoucms.css" /}
  12. {eyou:include file="users/skin/css/diy_css.htm" /}
  13. {eyou:static file="/public/static/admin/font/css/iconfont.css"/}
  14. {eyou:static file="/public/static/common/js/jquery.min.js"/}
  15. {eyou:static file="/public/plugins/layer-v3.1.0/layer.js"/}
  16. {eyou:static file="users/skin/js/global.js" /}
  17. </head>
  18. <body class="reg regi">
  19. <div class="register_index ey-member" style="overflow: visible;">
  20. <div class="container">
  21. <div class="form-register panel-body fv-form">
  22. <div class="mip-reg-logo">
  23. <a href="{eyou:global name='web_cmsurl' /}" class="ey-logo"><img src="{eyou:global name='web_logo'/}" /></a>
  24. </div>
  25. <div class="mip-reg-heading" style="display: none;">
  26. <div class="tab_list">
  27. <ul>
  28. <li data-index="0" class="current">账号注册</li>
  29. <li data-index="1" >手机注册</li>
  30. </ul>
  31. </div>
  32. </div>
  33. <div class="tab_con">
  34. <div class="item" style="display: block;">
  35. <form name='theForm' id="theForm" method="post" class="form-register">
  36. <div class="form-group group_z">
  37. <input type="text" id="username" name="username" required class="form-control h60" placeholder="用户名" autocomplete="off" />
  38. </div>
  39. <div class="form-group group_z">
  40. <input type="password" id="password" name="password" required class="form-control h60" placeholder="登录密码" autocomplete="off" />
  41. </div>
  42. <div class="form-group group_z">
  43. <input type="password" id="password2" name="password2" required data-password="password" class="form-control h60" placeholder="重复密码" autocomplete="off" />
  44. </div>
  45. <!-- 更多资料中的会员属性 -->
  46. {eyou:include file="users/users_reg_field.htm" /}
  47. <!-- 结束 -->
  48. {eyou:eq name="$is_vertify" value="1"}
  49. <div class="form-group">
  50. <div class="input-group input-group-icon">
  51. <div class="formText">
  52. <input type="text" name="vertify" autocomplete="off" class="form-control" placeholder="图片验证码" />
  53. <img src="{eyou:url link='api/Ajax/vertify' vars='type=users_reg' /}" class="chicuele" id="imgVerifys" onclick="fleshVerify();" title="看不清?点击更换验证码" align="absmiddle">
  54. </div>
  55. </div>
  56. </div>
  57. {/eyou:eq}
  58. <!-- 《用户协议》和《隐私政策》 -->
  59. <div class="clause-box">
  60. <label class="checkbox-label">
  61. <input class="checkbox" type="checkbox" name="agreement" value="1">
  62. <span class="check-mark"></span>
  63. </label>
  64. <a href="javascript:void(0)">我同意《用户协议》和《隐私政策》</a>
  65. </div>
  66. <input id="submitButton" type="button" onclick="checkUser();" class="btn btn-lg btn-primary btn-block group_z h60 disabled-button" value="立即注册"disabled="disabled"/>
  67. <div class="login-link clearfix">
  68. <a class="fr tr" href="{eyou:url link='user/Users/login' /}">已有账号?</a>
  69. </div>
  70. <!-- 第三方账号登录 -->
  71. {eyou:include file="/public/static/template/users_v3/users_loginapi.htm" /}
  72. <!-- 第三方账号登录 -->
  73. </form>
  74. </div>
  75. <div class="item">
  76. {eyou:static file="/public/static/common/js/mobile_reg.js"/}
  77. <form name='theMobileForm' id="theMobileForm" method="post" class="form-register">
  78. <div class="form-group group_z">
  79. <div class="input-group">
  80. <input id="mobile" type="text" class="form-control h60" required="" name="mobile" maxlength="11" value="" placeholder="手机号码">
  81. </div>
  82. </div>
  83. <div class="form-group group_z" style="display: none;" id="vertify_div">
  84. <div class="input-group input-group-icon">
  85. <div class="formText">
  86. <input id="mobile_vertify" type="text" name="mobile_vertify" autocomplete="off" class="form-control h60"
  87. placeholder="图片验证码" />
  88. <img src="{eyou:url link='api/Ajax/vertify' vars='type=users_mobile_reg' /}" class="chicuele" id="mobile_imgVerifys" onclick="mobile_fleshVerify();" title="看不清?点击更换验证码" align="absmiddle">
  89. </div>
  90. </div>
  91. </div>
  92. <div class="form-group group_z">
  93. <div class="input-group btn-direction">
  94. <div class="formText">
  95. <input type="text" class="form-control h60" id="mobile_code" name="mobile_code" placeholder="手机验证码">
  96. </div>
  97. <input type="button" id="mobile_code_button" onclick="send_mobile_code();" class="btn btn-primary sento" value="点击发送">
  98. </div>
  99. </div>
  100. <input type="hidden" name="__mobile_1_token__" value="{$Request.token.__mobile_1_token__}" />
  101. <input id="mobile_submitButton" type="button" onclick="checkMobileUser1649732103();" class="btn btn-lg btn-primary btn-block group_z h60 disabled-button" value="立即注册" disabled="disabled"/>
  102. <div class="login-link">
  103. <a class="" href="{eyou:url link='user/Users/login' /}">已有账号?</a>
  104. </div>
  105. <!-- 第三方账号登录 -->
  106. {eyou:if condition="!empty($weapp_wxlogin) || !empty($weapp_qqlogin) || !empty($weapp_wblogin)"}
  107. <div class="qrcode-title">其它登录方式</div>
  108. <div class="login_type text-xs-center m-t-20">
  109. <!-- <p>第三方账号登录</p> -->
  110. <ul class="blocks-3 m-0">
  111. {eyou:notempty name="$weapp_qqlogin"}
  112. <li class="m-b-0"><a title="QQ登录" href="{eyou:url link='plugins/QqLogin/login' seo_pseudo='1' seo_inlet='0' /}"><img title="QQ" src="{eyou:static file='users/skin/images/login_qq.png' /}"></a></li>
  113. {/eyou:notempty}
  114. {eyou:notempty name="$weapp_wxlogin"}
  115. <li class="m-b-0"><a title="微信登录" href="{eyou:url link='plugins/WxLogin/login' seo_pseudo='1' seo_inlet='0' /}"><img title="微信" src="{eyou:static file='users/skin/images/login_wx.png' /}"></a></li>
  116. {/eyou:notempty}
  117. {eyou:notempty name="$weapp_wblogin"}
  118. <li class="m-b-0"><a title="微博登录" href="{eyou:url link='plugins/Wblogin/login' seo_pseudo='1' seo_inlet='0' /}"><img title="微博" src="{eyou:static file='users/skin/images/login_wb.png' /}"></a></li>
  119. {/eyou:notempty}
  120. </ul>
  121. </div>
  122. {/eyou:if}
  123. <!-- 第三方账号登录 -->
  124. </form>
  125. </div>
  126. </div>
  127. </div>
  128. </div>
  129. </div>
  130. <script type="text/javascript">
  131. //切换账号登录与手机号登录
  132. $(".tab_list li").click(function(){
  133. var index = $(this).attr('data-index');
  134. $(".tab_list li").each(function(){
  135. $(this).removeClass('current');
  136. });
  137. $(".item").each(function(i,v){
  138. if (index == i){
  139. $(this).css('display','block');
  140. } else{
  141. $(this).css('display','none');
  142. }
  143. });
  144. $(this).addClass('current');
  145. });
  146. $(document).keydown(function(event) {
  147. if (event.keyCode == 13) {
  148. var index = $(".tab_list .current").attr('data-index');
  149. if (0 == index) {
  150. checkUser();
  151. }else if(1 == index){
  152. checkMobileUser1649732103();
  153. }
  154. }
  155. });
  156. var input = document.getElementById('username');
  157. var input = document.getElementById('password');
  158. var input = document.getElementById('password2');
  159. var submitButton = document.getElementById('submitButton');
  160. input.addEventListener('input', function() {
  161. if (input.value.length > 0) {
  162. submitButton.disabled = false;
  163. submitButton.classList.remove('disabled-button');
  164. submitButton.classList.add('enabled-button');
  165. } else {
  166. submitButton.disabled = true;
  167. submitButton.classList.remove('enabled-button');
  168. submitButton.classList.add('disabled-button');
  169. }
  170. });
  171. var mobile_input = document.getElementById('mobile');
  172. var mobile_input = document.getElementById('mobile_vertify');
  173. var mobile_input = document.getElementById('mobile_code');
  174. var mobile_submitButton = document.getElementById('mobile_submitButton');
  175. mobile_input.addEventListener('input', function() {
  176. if (mobile_input.value.length > 0) {
  177. mobile_submitButton.disabled = false;
  178. mobile_submitButton.classList.remove('disabled-button');
  179. mobile_submitButton.classList.add('enabled-button');
  180. } else {
  181. mobile_submitButton.disabled = true;
  182. mobile_submitButton.classList.remove('enabled-button');
  183. mobile_submitButton.classList.add('disabled-button');
  184. }
  185. });
  186. function fleshVerify(){
  187. var src = "{eyou:url link='api/Ajax/vertify' vars='type=users_reg' /}";
  188. if (src.indexOf('?') > -1) {
  189. src += '&';
  190. } else {
  191. src += '?';
  192. }
  193. src += 'r='+ Math.floor(Math.random()*100);
  194. $('#imgVerifys').attr('src', src);
  195. }
  196. function checkUser(){
  197. var username = $('#theForm input[name=username]');
  198. var password = $('#theForm input[name=password]');
  199. var password2 = $('#theForm input[name=password2]');
  200. // 《用户协议》和《隐私政策》
  201. var agreement = $('#theForm input[name=agreement]:checked').val();
  202. if(username.val() == ''){
  203. layer.msg('用户名不能为空!', {time: 1500});
  204. username.focus();
  205. return false;
  206. }
  207. if(password.val() == ''){
  208. layer.msg('登录密码不能为空!', {time: 1500});
  209. password.focus();
  210. return false;
  211. }
  212. {$pwdJsCode|default=''}
  213. if(password2.val() != password.val()){
  214. layer.msg('两次密码不一致!', {time: 1500});
  215. password.focus();
  216. return false;
  217. }
  218. // 《用户协议》和《隐私政策》
  219. if (1 != agreement) {
  220. layer.msg('请勾选同意《用户协议》和《隐私政策》', {time: 1500});
  221. password.focus();
  222. return false;
  223. }
  224. layer_loading('正在处理');
  225. $.ajax({
  226. // async:false,
  227. url: "{eyou:url link='user/Users/reg' /}",
  228. data: $('#theForm').serialize(),
  229. type:'post',
  230. dataType:'json',
  231. success:function(response){
  232. layer.closeAll();
  233. var res = response.data;
  234. if(res.status == 0){
  235. layer.msg(response.msg, {time: 1500}, function(){
  236. window.location = response.url;
  237. });
  238. } else if ('vertify' == res.status) {
  239. fleshVerify();
  240. layer.msg(response.msg, {time: 2000});
  241. }else if(res.status == 1){
  242. layer.msg(response.msg, {time: 2000});
  243. }else if(res.status == 2){
  244. layer.msg(response.msg, {time: 1500}, function(){
  245. window.location = response.url;
  246. });
  247. }else if(res.status == 3){
  248. layer.msg(response.msg, {time: 1500}, function(){
  249. window.location = response.url;
  250. });
  251. }else{
  252. fleshVerify();
  253. layer.msg(response.msg, {time: 2000});
  254. }
  255. },
  256. error : function(e) {
  257. layer.closeAll();
  258. fleshVerify();
  259. showErrorAlert(e.responseText);
  260. }
  261. });
  262. };
  263. </script>
  264. </body>
  265. </html>