sso

regist.html 5.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  7. <meta name="keywords" content="酷医,酷医云,酷医聚客,病人关系管理,微信管理平台,肾病科宣,慢病管理云平台,SCRM,SPRM,血透管理,科室品牌推广">
  8. <meta name="description" content="酷医云,是专为肾科和血透中心研发的免费血透管理平台,覆盖诊前、诊中、诊后全流程管理;为血透中心提供覆盖智能营销管理、血透管理、慢病管理、医患沟通、进销存管理以及商城管理等全流程一体化的管理平台。全国数百家血透中心信赖的选择。">
  9. <title>酷医云-注册</title>
  10. <link rel="stylesheet" href="/static/css/mobile.css">
  11. <style>
  12. </style>
  13. </head>
  14. <body>
  15. <div class="loginBox">
  16. <h2 class="title">注册账号</h2>
  17. <div class="reg_wrap">
  18. <form action="" class="reg">
  19. <div class="cell">
  20. <input id="mobile" type="text" class="input_box " placeholder="手机号码">
  21. </div>
  22. <div class="cell">
  23. <input id="code" type="text" class="input_box" placeholder="验证码">
  24. <span id="codebtn" class="code">获取验证码</span>
  25. </div>
  26. <div class="cell">
  27. <input id="password" type="text" class="input_box " placeholder="密码">
  28. </div>
  29. <input type="hidden" id="aespass" value="{{ .aespass }}">
  30. </form>
  31. <div class="join">
  32. <button id="registbtn" class="submit">即刻开始</button>
  33. </div>
  34. </div>
  35. </div>
  36. <!-- 弹出框 -->
  37. <div class="layer" style="display: none;">
  38. <div class="layerBg"></div>
  39. <div class="content">
  40. <div class="tit">
  41. <h3>提示</h3>
  42. <div class="close"><img src="/static/images/mobile_site/close.png" alt=""></div>
  43. </div>
  44. <span class="tips">您的手机号码已经注册过,请使用电脑谷歌浏览器访问酷医云,并登录使用</span>
  45. </div>
  46. </div>
  47. <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
  48. <script src="/static/js/layer.js"></script>
  49. <script src="/static/js/md5.js"></script>
  50. <script src="/static/js/common.js"></script>
  51. <script type="text/javascript">
  52. $(function() {
  53. $('.close').click(function(){
  54. $('.layer').fadeOut(300);
  55. });
  56. $("#codebtn").click(function() {
  57. var phone = $("#mobile").val();
  58. var aespass = $('#aespass').val();
  59. if (!checkPhone(phone)) {
  60. return;
  61. }
  62. var postData = {
  63. phone: phone,
  64. aespass: aespass,
  65. }
  66. $("#codebtn").attr("disabled", true);
  67. changeNum(60);
  68. postRequest("/getregistcode", postData, function(res) {
  69. if (res.state == 0) {
  70. serverErrorMsg(res);
  71. return;
  72. }
  73. layer.msg(res.data.msg);
  74. }, function(res) {
  75. serverErrorMsg(res);
  76. });
  77. });
  78. //确定
  79. $("#registbtn").click(function() {
  80. var code = $("#code").val();
  81. if (code != null && code != undefined && code != "") {
  82. var mobile = $("#mobile").val();
  83. var password = $("#password").val();
  84. if (canSure(mobile, password)) {
  85. $("#registbtn").attr("disabled", true);
  86. var postData = {
  87. mobile: mobile,
  88. password: hex_md5(password),
  89. code: code,
  90. }
  91. postRequest("/mobile/regist/submit", postData, function(res) {
  92. $("#registbtn").attr("disabled", false);
  93. if (res.state == 0) {
  94. serverErrorMsg(res);
  95. return;
  96. }
  97. layer.msg("注册成功");
  98. window.location.href = "/mobile/org/create"; //跳转网址
  99. }, function(res) {
  100. $("#registbtn").attr("disabled", false);
  101. serverErrorMsg(res);
  102. });
  103. } else {
  104. return;
  105. }
  106. }
  107. });
  108. });
  109. function checkPhone(phone) {
  110. if (!phone || phone == "") {
  111. layer.msg("手机号码不能为空");
  112. return false;
  113. }
  114. if (!(/^1\d{10}$/.test(phone))) {
  115. layer.msg("手机号码有误,请重填");
  116. return false;
  117. }
  118. return true;
  119. }
  120. function canSure(phone, password) {
  121. if (!phone || phone == "") {
  122. layer.msg("手机号码不能为空");
  123. return false;
  124. }
  125. if (!password) {
  126. layer.msg('密码为空');
  127. return false;
  128. }
  129. if (password.length < 6) {
  130. layer.msg('密码至少要6位数');
  131. return false;
  132. }
  133. return true;
  134. }
  135. function changeNum(num) {
  136. setTimeout(function() {
  137. if (num > 1) {
  138. $('#codebtn').html(num + "s");
  139. --num;
  140. changeNum(num);
  141. } else {
  142. $('#codebtn').html("发送验证码");
  143. $("#codebtn").attr("disabled", false);
  144. }
  145. }, 1000);
  146. }
  147. </script>
  148. </body>
  149. </html>