password2.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343
  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 name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
  7. <title>教练管家查询密码</title>
  8. <style type="text/css">
  9. div {
  10. box-sizing: border-box;
  11. }
  12. body {
  13. margin: 0;
  14. padding: 0;
  15. }
  16. ul,
  17. ol {
  18. list-style: none;
  19. }
  20. .bg {
  21. width: 100vw;
  22. min-height: 100vh;
  23. background: #06203A;
  24. text-align: center;
  25. }
  26. .title {
  27. margin: 0 auto;
  28. margin-top: 6.4vw;
  29. margin-bottom: 5.3vw;
  30. }
  31. .mid {
  32. padding: 0 4vw;
  33. width: 100%;
  34. }
  35. .form {
  36. width: 100%;
  37. color: #fff;
  38. background: #0B2B4D;
  39. padding: 0 4vw;
  40. vertical-align: baseline;
  41. text-align: left;
  42. border-radius: 2.5vw;
  43. margin-bottom: 5.6vw;
  44. }
  45. .form-input {
  46. width: 100%;
  47. outline: none;
  48. height: 10.5vw;
  49. background: #26486B;
  50. color: #fff;
  51. opacity: 1;
  52. padding-left: 4vw;
  53. margin-top: 1.6vw;
  54. border: none;
  55. box-sizing: border-box;
  56. font-size: 4vw;
  57. }
  58. .form-icon {
  59. position: absolute;
  60. width: 8vw;
  61. right: 4vw;
  62. font-size: 4vw;
  63. top: 3vw;
  64. }
  65. .form-submit {
  66. width: 84vw;
  67. line-height: 10.6vw;
  68. background: #35BF5E;
  69. opacity: 1;
  70. margin: 0 auto;
  71. text-align: center;
  72. color: #fff;
  73. margin-top: 13vw;
  74. }
  75. .res {
  76. width: 92vw;
  77. background-color: #0B2B4D;
  78. padding: 0 3.2vw;
  79. box-sizing: border-box;
  80. color: #5C6066;
  81. min-height: 20vw;
  82. border-radius: 20px 20px 20px 20px;
  83. color: #fff;
  84. }
  85. .res-title {
  86. width: 38vw;
  87. }
  88. .res-content {
  89. width: 100%;
  90. text-align: left;
  91. margin-top: 5.6vw;
  92. padding-bottom: 5.6vw;
  93. }
  94. .res-search {
  95. text-align: left;
  96. }
  97. .res-err {
  98. display: none;
  99. }
  100. #pop {
  101. display: none;
  102. background-color: rgba(0, 0, 0, 0.55);
  103. width: 100vw;
  104. height: 100vh;
  105. position: fixed;
  106. top: 0;
  107. left: 0;
  108. z-index: 999;
  109. }
  110. .pop-center {
  111. display: flex;
  112. justify-content: center;
  113. align-items: center;
  114. align-content: center;
  115. }
  116. .pop-content {
  117. background-color: #fff;
  118. width: 84vw;
  119. /* min-height: 50vh; */
  120. height: auto;
  121. overflow-y: scroll;
  122. border-radius: 5vw;
  123. }
  124. .pop-list {
  125. text-align: center;
  126. font-size: 5vw;
  127. padding: 0 2vw;
  128. }
  129. .pop-list-item {
  130. padding: 2vw 0;
  131. border-bottom: 1px solid rgb(199, 199, 199);
  132. box-sizing: border-box;
  133. }
  134. .m-toast-pop {
  135. display: none;
  136. position: fixed;
  137. width: 100%;
  138. top: 0;
  139. bottom: 0;
  140. right: 0;
  141. overflow: auto;
  142. text-align: center;
  143. z-index: 999;
  144. }
  145. .m-toast-inner {
  146. position: absolute;
  147. left: 50%;
  148. top: 50%;
  149. width: 100%;
  150. transform: translate(-50%, -50%);
  151. -webkit-transform: translate(-50%, -50%);
  152. text-align: center;
  153. }
  154. .m-toast-inner-text {
  155. display: inline-block;
  156. margin: 0 22px;
  157. padding: 19px 21px;
  158. font-size: 16px;
  159. color: #FFFFFF;
  160. letter-spacing: 0;
  161. line-height: 22px;
  162. background: rgba(0, 0, 0, 0.72);
  163. border-radius: 10px;
  164. }
  165. </style>
  166. </head>
  167. <body>
  168. <div id="m-toast-pop" class="m-toast-pop">
  169. <div class="m-toast-inner">
  170. <div class="m-toast-inner-text" id="m-toast-inner-text"></div>
  171. </div>
  172. </div>
  173. <div id="pop" class="pop-center">
  174. <div class="pop-content">
  175. <div class="pop-list">
  176. <!-- <div class="pop-list-item">福州市</div> -->
  177. </div>
  178. </div>
  179. </div>
  180. <div class="toast">
  181. </div>
  182. <div class="bg">
  183. <img class="title" src="https://t1-1305573081.file.myqcloud.com/test/adown/teacher.png">
  184. <div class="mid">
  185. <div class="form">
  186. <div style="font-size: 4vw;padding-top: 5.3vw;"><span style="color: #FE3B2B;">*</span>证件号码<span
  187. style="color: #FE3B2B;">(注意:英文要大写)</span></div>
  188. <input oninput="bindFormModel(this)" data-field="idcard" class="form-input" />
  189. <div style="font-size: 4vw;padding-top: 4vw;"><span style="color: #FE3B2B;">*</span>手机号码</div>
  190. <input oninput="bindFormModel(this)" data-field="phone" class="form-input" />
  191. <div style="font-size: 4vw;padding-top: 4vw;">
  192. <span style="color: #FE3B2B;">*</span>选择地市
  193. </div>
  194. <div onclick="showPop()" style="position: relative;">
  195. <img class="form-icon"
  196. src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEuOTA3MzVlLTA2IDI0TDI0IDI0TDI0IC0zLjgxNDdlLTA2TC0xLjkwNzk4ZS0wNyAtMS43MTY1NWUtMDZMMS45MDczNWUtMDYgMjRaIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjAxIi8+CjxwYXRoIGQ9Ik0xMCA4TDE0IDEyTDEwIDE2IiBzdHJva2U9IiM5Nzk2OUYiIHN0cm9rZS13aWR0aD0iMS4yIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9zdmc+Cg==" />
  197. <input readonly class="form-input" />
  198. </div>
  199. <div onclick="studentSearch()" class="form-submit">查询</div>
  200. <div class="" style="height: 10.6vw;"></div>
  201. </div>
  202. <div class="res">
  203. <img class="res-title" src="https://t1-1305573081.file.myqcloud.com/test/adown/search_res2.png">
  204. <div class="res-err">
  205. <span style="color: red;">未查询到相关数据</span>
  206. </div>
  207. <div class="res-content">
  208. <div class="res-search">教练您好,您的教练管家信息如下:</div>
  209. <div> 帐号:<span class="res-search" style="color: red;"></span></div>
  210. <div>密码:<span class="res-search" style="color: red;"></span></div>
  211. <div>为了保证您的信息安全,请您妥善保管账号和密码,不将账号和密码告知他人!</div>
  212. </div>
  213. </div>
  214. <div style="height: 10vw;"></div>
  215. </div>
  216. <script src="https://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
  217. <script>
  218. const formModel = {
  219. city: "",
  220. idcard: "",
  221. phone: ""
  222. }
  223. document.querySelector('.pop-list').addEventListener('click', function (e) {
  224. console.log(e)
  225. hidePop()
  226. formModel.city = e.target.dataset.index || ""
  227. document.querySelectorAll('.form-input')[2].value = e.target.innerText
  228. })
  229. $.ajax({
  230. url: "https://jsjp-admin1.zzxcx.net/jsjp-admin/open-api/gzpt/userInfo/type/coach_city"
  231. }).then(res => {
  232. res.data.forEach(element => {
  233. $('.pop-list').append(`<div class="pop-list-item" data-index=${element.dictValue}>${element.dictLabel}</div>`)
  234. });
  235. console.log(res)
  236. })
  237. function bindFormModel(e) {
  238. formModel[e.getAttribute("data-field")] = e.value
  239. console.log(formModel)
  240. }
  241. function showPop() {
  242. document.querySelector("#pop").style = "display:flex"
  243. }
  244. function hidePop() {
  245. document.querySelector("#pop").style = "display:none"
  246. }
  247. function studentSearch() {
  248. if (!formModel.idcard.match(/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X)$)/)) {
  249. message('身份证格式错误')
  250. return
  251. }
  252. if (!formModel.phone.match(/^1[3-8][0-9]{9}$/)) {
  253. message('手机号码格式错误')
  254. return
  255. }
  256. if (formModel.city == '') {
  257. message('请选择地区')
  258. return
  259. }
  260. $.ajax({
  261. url: "https://jsjp-admin1.zzxcx.net/jsjp-admin/open-api/tms/coachInfo/getPasswordByCoachIdcard",
  262. method: 'get',
  263. data: formModel
  264. }).then(res => {
  265. if (res.data == null) {
  266. message('查询不到数据')
  267. document.querySelectorAll('.res-err')[0].style = 'display:block'
  268. document.querySelectorAll('.res-content')[0].style = 'display:none'
  269. return
  270. }
  271. document.querySelectorAll('.res-err')[0].style = 'display:none'
  272. document.querySelectorAll('.res-content')[0].style = 'display:block'
  273. document.querySelectorAll('.res-search')[0].innerText = res.data.name + '教练您好,您的教练管家信息如下:'
  274. document.querySelectorAll('.res-search')[1].innerText = res.data.idcard
  275. document.querySelectorAll('.res-search')[2].innerText = res.data.password
  276. })
  277. }
  278. function message(message) {
  279. $('#m-toast-inner-text').text(message);
  280. $('#m-toast-pop').fadeIn();
  281. setTimeout(function () {
  282. $('#m-toast-pop').fadeOut();
  283. }, 2500);
  284. }
  285. // message("****不能为空");
  286. </script>
  287. </body>
  288. </html>