chunk-467fd85a.ed1039b8.js 3.8 KB

12
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-467fd85a"],{"0f6b":function(t,e,o){"use strict";o("129f")},"129f":function(t,e,o){},7101:function(t,e,o){"use strict";o.r(e);var a=function(){var t=this,e=t._self._c;return e("a-layout",{staticStyle:{position:"fixed",height:"100%",width:"100%"},attrs:{id:"components-layout-demo-top-side"}},[e("a-layout-header",{style:{background:"#fff",padding:0,height:"112px"}},[e("div",{staticClass:"header-box"},[e("img",{staticClass:"logoImg",attrs:{src:o("2533"),alt:""}}),e("span")])]),e("a-layout-content",{staticClass:"content-box"},[e("div",{staticClass:"desc-box"},[e("p",{staticStyle:{"font-size":"22px"}})]),e("div",{staticClass:"login-box"},[e("p",{staticClass:"login-title"},[t._v("用户登录")]),e("a-form",{staticStyle:{width:"240px"},attrs:{form:t.form},on:{submit:t.login}},[e("a-form-item",[e("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["userNameOrEmailAddress",{rules:[{required:!0,message:"请输入用户名!"}]}],expression:"[\n 'userNameOrEmailAddress',\n { rules: [{ required: true, message: '请输入用户名!' }] },\n ]"}],staticStyle:{height:"35px","margin-top":"8px","padding-bottom":"8px","box-sizing":"border-box"},attrs:{placeholder:"用户名"}},[e("a-icon",{staticStyle:{color:"rgba(0, 0, 0, 0.25)","margin-top":"-2px"},attrs:{slot:"prefix",type:"user"},slot:"prefix"})],1)],1),e("a-form-item",[e("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["password",{rules:[{required:!0,message:"请输入密码!"}]}],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:"登录密码"}},[e("a-icon",{staticStyle:{color:"rgba(0, 0, 0, 0.25)","margin-top":"-2px"},attrs:{slot:"prefix",type:"lock"},slot:"prefix"})],1)],1),e("a-form-item",[e("a-button",{staticStyle:{width:"100%","margin-top":"25px",height:"35px"},attrs:{type:"primary","html-type":"submit",loading:t.loading}},[t._v(" 登录 ")])],1)],1)],1)]),e("a-layout-footer",{staticStyle:{"text-align":"center",height:"112px"}},[e("p",{staticClass:"foot-text"},[t._v("© 2020 依格良特(重庆)科技发展有限公司")])])],1)},s=[],i=(o("14d9"),o("4ec3")),r=o("b893"),n={name:"login",data(){return{form:this.$form.createForm(this),loading:!1}},mounted(){this.$storage.remove("testBox"),localStorage.setItem("Token",""),localStorage.setItem("userId",""),localStorage.setItem("userData",""),localStorage.setItem("sourceToken",""),localStorage.setItem("isSource","0"),this.autoLogin()},methods:{login(t){t.preventDefault(),this.form.validateFields((t,e)=>{t||(console.log(e,"values"),this.loading=!0,Object(i["a"])(e).then(t=>{this.initBox(),console.log(t,"res666666666666"),localStorage.setItem("Token",t.accessToken),localStorage.setItem("userId",t.userId),this.$router.push({name:"qusetionBankManage"}),this.loading=!1}).catch(t=>{this.loading=!1}))})},initBox(){let t=this.$storage.get("testBox");console.log(t,"testBox6666666666666"),t&&null!=t?this.$store.commit("setTestBox",t):this.$storage.set("testBox",[])},autoLogin(){const t=Object(r["f"])("code");t?(this.loading=!0,Object(i["b"])({Token:t}).then(e=>{localStorage.setItem("sourceToken",t),localStorage.setItem("Token",e.accessToken),localStorage.setItem("userId",e.userId),this.$router.push({name:"qusetionBankManage"}),this.loading=!1}).catch(t=>{}).finally(()=>{this.loading=!1})):window.location.href="https://zhxy.cqtlzjzx.com/api/oauth2/authorize?response_type=code&client_id=1002&redirect_uri="+encodeURIComponent(window.location.href)}}},l=n,c=(o("0f6b"),o("2877")),d=Object(c["a"])(l,a,s,!1,null,"d37c4800",null);e["default"]=d.exports}}]);
  2. //# sourceMappingURL=chunk-467fd85a.ed1039b8.js.map