sso

regist.html 6.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  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?v=1.0.0">
  11. <script>
  12. var _hmt = _hmt || [];
  13. (function() {
  14. var hm = document.createElement("script");
  15. hm.src = "https://hm.baidu.com/hm.js?7577c975fa7ae685efd61deb009d1b5b";
  16. var s = document.getElementsByTagName("script")[0];
  17. s.parentNode.insertBefore(hm, s);
  18. })();
  19. </script>
  20. </head>
  21. <body>
  22. <div class="loginBox">
  23. <h2 class="title">注册账号</h2>
  24. <div class="reg_wrap">
  25. <form action="" class="reg">
  26. <div class="cell">
  27. <input id="mobile" type="text" class="input_box " placeholder="手机号码">
  28. </div>
  29. <div class="cell">
  30. <input id="code" type="text" class="input_box" placeholder="验证码">
  31. <span id="codebtn" class="code">获取验证码</span>
  32. </div>
  33. <div class="cell">
  34. <input id="password" type="text" class="input_box " placeholder="密码">
  35. </div>
  36. <input type="hidden" id="aespass" value="{{ .aespass }}">
  37. </form>
  38. <div class="join">
  39. <button id="registbtn" class="submit">即刻开始</button>
  40. </div>
  41. </div>
  42. </div>
  43. <!-- 弹出框 -->
  44. <div class="layer" style="display: none;">
  45. <div class="layerBg"></div>
  46. <div class="content">
  47. <div class="tit">
  48. <h3>提示</h3>
  49. <div class="close"><img src="/static/images/mobile_site/close.png" alt=""></div>
  50. </div>
  51. <span class="tips">您的手机号码已经注册过,请使用电脑谷歌浏览器访问酷医云,并登录使用</span>
  52. </div>
  53. </div>
  54. <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
  55. <script src="/static/js/layer.js"></script>
  56. <script src="/static/js/md5.js"></script>
  57. <script src="/static/js/common.js"></script>
  58. <script type="text/javascript">
  59. $(function() {
  60. $('.close').click(function(){
  61. $('.layer').fadeOut(300);
  62. });
  63. $("#codebtn").click(function() {
  64. var phone = $("#mobile").val();
  65. var aespass = $('#aespass').val();
  66. if (!checkPhone(phone)) {
  67. return;
  68. }
  69. var postData = {
  70. phone: phone,
  71. aespass: aespass,
  72. }
  73. $("#codebtn").attr("disabled", true);
  74. postRequest("/getregistcode", postData, function(res) {
  75. if (res.state == 0) {
  76. if (res.code == 604) {
  77. $('.layer').show();
  78. } else {
  79. serverErrorMsg(res);
  80. }
  81. return;
  82. }
  83. changeNum(60);
  84. layer.msg(res.data.msg);
  85. $("#codebtn").attr("disabled", false);
  86. }, function(res) {
  87. serverErrorMsg(res);
  88. $("#codebtn").attr("disabled", false);
  89. });
  90. });
  91. //确定
  92. $("#registbtn").click(function() {
  93. var code = $("#code").val();
  94. if (code != null && code != undefined && code != "") {
  95. var mobile = $("#mobile").val();
  96. var password = $("#password").val();
  97. if (canSure(mobile, password)) {
  98. $("#registbtn").attr("disabled", true);
  99. var postData = {
  100. mobile: mobile,
  101. password: hex_md5(password),
  102. code: code,
  103. }
  104. postRequest("/mobile/regist/submit", postData, function(res) {
  105. $("#registbtn").attr("disabled", false);
  106. if (res.state == 0) {
  107. serverErrorMsg(res);
  108. return;
  109. }
  110. layer.msg("注册成功");
  111. window.location.href = "/mobile/org/create"; //跳转网址
  112. }, function(res) {
  113. $("#registbtn").attr("disabled", false);
  114. serverErrorMsg(res);
  115. });
  116. } else {
  117. return;
  118. }
  119. }
  120. });
  121. });
  122. function checkPhone(phone) {
  123. if (!phone || phone == "") {
  124. layer.msg("手机号码不能为空");
  125. return false;
  126. }
  127. if (!(/^1\d{10}$/.test(phone))) {
  128. layer.msg("手机号码有误,请重填");
  129. return false;
  130. }
  131. return true;
  132. }
  133. function canSure(phone, password) {
  134. if (!phone || phone == "") {
  135. layer.msg("手机号码不能为空");
  136. return false;
  137. }
  138. if (!password) {
  139. layer.msg('密码为空');
  140. return false;
  141. }
  142. if (password.length < 6) {
  143. layer.msg('密码至少要6位数');
  144. return false;
  145. }
  146. return true;
  147. }
  148. function changeNum(num) {
  149. setTimeout(function() {
  150. if (num > 1) {
  151. $('#codebtn').html(num + "s");
  152. --num;
  153. changeNum(num);
  154. } else {
  155. $('#codebtn').html("发送验证码");
  156. $("#codebtn").attr("disabled", false);
  157. }
  158. }, 1000);
  159. }
  160. </script>
  161. </body>
  162. </html>