sso

regist.html 5.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  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. postRequest("/getregistcode", postData, function(res) {
  68. if (res.state == 0) {
  69. if (res.code == 604) {
  70. $('.layer').show();
  71. } else {
  72. serverErrorMsg(res);
  73. }
  74. return;
  75. }
  76. changeNum(60);
  77. layer.msg(res.data.msg);
  78. $("#codebtn").attr("disabled", false);
  79. }, function(res) {
  80. serverErrorMsg(res);
  81. $("#codebtn").attr("disabled", false);
  82. });
  83. });
  84. //确定
  85. $("#registbtn").click(function() {
  86. var code = $("#code").val();
  87. if (code != null && code != undefined && code != "") {
  88. var mobile = $("#mobile").val();
  89. var password = $("#password").val();
  90. if (canSure(mobile, password)) {
  91. $("#registbtn").attr("disabled", true);
  92. var postData = {
  93. mobile: mobile,
  94. password: hex_md5(password),
  95. code: code,
  96. }
  97. postRequest("/mobile/regist/submit", postData, function(res) {
  98. $("#registbtn").attr("disabled", false);
  99. if (res.state == 0) {
  100. serverErrorMsg(res);
  101. return;
  102. }
  103. layer.msg("注册成功");
  104. window.location.href = "/mobile/org/create"; //跳转网址
  105. }, function(res) {
  106. $("#registbtn").attr("disabled", false);
  107. serverErrorMsg(res);
  108. });
  109. } else {
  110. return;
  111. }
  112. }
  113. });
  114. });
  115. function checkPhone(phone) {
  116. if (!phone || phone == "") {
  117. layer.msg("手机号码不能为空");
  118. return false;
  119. }
  120. if (!(/^1\d{10}$/.test(phone))) {
  121. layer.msg("手机号码有误,请重填");
  122. return false;
  123. }
  124. return true;
  125. }
  126. function canSure(phone, password) {
  127. if (!phone || phone == "") {
  128. layer.msg("手机号码不能为空");
  129. return false;
  130. }
  131. if (!password) {
  132. layer.msg('密码为空');
  133. return false;
  134. }
  135. if (password.length < 6) {
  136. layer.msg('密码至少要6位数');
  137. return false;
  138. }
  139. return true;
  140. }
  141. function changeNum(num) {
  142. setTimeout(function() {
  143. if (num > 1) {
  144. $('#codebtn').html(num + "s");
  145. --num;
  146. changeNum(num);
  147. } else {
  148. $('#codebtn').html("发送验证码");
  149. $("#codebtn").attr("disabled", false);
  150. }
  151. }, 1000);
  152. }
  153. </script>
  154. </body>
  155. </html>