login.html 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>广西自学考试网上系统</title>
  5. <meta charset="UTF-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <link rel="shortcut icon" type="image/x-icon" href="./img/favicon.png"/>
  8. <!-- import CSS -->
  9. <!-- <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css"> -->
  10. <!--<link rel="stylesheet" href="https://unpkg.com/element-ui@2.4.11/lib/theme-chalk/index.css">-->
  11. <link rel="stylesheet" href="https://lib.baomitu.com/element-ui/2.12.0/theme-chalk/index.css">
  12. <link rel="stylesheet" href="./vendor/font-awesome-4.7.0/css/font-awesome.min.css">
  13. <script src="https://lib.baomitu.com/jquery/1.12.4/jquery.min.js"></script>
  14. <script src="./vendor/jqueryPlugPop/plug-in.min.js"></script>
  15. <script src="./vendor/md5/md5.js" type="text/javascript"></script>
  16. <script src="./vendor/md5/jsencrypt.js" type="text/javascript"></script>
  17. <script src="./js/tool.js"></script>
  18. <!-- import Vue before Element -->
  19. <!-- <script src="https://unpkg.com/vue/dist/vue.js"></script> -->
  20. <script src="https://lib.baomitu.com/vue/2.5.17/vue.min.js" type="text/javascript"></script>
  21. <!-- import JavaScript -->
  22. <!-- <script src="https://unpkg.com/element-ui/lib/index.js"></script> -->
  23. <script src="https://lib.baomitu.com/element-ui/2.4.11/index.js" type="text/javascript"></script>
  24. <!-- <script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script> -->
  25. <script>
  26. function keyDown(){
  27. if (event.keyCode==13) //回车键的键值为13
  28. if(this.logintype==1){
  29. document.getElementById("loginBtnForPhone").click(); //调用登录按钮的登录事件
  30. }else{
  31. document.getElementById("loginBtn").click();
  32. }
  33. }
  34. </script>
  35. </head>
  36. <body onkeydown="keyDown();">
  37. <!-- particles.js container -->
  38. <div id="particles-js"></div>
  39. <!-- scripts -->
  40. <script src="https://lib.baomitu.com/particles.js/2.0.0/particles.min.js"></script>
  41. <script src="./vendor/particles/js/app.js"></script>
  42. <div id="app">
  43. <!-- <header class="header">
  44. <div class="school-logo"><img :src="this.logoPath" alt="school logo" />
  45. </div>
  46. <a class="close" style="border-bottom-left-radius: 6px;">关闭</a>
  47. </header> -->
  48. <div class="center" v-show="loaded">
  49. <!-- width: 100%;min-height: 350px;max-height: 380px; -->
  50. <!--<el-card style="position: absolute;top: 20%;margin-left: 0%;margin-right: 25%;width: 765px;min-width: 300px;height: 380px;z-index: 999999999999;" v-show="showInfo">
  51. <div slot="header" class="clearfix" style="text-align: left;">
  52. <span class="artcle-title">自治区招生考试院关于推迟我区4月高等教育自学考试报考工作的公告 </span> <button type="button" @click="showInfo=false;" aria-label="Close" class="el-dialog__headerbtn" style="margin-top: 10px; font-size: 18px;"><i class="el-dialog__close el-icon el-icon-close"></i></button>
  53. </div>
  54. <span class="artcle-detail">
  55. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;为贯彻落实国家和自治区关于做好新型冠状病毒肺炎疫情防控工作的有关精神,
  56. <br>
  57. 切实保障广大考生和考试工作人员的生命安全和身体健康,
  58. <br>
  59. 原定于2月17日开始的4月高等教育自学考试报考工作推迟进行,
  60. <br>
  61. 具体报考时间将视疫情防控情况另行通知。
  62. <br>
  63. 请各位考生密切关注“广西招生考试院”网站(www.gxeea.cn)、
  64. <br>
  65. 微信公众号(名称:柳园清风、广西自考办)发布的相关信息。
  66. <br>
  67.  
  68. <div style="text-align: right;width: 100%;margin-bottom: 30px">广西壮族自治区招生考试院<br>
  69.     2020年2月17日<br>
  70. </div>
  71. </span>
  72. </el-card>
  73. <el-card style="position: absolute;top: 25%;margin-left: 30%;margin-right: 25%;width: 250px;min-width: 300px;height: 250px;z-index: 999999999999;" v-show="showInfo">
  74. <div slot="header" class="clearfix" style="text-align: center;">
  75. <span style=" font-size: 16px;">识别二维码领取“广西健康码” </span>
  76. </div>
  77. <div style="margin-left: 25%;top: 25%;"><img src="http://www.gxeea.cn/gallary/upload_images//1013_25850_1595583126945.png" />
  78. </div>
  79. </el-card>
  80. -->
  81. <el-card style="position: absolute;top: 25%;margin-left: 35%;margin-right: 5%;width: 250px;min-width: 300px;height: 250px;z-index: 999999999999;" v-show="showInfo">
  82. <div slot="header" class="clearfix" style="text-align: center;">
  83. <span style=" font-size: 16px;">手机浏览器扫一扫下载广西自考APP Android版(苹果版本暂未提供) </span>
  84. </div>
  85. <div style="margin-left: 25%;top: 25%;"><img style="width: 125px;height: 125px;" src="https://zk1.gxeea.cn:8001/login/img/zk_app.png" />
  86. </div>
  87. <div style="text-align: left;margin-left: 0%;top: 25%;">
  88. <a style="position: absolute;font-size: 16px;" href="https://www.gxeea.cn/app/zk.apk">或点击下载广西自考APP Android版</a>
  89. </div>
  90. </el-card>
  91. <div class="content">
  92. <el-card class="box-card" style="position: absolute;top: 9%;width: 380px;min-height: 350px;max-height: 460px;">
  93. <div slot="header" class="clearfix" style="text-align: center;">
  94. <span>广西自学考试网上系统</span>
  95. </div>
  96. <center>
  97. <el-tabs type="border-card">
  98. <el-tab-pane label="账 号" onclick="logintype=0;">
  99. <el-form ref="loginForm" :model="loginForm" :rules="loginFormRule">
  100. <!-- <el-form-item prop="accountValue">
  101. <el-input type="text" v-model="loginForm.cert_no" placeholder="登录账号:证件号/准考证号">
  102. <el-icon icon="edit" slot="prepend"></el-icon>
  103. </el-input>
  104. </el-form-item>
  105. <el-form-item prop="password">
  106. <el-input type="password" v-model="loginForm.std_pass" placeholder="密码" @on-enter="login('loginForm')">
  107. <el-icon icon="share" slot="prepend"></el-icon>
  108. </el-input>
  109. </el-form-item> -->
  110. <form class="el-form">
  111. <div class="el-form-item">
  112. <div class="el-form-item__content">
  113. <div class="el-input el-input-group el-input-group--prepend">
  114. <div class="el-input-group__prepend" style="padding-left: 15px;padding-right: 15px;color: black">
  115. <!-- <i class="el-icon-undefined" icon="edit"></i> -->
  116. <i class="fa fa-user-o fa-fw"></i>
  117. </div>
  118. <input type="text" v-model="loginForm.cert_no" maxlength="32"
  119. autocomplete="off" placeholder="登录账号:证件号/准考证号" class="el-input__inner">
  120. </div>
  121. </div>
  122. </div>
  123. <div class="el-form-item">
  124. <div class="el-form-item__content">
  125. <div class="el-input el-input-group el-input-group--prepend">
  126. <div class="el-input-group__prepend" style="padding-left: 15px;padding-right: 15px;color: black">
  127. <i class="fa fa-key fa-fw"></i>
  128. </div>
  129. <input v-model="loginForm.std_pass"
  130. type="password" autocomplete="off" placeholder="密码" class="el-input__inner">
  131. </div>
  132. </div>
  133. </div>
  134. <div class="el-form-item">
  135. <div class="el-form-item__content">
  136. <div class="el-input el-input-group el-input-group--prepend">
  137. <div class="el-input-group__prepend" style="padding-left: 15px;padding-right: 15px;color: black">
  138. <i class="fa fa-hand-o-right fa-fw"></i>
  139. </div>
  140. <input v-model="validateCode" maxlength="4"
  141. type="text" autocomplete="off" placeholder="校验码" class="el-input__inner">
  142. <!-- <i class="fa fa-info fa-lg" style=" position: absolute;top: 15px;right: 100px;height: 80%;"></i> -->
  143. <i v-if="validateCode_check==1" class="fa fa-check-circle-o fa-lg" style="font-size: 22px; position: absolute;top: 15px;right: 100px;height: 80%;color:#67C23A"></i>
  144. <i v-if="validateCode_check==0" class="fa fa-times-circle-o fa-lg" style="font-size: 22px; position: absolute;top: 15px;right: 100px;height: 80%;color: #F56C6C"></i>
  145. <i v-if="validateCode_check=='loading'" class="fa fa-spinner fa-lg" style="font-size: 22px; position: absolute;top: 15px;right: 100px;height: 80%;color: blue"></i>
  146. <img :src="validateCodesrc" @click="freshImg" style="cursor:pointer; position: absolute;top: 5px;right: 2px;height: 80%;">
  147. </div>
  148. </div>
  149. </div>
  150. <!-- <div class="el-form-item">
  151. <div class="el-form-item__content">
  152. <span style="width: 100%;">
  153. <button type="button" class="el-button btn-long el-button-primary">
  154. <span>登录</span>
  155. </button>
  156. </span>
  157. <a>注册</a>
  158. </div>
  159. </div> -->
  160. </form>
  161. <!-- <el-alert type="error" size="mini" show-icon>{{errorInfo}}</el-alert> -->
  162. <div v-if="errorInfo" >
  163. <div style="margin-bottom: 5px;">
  164. <div role="alert" class="el-alert el-alert--error" size="mini" style=" font-size:10px;">
  165. <i class="fa fa-info-circle fa-lg"></i>
  166. <div class="el-alert__content">{{errorInfo}}
  167. <i class="el-alert__closebtn fa fa-window-close fa-lg" @click="errorInfo = null"></i>
  168. </div>
  169. </div>
  170. </div>
  171. </div>
  172. <el-form-item>
  173. <span style="width:100%">
  174. <el-button type="primary" id="loginBtn" class="btn-long" @click="login('loginForm')">登录</el-button>
  175. </span>
  176. <a style="position: absolute;left: 0px;" href="javascript:void(0)" @click="goReg()">新考生注册(老考生十二位准考证查询)</a> &nbsp;
  177. <!--
  178. <a style="position: absolute;right: 2px;" href="https://www.google.cn/intl/zh-CN/chrome/">chrome浏览器下载</a>
  179. <a style="position: absolute;left: 0px;top:65px;" href="./scoreQuery.html">快捷成绩查询</a>
  180. -->
  181. <a style="position: absolute;left: 0px;top:65px;" href="javascript:void(0)" @click="goPassword()">忘记密码</a>
  182. <a style="position: absolute;right: 2px;top:65px" href="javascript:void(0)" @click="goMajorPlanQuery()">
  183. 专业计划查询
  184. </a>
  185. </el-form-item>
  186. </el-form>
  187. </el-tab-pane>
  188. <el-tab-pane label="手机号" onclick="logintype=1;">
  189. <el-form ref="loginForm" :model="loginForm" :rules="loginFormRule">
  190. <form class="el-form">
  191. <div class="el-form-item">
  192. <div class="el-form-item__content">
  193. <div class="el-input el-input-group el-input-group--prepend">
  194. <div class="el-input-group__prepend" style="padding-left: 15px;padding-right: 15px;color: black">
  195. <i class="fa fa-user-o fa-fw"></i>
  196. </div>
  197. <input type="text" v-model="loginForm.cert_no" maxlength="32"
  198. autocomplete="off" placeholder="登录账号:手机号码" class="el-input__inner">
  199. </div>
  200. </div>
  201. </div>
  202. <div class="el-form-item">
  203. <div class="el-form-item__content">
  204. <div class="el-input el-input-group el-input-group--prepend">
  205. <div class="el-input-group__prepend" style="padding-left: 15px;padding-right: 15px;color: black">
  206. <i class="fa fa-key fa-fw"></i>
  207. </div>
  208. <input v-model="loginForm.code" maxlength="6"
  209. type="text" autocomplete="off" placeholder="短信验证码" class="el-input__inner">
  210. <a style="cursor:pointer; position: absolute;top: 12px;right: 20px;height: 80%;" href="javascript:void(0)" :disabled="secCountDown>0" @click="sendSmsForLogin()">{{secCountDownInfo}}</a>
  211. </div>
  212. </div>
  213. </div>
  214. <div class="el-form-item">
  215. <div class="el-form-item__content">
  216. <div class="el-input el-input-group el-input-group--prepend">
  217. <div class="el-input-group__prepend" style="padding-left: 15px;padding-right: 15px;color: black">
  218. <i class="fa fa-hand-o-right fa-fw"></i>
  219. </div>
  220. <input v-model="validateCode" maxlength="4"
  221. type="text" autocomplete="off" placeholder="校验码" class="el-input__inner">
  222. <i v-if="validateCode_check==1" class="fa fa-check-circle-o fa-lg" style="font-size: 22px; position: absolute;top: 15px;right: 100px;height: 80%;color:#67C23A"></i>
  223. <i v-if="validateCode_check==0" class="fa fa-times-circle-o fa-lg" style="font-size: 22px; position: absolute;top: 15px;right: 100px;height: 80%;color: #F56C6C"></i>
  224. <i v-if="validateCode_check=='loading'" class="fa fa-spinner fa-lg" style="font-size: 22px; position: absolute;top: 15px;right: 100px;height: 80%;color: blue"></i>
  225. <img :src="validateCodesrc" @click="freshImg" style="cursor:pointer; position: absolute;top: 5px;right: 2px;height: 80%;">
  226. </div>
  227. </div>
  228. </div>
  229. <!-- <div class="el-form-item">
  230. <div class="el-form-item__content">
  231. <span style="width: 100%;">
  232. <button type="button" class="el-button btn-long el-button-primary">
  233. <span>登录</span>
  234. </button>
  235. </span>
  236. <a>注册</a>
  237. </div>
  238. </div> -->
  239. </form>
  240. <!-- <el-alert type="error" size="mini" show-icon>{{errorInfo}}</el-alert> -->
  241. <div v-if="errorInfo" >
  242. <div style="margin-bottom: 5px;">
  243. <div role="alert" class="el-alert el-alert--error" size="mini" style=" font-size:10px;">
  244. <i class="fa fa-info-circle fa-lg"></i>
  245. <div class="el-alert__content">{{errorInfo}}
  246. <i class="el-alert__closebtn fa fa-window-close fa-lg" @click="errorInfo = null"></i>
  247. </div>
  248. </div>
  249. </div>
  250. </div>
  251. <el-form-item>
  252. <span style="width:100%">
  253. <el-button type="primary" id="loginBtnForPhone" class="btn-long" @click="loginForPhone('loginForm')">登录</el-button>
  254. </span>
  255. <a style="position: absolute;left: 0px;" href="javascript:void(0)" @click="goReg()">新考生注册(老考生十二位准考证查询)</a> &nbsp;
  256. <!--
  257. <a style="position: absolute;right: 2px;" href="https://www.google.cn/intl/zh-CN/chrome/">chrome浏览器下载</a>
  258. <a style="position: absolute;left: 0px;top:65px;" href="./scoreQuery.html">快捷成绩查询</a>
  259. -->
  260. <a style="position: absolute;left: 0px;top:65px;" href="javascript:void(0)" @click="goPassword()">忘记密码</a>
  261. <a style="position: absolute;right: 2px;top:65px" href="javascript:void(0)" @click="goMajorPlanQuery()">
  262. 专业计划查询
  263. </a>
  264. </el-form-item>
  265. </el-form>
  266. </el-tab-pane>
  267. </el-tabs>
  268. </center>
  269. </el-card>
  270. <el-card style="margin-bottom:0px;padding-bottom:0px;margin-top:0px;padding-top:0px;position: absolute;top: 24%;right: 14%;width: 270px;min-height: 320px;;z-index: 999999999999;" v-show="isMutiAccount">
  271. <div slot="header" class="clearfix" style="text-align: center;">
  272. <span>选择账号 </span> <button type="button" @click="isMutiAccount=false;" aria-label="Close" class="el-dialog__headerbtn" style="font-size: 16px;"><i class="el-dialog__close el-icon el-icon-close"></i></button>
  273. </div>
  274. <div slot="header" class="clearfix" style="text-align: center;">
  275. <el-table
  276. :data="accountArray"
  277. style="width: 100%;text-align: center;"
  278. @selection-change="handleSelectionChange"
  279. @current-change="handleCurrentChange"
  280. >
  281. <el-table-column
  282. prop="ticket_no"
  283. label="准考证号"
  284. style="width: 250px;text-align: center;padding:0px;margin: 0px;"
  285. >
  286. </el-table-column>
  287. </el-table>
  288. </div>
  289. </el-card>
  290. <el-card style="margin-bottom:0px;padding-bottom:0px;margin-top:0px;padding-top:0px;position: absolute;top: 24%;right: 14%;width: 270px;min-height: 320px;;z-index: 999999999999;" v-show="isMutiAccountForPhone">
  291. <div slot="header" class="clearfix" style="text-align: center;">
  292. <span>选择账号 </span> <button type="button" @click="isMutiAccountForPhone=false;" aria-label="Close" class="el-dialog__headerbtn" style="font-size: 16px;"><i class="el-dialog__close el-icon el-icon-close"></i></button>
  293. </div>
  294. <div slot="header" class="clearfix" style="text-align: center;">
  295. <el-table
  296. :data="accountArray"
  297. style="width: 100%;text-align: center;"
  298. @selection-change="handleSelectionChangeForPhone"
  299. @current-change="handleCurrentChangeForPhone"
  300. >
  301. <el-table-column
  302. prop="ticket_no"
  303. label="准考证号"
  304. style="width: 250px;text-align: center;padding:0px;margin: 0px;"
  305. >
  306. </el-table-column>
  307. </el-table>
  308. </div>
  309. </el-card>
  310. </div>
  311. </div>
  312. </div>
  313. <center>
  314. <footer class="footer" style="z-index: 999999999999;text-align:right"> @fairyever</footer>
  315. </center>
  316. <script>
  317. new Vue({
  318. el: '#app',
  319. computed: {
  320. validateCodesrc: function() {
  321. this.randomnum = Date.parse(new Date());
  322. return basePath + "/std/validateCode.htm?"+this.randomnum;
  323. },
  324. },
  325. watch: {
  326. validateCode: function(newValue, oldValue) {
  327. if(newValue && newValue.length ==4){
  328. this.validateCode_check = "loading";
  329. var this_ = this;
  330. //请求验证 校验码
  331. ajaxRequest("", '/std/stdRegInfo/checkValidateCode.htm', {validateCode:this.validateCode}, function (resp) {
  332. if (resp.success) {
  333. this_.validateCode_check = 1;
  334. } else {
  335. this_.validateCode_check = 0;
  336. }
  337. })
  338. }
  339. },
  340. },
  341. data: function () {
  342. return {
  343. pubKey:null,
  344. showInfo:true,
  345. randomnum:null,
  346. validateCode_check:null,
  347. loaded: false,
  348. logoPath: "",
  349. productName: "广西自考报考系统",
  350. errorInfo: null,
  351. validateCode: "",
  352. isMutiAccount:false,
  353. isMutiAccountForPhone:false,
  354. accountArray:[],
  355. selection:null,
  356. accountArrayloading:false,
  357. secCountDown: 0,
  358. secCountDownInfo:"发送短信验证码",
  359. logintype:0,
  360. loginForm: {
  361. cert_no: "",
  362. std_pass: "",
  363. validateCode:"",
  364. code:"",
  365. id:""
  366. },
  367. loginFormRule: {
  368. cert_no: [{
  369. required: true,
  370. message: "请填写登录账号",
  371. trigger: "blur"
  372. }],
  373. std_pass: [{
  374. required: true,
  375. message: "请填写密码",
  376. trigger: "blur"
  377. }],
  378. code: [{
  379. required: true,
  380. message: "请填写短信验证码",
  381. trigger: "blur"
  382. }],
  383. validateCode: [{
  384. required: true,
  385. message: "请填写校验码",
  386. trigger: "blur"
  387. }]
  388. }
  389. //
  390. }
  391. },
  392. mounted: function() {
  393. var div = document.getElementById("particles-js");
  394. div.children[0].height = div.children[0].height - 220;
  395. var this_ = this;
  396. //获取公钥
  397. ajaxRequest("", '/std/stdRegInfo/queryPubKey.htm', {}, function (resp) {
  398. if (resp.success) {
  399. this_.pubKey = resp.entity;
  400. }
  401. });
  402. },
  403. created: function() {
  404. this.loaded = true;
  405. },
  406. methods: {
  407. freshImg: function(){
  408. this.randomnum = Date.parse(new Date());
  409. },
  410. goReg: function () {
  411. window.location.href = './reg.html';
  412. },
  413. goPassword: function(){
  414. window.location.href = './password.html';
  415. },
  416. goMajorPlanQuery: function(){
  417. window.location.href = './majorPlanQuery.html';
  418. },
  419. handleSelectionChange: function(val){
  420. this.selection = val;
  421. },
  422. handleCurrentChange: function(val){
  423. this.selection = val;
  424. this.isMutiAccount = false;
  425. this.loginForm.cert_no = val.ticket_no;
  426. this.login();
  427. },
  428. handleSelectionChangeForPhone: function(val){
  429. this.selection = val;
  430. },
  431. handleCurrentChangeForPhone: function(val){
  432. this.selection = val;
  433. this.isMutiAccountForPhone = false;
  434. this.loginForm.id = val.id;
  435. this.loginForPhone();
  436. },
  437. getSignString:function(data) {
  438. var encrypt = new JSEncrypt();
  439. // 公匙,由后端返回到前台
  440. encrypt.setPublicKey(this.pubKey);
  441. var encodePassword = encrypt.encrypt(data);
  442. return encodePassword;
  443. },
  444. login: function () {
  445. this.errorInfo = null;
  446. var _this = this;
  447. if(!this.loginForm.cert_no){
  448. this.errorInfo = "请填写登录账号";
  449. return;
  450. }
  451. if(!this.loginForm.std_pass){
  452. this.errorInfo = "请填写密码";
  453. return;
  454. }
  455. if(!this.validateCode){
  456. this.errorInfo = "请填写校验码";
  457. return;
  458. }
  459. var std_pass_md5 = this.getSignString(hex_md5(this.loginForm.std_pass));
  460. var cloneLoginForm = JSON.parse(JSON.stringify(this.loginForm));
  461. cloneLoginForm.std_pass = std_pass_md5;
  462. cloneLoginForm.validateCode = this.validateCode;
  463. ajaxRequest("", '/std/login.htm', cloneLoginForm, function (resp) {
  464. if (resp.success) {
  465. if(resp.array){
  466. _this.accountArray = resp.array;
  467. _this.isMutiAccount = true;
  468. // _this.accountArrayloading = false;
  469. return;
  470. }
  471. localStorage.setItem("user",JSON.stringify(resp.entity));
  472. // 如果没有绑定手机号码且也没有设置密保问题,(两者设置其一直接跳转首页),则跳转绑定手机号码页面
  473. //if(!resp.entity.bindphone && resp.entity.question=='0'){
  474. // 20220722 当前批次信息没有采集,考生第一次登录时,跳转采集页面
  475. if(!resp.entity.year_code || resp.entity.year_code!=resp.entity.current_year_code){
  476. //跳转绑定手机页面
  477. window.location.href = "./phone.html";
  478. }else{
  479. //跳转系统首页
  480. window.location.href = "../#/index";
  481. }
  482. } else {
  483. _this.errorInfo = resp.errorMsg;
  484. _this.freshImg();
  485. _this.validateCode = "";
  486. }
  487. })
  488. },
  489. loginForPhone: function () {
  490. this.errorInfo = null;
  491. var _this = this;
  492. if(!this.loginForm.cert_no){
  493. this.errorInfo = "请填写手机号码";
  494. return;
  495. }
  496. if(!this.loginForm.code){
  497. this.errorInfo = "请填写短信验证码";
  498. return;
  499. }
  500. if(!this.validateCode){
  501. this.errorInfo = "请填写校验码";
  502. return;
  503. }
  504. var cloneLoginForm = JSON.parse(JSON.stringify(this.loginForm));
  505. cloneLoginForm.code = this.loginForm.code;
  506. cloneLoginForm.validateCode = this.validateCode;
  507. ajaxRequest("", '/std/loginForPhone.htm', cloneLoginForm, function (resp) {
  508. if (resp.success) {
  509. if(resp.array){
  510. _this.accountArray = resp.array;
  511. _this.isMutiAccountForPhone = true;
  512. // _this.accountArrayloading = false;
  513. return;
  514. }
  515. localStorage.setItem("user",JSON.stringify(resp.entity));
  516. if(!resp.entity.year_code || resp.entity.year_code!=resp.entity.current_year_code){
  517. //跳转绑定手机页面
  518. window.location.href = "./phone.html";
  519. }else{
  520. //跳转系统首页
  521. window.location.href = "../#/index";
  522. }
  523. //跳转系统首页
  524. // window.location.href = "../#/index";
  525. } else {
  526. _this.errorInfo = resp.errorMsg;
  527. _this.freshImg();
  528. _this.validateCode = "";
  529. if(_this.cloneLoginForm && _this.cloneLoginForm.id){
  530. _this.cloneLoginForm.id="";
  531. }
  532. }
  533. })
  534. },
  535. sendSmsForLogin: function(){
  536. var _this = this;
  537. this.errorInfo = "";
  538. if(!_this.loginForm.cert_no){
  539. this.errorInfo = "请填写手机号码";
  540. return;
  541. }
  542. //if(!_this.validateCode){
  543. // _this.errorInfo = "请填写校验码";
  544. // return;
  545. // }
  546. ajaxRequest("", '/std/sendSmsForLogin.htm', {std_mobile:this.loginForm.cert_no }, function (resp) {
  547. if(resp.success==true){
  548. _this.secCountDown = 60;
  549. var int = setInterval(function(){
  550. _this.secCountDown--;
  551. if(_this.secCountDown == 0){
  552. clearInterval(int);
  553. //恢复 发送按钮
  554. _this.secCountDownInfo = "发送短信验证码";
  555. }else{
  556. //倒计时提示
  557. _this.secCountDownInfo = _this.secCountDown+"秒后可重新发送";
  558. }
  559. },1000);
  560. _this.errorInfo = "验证码发送成功,请填写短信验证码!";
  561. }else if(resp.success==false && resp.errorMsg){
  562. _this.errorInfo = resp.errorMsg;
  563. }else{
  564. _this.errorInfo = "验证码发送失败,请重新尝试!";
  565. }
  566. _this.freshImg();
  567. _this.validateCode = "";
  568. })
  569. },
  570. }
  571. });
  572. </script>
  573. <style scoped>
  574. .home {
  575. display: flex;
  576. flex-direction: column;
  577. height: 100vh;
  578. }
  579. .school-logo {
  580. margin-left: -300px;
  581. }
  582. .header {
  583. min-height: 120px;
  584. display: grid;
  585. }
  586. .center {
  587. position: absolute;
  588. top: 0;
  589. left: 0;
  590. right: 0;
  591. bottom: 0;
  592. background-image: url("./img/bg.jpg");
  593. background-position: center;
  594. background-repeat: no-repeat;
  595. background-size: cover;
  596. /* opacity: 0.8;*/
  597. filter: alpha(opacity = 20);
  598. }
  599. .content {
  600. margin-top: 100px;
  601. margin-left: 60%;
  602. width: 380px;
  603. /* height: 300px; */
  604. border-radius: 6px;
  605. background-color: white;
  606. display: grid;
  607. grid-template-areas: "";
  608. }
  609. .login-type {
  610. flex: 1;
  611. line-height: 40px;
  612. background-color: #eeeeee;
  613. }
  614. .active-type {
  615. background-color: #ffffff;
  616. }
  617. .close {
  618. position: absolute;
  619. top: 0;
  620. right: 0;
  621. background-color: #eeeeee;
  622. color: #999999;
  623. width: 80px;
  624. height: 40px;
  625. line-height: 40px;
  626. }
  627. .close:hover {
  628. color: #444444;
  629. }
  630. .btn-long {
  631. width: 100%;
  632. }
  633. body {
  634. margin: 0px 0px
  635. }
  636. .group__prepend{
  637. padding: 0px 10px !important;
  638. }
  639. .el-alert {
  640. margin: 20px 0 0;
  641. }
  642. .el-alert--error {
  643. background-color: #fef0f0 !important;
  644. color: #f56c6c;
  645. }
  646. .el-alert {
  647. width: 100%;
  648. padding: 8px 16px;
  649. margin: 0;
  650. box-sizing: border-box;
  651. border-radius: 4px;
  652. position: relative;
  653. background-color: #fff;
  654. overflow: hidden;
  655. opacity: 1;
  656. display: flex;
  657. align-items: center;
  658. transition: opacity .2s;
  659. }
  660. .artcle-title {
  661. margin-top: 25px !important;
  662. font-family: "Microsoft YaHei", "微软雅黑字体";
  663. color: #4c4c4c !important;
  664. font-size: 23px !important;
  665. text-align: center !important;
  666. font-weight: bold !important;
  667. }
  668. .artcle-detail {
  669. padding-top: 20px;
  670. line-height: 30px;
  671. font-size: 18px;
  672. }
  673. .el-tabs__nav{
  674. width: 100% !important
  675. }
  676. .el-tabs__item{
  677. width: 50% !important
  678. }
  679. /* .el-card__header{
  680. padding: 3px 3px;
  681. }
  682. .el-card__body{
  683. padding: 0px !important
  684. } */
  685. </style>
  686. </body>
  687. </html>