password2.html 11 KB

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