verifyMobile.html 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <{include file="header.html"}>
  2. <{include file="nav.html"}>
  3. <div class="wrapper jsc-sidebar-content jsc-sidebar-pulled">
  4. <{include file="menu_icon.html"}>
  5. <div class="article_title center">绑定手机号</div>
  6. <div class="clear"></div>
  7. <br>
  8. <div class="user_txt center">已向您的手机<span class="mobile"><{$mobile}></span>发送<br>验证请求,请输入您接收到的验证码。</div>
  9. <div class="join_submit_box">
  10. <div class="submit_cell"><input name="code" type="text" class="input_style" placeholder="验证码"></div>
  11. <div class="user_tips center"></div>
  12. <div class="clear"></div>
  13. <div class="submit_cell2">
  14. <div class="common_btn_style3 com_btn_style3"><a class="confirm" href="javascript:;">确认</a></div>
  15. </div>
  16. <div class="submit_cell2">
  17. <div class="common_btn_style5 com_btn_style3"><a class="anew" href="javascript:;">重新发送验证码(<span class='m_s'>60</span>s)</a></div>
  18. </div>
  19. <div class="submit_cell2">
  20. <div class="common_btn_style3 com_btn_style3" style="display:none;"><a class="back" href="<{$web_cfg.domain}>/member/inputMobile/">绑定其它手机号</a></div>
  21. </div>
  22. </div>
  23. </div>
  24. <{include file="left.html"}>
  25. <script>
  26. KISSY.use('node, io', function (S, Node, IO) {
  27. var s = $('.m_s').html();
  28. var I = setInterval(countdown, 1000);
  29. function countdown() {
  30. s--;
  31. $('.m_s').html(s);
  32. if (s < 1) {
  33. window.clearInterval(I);
  34. $('.common_btn_style5').addClass('common_btn_style3').removeClass('common_btn_style5');
  35. $('.anew').html('重新发送验证码');
  36. <{if $times >= 2}>
  37. $('.common_btn_style3').show();
  38. <{/if}>
  39. }
  40. }
  41. var mobile = '<{$mobile}>';
  42. $('.confirm').on('click', function () {
  43. var code = $('input[name=code]').val();
  44. if (!code) {
  45. $('.user_tips').html('请输入验证码');
  46. return false;
  47. }
  48. IO.get('<{$web_cfg.domain}>/?c=member&a=AjaxVerifyCode'
  49. , {mobile: mobile, code: code}
  50. , function (data) {
  51. if (data.ok) {
  52. location.href = '<{$web_cfg.domain}>/member/MobileBind/';
  53. } else {
  54. $('.user_tips').html(data.msg);
  55. }
  56. }
  57. , 'json'
  58. );
  59. });
  60. $('.anew').on('click', function () {
  61. if (s < 1) {
  62. location.href = '<{$web_cfg.domain}>/member/verifyMobile/?mobile='+mobile+'&t=<{$times}>';
  63. }
  64. });
  65. $('.back').on('click', function () {
  66. history.back();
  67. });
  68. });
  69. </script>
  70. <{include file="bottom.html"}>