scoreQuery.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  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="stylesheet" href="https://unpkg.com/element-ui@2.4.11/lib/theme-chalk/index.css">-->
  8. <!--<link rel="stylesheet" href="https://unpkg.com/element-ui@2.4.11/lib/theme-chalk/index.css">-->
  9. <link rel="stylesheet" href="https://lib.baomitu.com/element-ui/2.12.0/theme-chalk/index.css">
  10. <script src="https://lib.baomitu.com/jquery/1.12.4/jquery.min.js"></script>
  11. <script src="./vendor/md5/md5.js" type="text/javascript"></script>
  12. <script src="./js/tool.js"></script>
  13. <script src="https://lib.baomitu.com/vue/2.5.17/vue.min.js"></script>
  14. <script src="https://lib.baomitu.com/element-ui/2.4.11/index.js"></script>
  15. <script>
  16. function keyDown(){
  17. if (event.keyCode==13) //回车键的键值为13
  18. document.getElementById("loginBtn").click(); //调用登录按钮的登录事件
  19. }
  20. </script>
  21. </head>
  22. <body onkeydown="keyDown();">
  23. <div id="particles-js"></div>
  24. <div id="app">
  25. <div class="center" v-show="loaded">
  26. <div class="content">
  27. <el-card class="box-card" style="position: absolute;top: 20%;width: 380px;min-height: 350px;max-height: 380px;">
  28. <div slot="header" class="clearfix" style="text-align: center;">
  29. <span>广西自学考试网上系统</span>
  30. </div>
  31. <el-form ref="loginForm" :model="loginForm" :rules="loginFormRule">
  32. <form class="el-form">
  33. <div class="el-form-item">
  34. <div class="el-form-item__content">
  35. <div class="el-input el-input-group el-input-group--prepend">
  36. <div class="el-input-group__prepend" style="padding-left: 15px;padding-right: 15px;color: black">
  37. </div>
  38. <input type="text" v-model="loginForm.cert_no"
  39. autocomplete="off" placeholder="登录账号:证件号/准考证号" class="el-input__inner">
  40. </div>
  41. </div>
  42. </div>
  43. <div class="el-form-item">
  44. <div class="el-form-item__content">
  45. <div class="el-input el-input-group el-input-group--prepend">
  46. <div class="el-input-group__prepend" style="padding-left: 15px;padding-right: 15px;color: black">
  47. <i class="fa fa-key fa-fw"></i>
  48. </div>
  49. <input v-model="loginForm.std_pass"
  50. type="password" autocomplete="off" placeholder="密码" class="el-input__inner">
  51. </div>
  52. </div>
  53. </div>
  54. <div class="el-form-item">
  55. <div class="el-form-item__content">
  56. <div class="el-input el-input-group el-input-group--prepend">
  57. <div class="el-input-group__prepend" style="padding-left: 15px;padding-right: 15px;color: black">
  58. <i class="fa fa-hand-o-right fa-fw"></i>
  59. </div>
  60. <input v-model="validateCode" maxlength="4"
  61. type="text" autocomplete="off" placeholder="校验码" class="el-input__inner">
  62. <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>
  63. <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>
  64. <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>
  65. <img :src="validateCodesrc" @click="freshImg" style="cursor:pointer; position: absolute;top: 5px;right: 2px;height: 80%;">
  66. </div>
  67. </div>
  68. </div>
  69. </form>
  70. <div v-if="errorInfo" >
  71. <div style="margin-bottom: 5px;">
  72. <div role="alert" class="el-alert el-alert--error" size="mini" style=" font-size:10px;">
  73. <i class="fa fa-info-circle fa-lg"></i>
  74. <div class="el-alert__content">{{errorInfo}}
  75. <i class="el-alert__closebtn fa fa-window-close fa-lg" @click="errorInfo = null"></i>
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. <el-form-item>
  81. <span style="width:100%">
  82. <el-button type="primary" id="loginBtn" class="btn-long" @click="login('loginForm')">登录</el-button>
  83. </span>
  84. </el-form-item>
  85. </el-form>
  86. </el-card>
  87. </div>
  88. </div>
  89. </div>
  90. </body>
  91. <script>
  92. new Vue({
  93. el: '#app',
  94. computed: {
  95. validateCodesrc: function() {
  96. this.randomnum = Date.parse(new Date());
  97. return basePath + "/std/validateCode.htm?"+this.randomnum;
  98. },
  99. },
  100. watch: {
  101. validateCode: function(newValue, oldValue) {
  102. if(newValue && newValue.length ==4){
  103. this.validateCode_check = "loading";
  104. var this_ = this;
  105. //请求验证 校验码
  106. ajaxRequest("", '/std/stdRegInfo/checkValidateCode.htm', {validateCode:this.validateCode}, function (resp) {
  107. if (resp.success) {
  108. this_.validateCode_check = 1;
  109. } else {
  110. this_.validateCode_check = 0;
  111. }
  112. })
  113. }
  114. },
  115. },
  116. data: function () {
  117. return {
  118. showInfo:true,
  119. randomnum:null,
  120. validateCode_check:null,
  121. loaded: false,
  122. logoPath: "",
  123. productName: "广西自考报考系统",
  124. errorInfo: null,
  125. validateCode: "",
  126. isMutiAccount:false,
  127. selection:null,
  128. accountArrayloading:false,
  129. loginForm: {
  130. cert_no: "",
  131. std_pass: "",
  132. validateCode:""
  133. },
  134. loginFormRule: {
  135. cert_no: [{
  136. required: true,
  137. message: "请填写登录账号",
  138. trigger: "blur"
  139. }],
  140. std_pass: [{
  141. required: true,
  142. message: "请填写密码",
  143. trigger: "blur"
  144. }],
  145. validateCode: [{
  146. required: true,
  147. message: "请填写校验码",
  148. trigger: "blur"
  149. }]
  150. }
  151. }
  152. },
  153. mounted: function() {
  154. },
  155. created: function() {
  156. this.loaded = true;
  157. },
  158. methods: {
  159. freshImg: function(){
  160. this.randomnum = Date.parse(new Date());
  161. },
  162. handleSelectionChange: function(val){
  163. this.selection = val;
  164. },
  165. handleCurrentChange: function(val){
  166. this.selection = val;
  167. this.isMutiAccount = false;
  168. this.loginForm.cert_no = val.ticket_no;
  169. this.login();
  170. },
  171. login: function () {
  172. this.errorInfo = null;
  173. var _this = this;
  174. if(!this.loginForm.cert_no){
  175. this.errorInfo = "请填写登录账号";
  176. return;
  177. }
  178. if(!this.loginForm.std_pass){
  179. this.errorInfo = "请填写密码";
  180. return;
  181. }
  182. if(!this.validateCode){
  183. this.errorInfo = "请填写校验码";
  184. return;
  185. }
  186. var std_pass_md5 = hex_md5(this.loginForm.std_pass);
  187. var cloneLoginForm = JSON.parse(JSON.stringify(this.loginForm));
  188. cloneLoginForm.std_pass = std_pass_md5;
  189. cloneLoginForm.validateCode = this.validateCode;
  190. ajaxRequest("", '/std/login.htm', cloneLoginForm, function (resp) {
  191. if (resp.success) {
  192. if(resp.array){
  193. _this.isMutiAccount = true;
  194. return;
  195. }
  196. localStorage.setItem("user",JSON.stringify(resp.entity));
  197. //跳转系统首页
  198. window.location.href = "./score.html";
  199. } else {
  200. _this.errorInfo = resp.errorMsg;
  201. _this.freshImg();
  202. _this.validateCode = "";
  203. }
  204. })
  205. }
  206. }
  207. });
  208. </script>
  209. <style scoped>
  210. .home {
  211. display: flex;
  212. flex-direction: column;
  213. height: 100vh;
  214. }
  215. .school-logo {
  216. margin-left: -300px;
  217. }
  218. .header {
  219. min-height: 120px;
  220. display: grid;
  221. }
  222. .center {
  223. position: absolute;
  224. top: 0;
  225. left: 0;
  226. right: 0;
  227. bottom: 0;
  228. background-position: center;
  229. background-repeat: no-repeat;
  230. background-size: cover;
  231. opacity: 0.8;
  232. filter: alpha(opacity = 20);
  233. }
  234. .content {
  235. margin-top: 100px;
  236. margin-left: 35%;
  237. width: 380px;
  238. /* height: 300px; */
  239. border-radius: 6px;
  240. background-color: white;
  241. display: grid;
  242. grid-template-areas: "";
  243. }
  244. .login-type {
  245. flex: 1;
  246. line-height: 40px;
  247. background-color: #eeeeee;
  248. }
  249. .active-type {
  250. background-color: #ffffff;
  251. }
  252. .close {
  253. position: absolute;
  254. top: 0;
  255. right: 0;
  256. background-color: #eeeeee;
  257. color: #999999;
  258. width: 80px;
  259. height: 40px;
  260. line-height: 40px;
  261. }
  262. .close:hover {
  263. color: #444444;
  264. }
  265. .btn-long {
  266. width: 100%;
  267. }
  268. body {
  269. margin: 0px 0px
  270. }
  271. .group__prepend{
  272. padding: 0px 10px !important;
  273. }
  274. .el-alert {
  275. margin: 20px 0 0;
  276. }
  277. .el-alert--error {
  278. background-color: #fef0f0 !important;
  279. color: #f56c6c;
  280. }
  281. .el-alert {
  282. width: 100%;
  283. padding: 8px 16px;
  284. margin: 0;
  285. box-sizing: border-box;
  286. border-radius: 4px;
  287. position: relative;
  288. background-color: #fff;
  289. overflow: hidden;
  290. opacity: 1;
  291. display: flex;
  292. align-items: center;
  293. transition: opacity .2s;
  294. }
  295. .artcle-title {
  296. margin-top: 25px !important;
  297. font-family: "Microsoft YaHei", "微软雅黑字体";
  298. color: #4c4c4c !important;
  299. font-size: 23px !important;
  300. text-align: center !important;
  301. font-weight: bold !important;
  302. }
  303. .artcle-detail {
  304. padding-top: 20px;
  305. line-height: 30px;
  306. font-size: 18px;
  307. }
  308. </style>
  309. </html>