password1.html 10 KB

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