1 |
- {"version":3,"sources":["webpack:///./src/views/Login/Login.vue","webpack:///src/views/Login/Login.vue","webpack:///./src/views/Login/Login.vue?bd58","webpack:///./src/views/Login/Login.vue?bc16","webpack:///./src/views/Login/Login.vue?143c"],"names":["render","_vm","this","_c","_self","staticStyle","attrs","style","background","padding","height","staticClass","require","_v","form","on","login","directives","name","rawName","value","rules","required","message","expression","slot","loading","staticRenderFns","data","mounted","localStorage","methods","e","console","Authenticate","initBox","autoLogin","AuthenticateAuto","Token","component"],"mappings":"gJAAA,IAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,WAAW,CAACE,YAAY,CAAC,SAAW,QAAQ,OAAS,OAAO,MAAQ,QAAQC,MAAM,CAAC,GAAK,oCAAoC,CAACH,EAAG,kBAAkB,CAACI,MAAO,CAAEC,WAAY,OAAQC,QAAS,EAAGC,OAAO,UAAW,CAACP,EAAG,MAAM,CAACQ,YAAY,cAAc,CAACR,EAAG,MAAM,CAACQ,YAAY,UAAUL,MAAM,CAAC,IAAMM,EAAQ,QAA+B,IAAM,MAAMT,EAAG,YAAYA,EAAG,mBAAmB,CAACQ,YAAY,eAAe,CAACR,EAAG,MAAM,CAACQ,YAAY,YAAY,CAACR,EAAG,IAAI,CAACE,YAAY,CAAC,YAAY,YAAYF,EAAG,MAAM,CAACQ,YAAY,aAAa,CAACR,EAAG,IAAI,CAACQ,YAAY,eAAe,CAACV,EAAIY,GAAG,UAAUV,EAAG,SAAS,CAACE,YAAY,CAAC,MAAQ,SAASC,MAAM,CAAC,KAAOL,EAAIa,MAAMC,GAAG,CAAC,OAASd,EAAIe,QAAQ,CAACb,EAAG,cAAc,CAACA,EAAG,UAAU,CAACc,WAAW,CAAC,CAACC,KAAK,YAAYC,QAAQ,cAAcC,MAAO,CACryB,yBACA,CAACC,MAAO,CAAC,CAAEC,UAAU,EAAMC,QAAS,cACnCC,WAAW,6JAA6JnB,YAAY,CAAC,OAAS,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ACAA,4CACAA,wCACA,mBAAAZ,4BACA,kBACA,UACA,sBC/G8V,I,wBCQ1VqB,EAAY,eACd,EACAvC,EACA2B,GACA,EACA,KACA,WACA,MAIa,aAAAY,E,2CCnBf","file":"js/chunk-7374bac2.5e41c8d4.js","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return _c('a-layout',{staticStyle:{\"position\":\"fixed\",\"height\":\"100%\",\"width\":\"100%\"},attrs:{\"id\":\"components-layout-demo-top-side\"}},[_c('a-layout-header',{style:({ background: '#fff', padding: 0, height:'112px'})},[_c('div',{staticClass:\"header-box\"},[_c('img',{staticClass:\"logoImg\",attrs:{\"src\":require(\"../../assets/images/u24.png\"),\"alt\":\"\"}}),_c('span')])]),_c('a-layout-content',{staticClass:\"content-box\"},[_c('div',{staticClass:\"desc-box\"},[_c('p',{staticStyle:{\"font-size\":\"22px\"}})]),_c('div',{staticClass:\"login-box\"},[_c('p',{staticClass:\"login-title\"},[_vm._v(\"用户登录\")]),_c('a-form',{staticStyle:{\"width\":\"240px\"},attrs:{\"form\":_vm.form},on:{\"submit\":_vm.login}},[_c('a-form-item',[_c('a-input',{directives:[{name:\"decorator\",rawName:\"v-decorator\",value:([\n 'userNameOrEmailAddress',\n {rules: [{ required: true, message: '请输入用户名!' }]}\n ]),expression:\"[\\n 'userNameOrEmailAddress',\\n {rules: [{ required: true, message: '请输入用户名!' }]}\\n ]\"}],staticStyle:{\"height\":\"35px\",\"margin-top\":\"8px\",\"padding-bottom\":\"8px\",\"box-sizing\":\"border-box\"},attrs:{\"placeholder\":\"用户名\"}},[_c('a-icon',{staticStyle:{\"color\":\"rgba(0,0,0,.25)\",\"margin-top\":\"-2px\"},attrs:{\"slot\":\"prefix\",\"type\":\"user\"},slot:\"prefix\"})],1)],1),_c('a-form-item',[_c('a-input',{directives:[{name:\"decorator\",rawName:\"v-decorator\",value:([\n 'password',\n {rules: [{ required: true, message: '请输入密码!' }]}\n ]),expression:\"[\\n 'password',\\n {rules: [{ required: true, message: '请输入密码!' }]}\\n ]\"}],staticStyle:{\"height\":\"35px\",\"margin-top\":\"8px\",\"padding-bottom\":\"8px\",\"box-sizing\":\"border-box\"},attrs:{\"type\":\"password\",\"placeholder\":\"登录密码\"}},[_c('a-icon',{staticStyle:{\"color\":\"rgba(0,0,0,.25)\",\"margin-top\":\"-2px\"},attrs:{\"slot\":\"prefix\",\"type\":\"lock\"},slot:\"prefix\"})],1)],1),_c('a-form-item',[_c('a-button',{staticStyle:{\"width\":\"100%\",\"margin-top\":\"25px\",\"height\":\"35px\"},attrs:{\"type\":\"primary\",\"html-type\":\"submit\",\"loading\":_vm.loading}},[_vm._v(\" 登录 \")])],1)],1)],1)]),_c('a-layout-footer',{staticStyle:{\"text-align\":\"center\",\"height\":\"112px\"}},[_c('p',{staticClass:\"foot-text\"},[_vm._v(\"© 2020 依格良特(重庆)科技发展有限公司\")])])],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n <a-layout id=\"components-layout-demo-top-side\" style=\"position: fixed; height: 100%;width: 100%;\">\r\n <a-layout-header :style=\"{ background: '#fff', padding: 0, height:'112px'}\">\r\n <div class=\"header-box\">\r\n <img src=\"../../assets/images/u24.png\" alt=\"\" class=\"logoImg\">\r\n <span></span>\r\n </div>\r\n </a-layout-header>\r\n <a-layout-content class=\"content-box\">\r\n <div class=\"desc-box\">\r\n <!-- <div\r\n style=\"font-size: 55px;margin-top:20px;font-weight:bolder;font-family:NSimSun;text-shadow:2px 2px 2px #000000;\">\r\n 组卷系统</div> -->\r\n <p style=\"font-size: 22px;\"></p>\r\n </div>\r\n <div class=\"login-box\">\r\n <p class=\"login-title\">用户登录</p>\r\n <a-form :form=\"form\" @submit=\"login\" style=\"width:240px;\">\r\n <a-form-item>\r\n <a-input style=\"height:35px;margin-top:8px;padding-bottom:8px;box-sizing:border-box\"\r\n v-decorator=\"[\r\n 'userNameOrEmailAddress',\r\n {rules: [{ required: true, message: '请输入用户名!' }]}\r\n ]\" placeholder=\"用户名\">\r\n <a-icon slot=\"prefix\" type=\"user\" style=\"color:rgba(0,0,0,.25);margin-top:-2px\" />\r\n </a-input>\r\n </a-form-item>\r\n <a-form-item>\r\n <a-input style=\"height:35px;margin-top:8px;padding-bottom:8px;box-sizing:border-box\"\r\n v-decorator=\"[\r\n 'password',\r\n {rules: [{ required: true, message: '请输入密码!' }]}\r\n ]\" type=\"password\" placeholder=\"登录密码\">\r\n <a-icon slot=\"prefix\" type=\"lock\" style=\"color:rgba(0,0,0,.25);margin-top:-2px\" />\r\n </a-input>\r\n </a-form-item>\r\n <a-form-item>\r\n <a-button style=\"width:100%;margin-top:25px;height:35px;\" type=\"primary\" html-type=\"submit\"\r\n :loading=\"loading\">\r\n 登录\r\n </a-button>\r\n </a-form-item>\r\n </a-form>\r\n </div>\r\n </a-layout-content>\r\n <a-layout-footer style=\"text-align: center;height:112px\">\r\n <p class=\"foot-text\">© 2020 依格良特(重庆)科技发展有限公司</p>\r\n </a-layout-footer>\r\n </a-layout>\r\n</template>\r\n<script>\r\n import { Authenticate,AuthenticateAuto } from '@/api/api'\r\n import { getQueryString } from '@/utils/tools'\r\n\r\n export default {\r\n name: \"login\",\r\n data() {\r\n return {\r\n form: this.$form.createForm(this),\r\n loading: false\r\n };\r\n },\r\n mounted() {\r\n this.$storage.remove('testBox');\r\n localStorage.setItem(\"Token\", '')\r\n localStorage.setItem(\"userId\", '')\r\n localStorage.setItem(\"userData\", '')\r\n localStorage.setItem(\"sourceToken\", '')\r\n localStorage.setItem(\"isSource\", '0')\r\n this.autoLogin()\r\n },\r\n methods: {\r\n login(e) {\r\n e.preventDefault();\r\n this.form.validateFields((err, values) => {\r\n if (!err) {\r\n console.log(values, 'values')\r\n this.loading = true;\r\n Authenticate(values).then(res => {\r\n this.initBox();\r\n console.log(res, 'res666666666666')\r\n localStorage.setItem(\"Token\", res.accessToken)\r\n localStorage.setItem(\"userId\", res.userId)\r\n this.$router.push({ name: 'qusetionBankManage' })\r\n this.loading = false;\r\n }).catch(err => {\r\n this.loading = false;\r\n })\r\n }\r\n });\r\n },\r\n initBox() {\r\n let testBox = this.$storage.get('testBox');\r\n console.log(testBox, 'testBox6666666666666')\r\n if (!testBox || testBox == null) {\r\n this.$storage.set('testBox', []);\r\n } else {\r\n this.$store.commit('setTestBox', testBox)\r\n }\r\n },\r\n autoLogin(){\r\n const query= getQueryString('token')\r\n if(query){\r\n this.loading = true;\r\n AuthenticateAuto({Token:query}).then(res => {\r\n localStorage.setItem(\"sourceToken\", query)\r\n localStorage.setItem(\"Token\", res.accessToken)\r\n localStorage.setItem(\"userId\", res.userId)\r\n this.$router.push({ name: 'qusetionBankManage' })\r\n this.loading = false;\r\n }).catch(err => {\r\n this.loading = false;\r\n })\r\n }\r\n },\r\n }\r\n };\r\n</script>\r\n<style scoped>\r\n span {\r\n height: 20px;\r\n }\r\n\r\n .content-box {\r\n padding: 0 6%;\r\n overflow-y: hidden;\r\n background-image: url(../../assets/background.png);\r\n background-size: 100% 100%;\r\n border: none;\r\n border-radius: 0px;\r\n position: relative;\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n }\r\n\r\n .desc-box {\r\n /* background-color: red; */\r\n height: 400px;\r\n color: #fff;\r\n /* font-weight: bold; */\r\n }\r\n\r\n .logo {\r\n width: 56px;\r\n height: 56px;\r\n margin-left: 32px;\r\n }\r\n\r\n .header-box {\r\n width: 100%;\r\n height: 100%;\r\n display: flex;\r\n align-items: center;\r\n padding: 30px 0;\r\n font-size: 30px;\r\n font-weight: bold;\r\n margin-left: 66px;\r\n }\r\n\r\n .title-group {\r\n width: 200px;\r\n height: 56px;\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: space-between;\r\n line-height: 20px;\r\n padding: 7px 10px 5px 12px;\r\n box-sizing: border-box;\r\n }\r\n\r\n .name {\r\n font-family: 'MicrosoftYaHei', '微软雅黑';\r\n font-weight: 400;\r\n font-style: normal;\r\n font-size: 20px;\r\n }\r\n\r\n .foot-text {\r\n color: rgba(0, 0, 0, 0.65);\r\n font-size: 14px;\r\n }\r\n\r\n .login-box {\r\n width: 320px;\r\n height: 400px;\r\n background-color: #fff;\r\n z-index: 99;\r\n border-radius: 4px;\r\n box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.0.35);\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n }\r\n\r\n .login-title {\r\n font-family: 'MicrosoftYaHei', '微软雅黑';\r\n font-weight: 400;\r\n font-style: normal;\r\n font-size: 18px;\r\n letter-spacing: 2px;\r\n color: #555555;\r\n margin-top: 55px;\r\n padding:35px 0 20px;\r\n }\r\n\r\n .logoImg {\r\n height: 80px;\r\n margin-left: 50px;\r\n }\r\n</style>","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Login.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Login.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Login.vue?vue&type=template&id=7ac5de77&scoped=true&\"\nimport script from \"./Login.vue?vue&type=script&lang=js&\"\nexport * from \"./Login.vue?vue&type=script&lang=js&\"\nimport style0 from \"./Login.vue?vue&type=style&index=0&id=7ac5de77&prod&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"7ac5de77\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Login.vue?vue&type=style&index=0&id=7ac5de77&prod&scoped=true&lang=css&\""],"sourceRoot":""}
|