password1.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  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: linear-gradient(180deg, #D6EBFD 0%, #F5FAFF 100%);
  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. background-color: #fff;
  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: #F2F3F5;
  50. border-radius: 50px 50px 50px 50px;
  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: #498EF5;
  69. border-radius: 40px 40px 40px 40px;
  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: #fff;
  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. }
  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. z-index: 999;
  154. }
  155. .m-toast-inner-text {
  156. display: inline-block;
  157. margin: 0 22px;
  158. padding: 19px 21px;
  159. font-size: 16px;
  160. color: #FFFFFF;
  161. letter-spacing: 0;
  162. line-height: 22px;
  163. background: rgba(0, 0, 0, 0.72);
  164. border-radius: 10px;
  165. }
  166. </style>
  167. </head>
  168. <body>
  169. <div id="m-toast-pop" class="m-toast-pop">
  170. <div class="m-toast-inner">
  171. <div class="m-toast-inner-text" id="m-toast-inner-text"></div>
  172. </div>
  173. </div>
  174. <div id="pop" class="pop-center">
  175. <div class="pop-content">
  176. <div class="pop-list">
  177. <!-- <div class="pop-list-item">福州市</div> -->
  178. </div>
  179. </div>
  180. </div>
  181. <div class="bg">
  182. <img class="title" src="https://t1-1305573081.file.myqcloud.com/test/adown/student.png">
  183. <div class="mid">
  184. <div class="form">
  185. <div style="font-size: 4vw;padding-top: 5.3vw;"><span style="color: #FE3B2B;">*</span>证件号码<span
  186. style="color: #FE3B2B;">(注意:英文要大写)</span></div>
  187. <input oninput="bindFormModel(this)" data-field="idcard" class="form-input" />
  188. <div style="font-size: 4vw;padding-top: 4vw;"><span style="color: #FE3B2B;">*</span>手机号码</div>
  189. <input oninput="bindFormModel(this)" data-field="phone" class="form-input" />
  190. <div style="font-size: 4vw;padding-top: 4vw;">
  191. <span style="color: #FE3B2B;">*</span>选择地市
  192. </div>
  193. <div onclick="showPop()" style="position: relative;">
  194. <img class="form-icon"
  195. src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEuOTA3MzVlLTA2IDI0TDI0IDI0TDI0IC0zLjgxNDdlLTA2TC0xLjkwNzk4ZS0wNyAtMS43MTY1NWUtMDZMMS45MDczNWUtMDYgMjRaIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjAxIi8+CjxwYXRoIGQ9Ik0xMCA4TDE0IDEyTDEwIDE2IiBzdHJva2U9IiM5Nzk2OUYiIHN0cm9rZS13aWR0aD0iMS4yIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9zdmc+Cg==" />
  196. <input readonly class="form-input" />
  197. </div>
  198. <div onclick="studentSearch()" class="form-submit">查询</div>
  199. <div class="" style="height: 10.6vw;"></div>
  200. </div>
  201. <div class="res">
  202. <img class="res-title" src="https://t1-1305573081.file.myqcloud.com/test/adown/search_res1.png">
  203. <div class="res-err">
  204. <span style="color: red;">未查询到相关数据</span>
  205. </div>
  206. <div class="res-content">
  207. <div class="res-search">学员您好,您的极速驾培信息如下:</div>
  208. <div> 帐号:<span class="res-search" style="color: red;"></span></div>
  209. <div>密码:<span class="res-search" style="color: red;"></span></div>
  210. <div>为了保证您的信息安全,请您妥善保管账号和密码,不将账号和密码告知他人!</div>
  211. </div>
  212. </div>
  213. <div style="height: 10vw;"></div>
  214. </div>
  215. <script src="https://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
  216. <script>
  217. const formModel = {
  218. city: "",
  219. idcard: "",
  220. phone: ""
  221. }
  222. document.querySelector('.pop-list').addEventListener('click', function (e) {
  223. console.log(e)
  224. hidePop()
  225. formModel.city = e.target.dataset.index || ""
  226. document.querySelectorAll('.form-input')[2].value = e.target.innerText
  227. })
  228. $.ajax({
  229. url: "https://jsjp-admin1.zzxcx.net/jsjp-admin/open-api/gzpt/userInfo/type/coach_city"
  230. }).then(res => {
  231. res.data.forEach(element => {
  232. $('.pop-list').append(`<div class="pop-list-item" data-index=${element.dictValue}>${element.dictLabel}</div>`)
  233. });
  234. console.log(res)
  235. })
  236. function bindFormModel(e) {
  237. formModel[e.getAttribute("data-field")] = e.value
  238. console.log(formModel)
  239. }
  240. function showPop() {
  241. document.querySelector("#pop").style = "display:flex"
  242. }
  243. function hidePop() {
  244. document.querySelector("#pop").style = "display:none"
  245. }
  246. function studentSearch() {
  247. if (!formModel.idcard.match(/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X)$)/)) {
  248. message('身份证格式错误')
  249. return
  250. }
  251. if (!formModel.phone.match(/^1[3-8][0-9]{9}$/)) {
  252. message('手机号码格式错误')
  253. return
  254. }
  255. if (formModel.city == '') {
  256. message('请选择地区')
  257. return
  258. }
  259. $.ajax({
  260. url: "https://jsjp-admin1.zzxcx.net/jsjp-admin/open-api/tms/coachInfo/getPasswordByIdcard",
  261. method: 'get',
  262. data: formModel
  263. }).then(res => {
  264. if (res.data == null) {
  265. message('查询不到数据')
  266. document.querySelectorAll('.res-err')[0].style = 'display:block'
  267. document.querySelectorAll('.res-content')[0].style = 'display:none'
  268. return
  269. }
  270. document.querySelectorAll('.res-err')[0].style = 'display:none'
  271. document.querySelectorAll('.res-content')[0].style = 'display:block'
  272. document.querySelectorAll('.res-search')[0].innerText = res.data.name + '学员您好,您的极速驾培信息如下:'
  273. document.querySelectorAll('.res-search')[1].innerText = res.data.idcard
  274. document.querySelectorAll('.res-search')[2].innerText = res.data.password
  275. })
  276. }
  277. function message(message) {
  278. $('#m-toast-inner-text').text(message);
  279. $('#m-toast-pop').fadeIn();
  280. setTimeout(function () {
  281. $('#m-toast-pop').fadeOut();
  282. }, 2500);
  283. }
  284. // message("****不能为空");
  285. </script>
  286. </body>
  287. </html>