You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
13 KiB
1 lines
13 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2312d406"],{5990:function(t,e,r){"use strict";r("a16b")},"5ad0":function(t,e,r){var n=r("7e70"),o=r("71fe"),i=r("57ad"),a=r("b5a9"),c=r("add7"),s=r("137b"),u=o.Array,l=i("JSON","stringify"),f=c(/./.exec),h=c("".charAt),p=c("".charCodeAt),d=c("".replace),g=c(1..toString),m=/[\uD800-\uDFFF]/g,y=/^[\uD800-\uDBFF]$/,v=/^[\uDC00-\uDFFF]$/,w=function(t,e,r){var n=h(r,e-1),o=h(r,e+1);return f(y,t)&&!f(v,o)||f(v,t)&&!f(y,n)?"\\u"+g(p(t,0),16):t},b=s((function(){return'"\\udf06\\ud834"'!==l("\udf06\ud834")||'"\\udead"'!==l("\udead")}));l&&n({target:"JSON",stat:!0,forced:b},{stringify:function(t,e,r){for(var n=0,o=arguments.length,i=u(o);n<o;n++)i[n]=arguments[n];var c=a(l,null,i);return"string"==typeof c?d(c,m,w):c}})},"9ed6":function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{attrs:{id:"userLayout"}},[r("div",{staticClass:"login_panle"},[r("div",{staticClass:"login_panle_form"},[t._m(0),r("el-form",{ref:"loginForm",attrs:{model:t.loginForm,rules:t.rules},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.submitForm(e)}}},[r("el-form-item",{attrs:{prop:"username"}},[r("el-input",{attrs:{placeholder:"请输入用户名"},scopedSlots:t._u([{key:"suffix",fn:function(){return[r("i",{staticClass:"el-input__icon el-icon-user"})]},proxy:!0}]),model:{value:t.loginForm.username,callback:function(e){t.$set(t.loginForm,"username",e)},expression:"loginForm.username"}})],1),r("el-form-item",{attrs:{prop:"password"}},[r("el-input",{attrs:{type:"lock"===t.lock?"password":"text",placeholder:"请输入密码"},scopedSlots:t._u([{key:"suffix",fn:function(){return[r("i",{class:"el-input__icon el-icon-"+t.lock,on:{click:t.changeLock}})]},proxy:!0}]),model:{value:t.loginForm.password,callback:function(e){t.$set(t.loginForm,"password",e)},expression:"loginForm.password"}})],1),r("el-form-item",{staticStyle:{position:"relative"},attrs:{prop:"captcha"}},[r("el-input",{staticStyle:{width:"60%"},attrs:{name:"logVerify",placeholder:"请输入验证码"},model:{value:t.loginForm.captcha,callback:function(e){t.$set(t.loginForm,"captcha",e)},expression:"loginForm.captcha"}}),r("div",{staticClass:"vPic"},[t.picPath?r("img",{attrs:{src:t.picPath,alt:"请输入验证码"},on:{click:function(e){return t.loginVerify()}}}):t._e()])],1),r("el-form-item",[r("el-button",{staticStyle:{width:"46%","margin-left":"25%"},attrs:{type:"primary"},on:{click:t.submitForm}},[t._v("登 录")])],1)],1)],1),r("div",{staticClass:"login_panle_right"})])])},o=[function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"login_panle_form_title"},[r("p",{staticClass:"login_panle_form_title_p"},[t._v("恒信高科后台管理系统")])])}],i=r("febe"),a=r("597f"),c=(r("e186"),r("5e4f"),r("5ad0"),r("e456"),r("a6d8"),r("5f87")),s=r("52c1"),u=r("c24f"),l={name:"Login",data:function(){var t=function(t,e,r){if(e.length<6)return r(new Error("请输入正确的密码"));r()};return{redirect:void 0,curYear:0,lock:"lock",loginForm:{username:"",password:"",captcha:"",captchaId:""},rules:{username:[{required:!0,message:"请输入工号",trigger:"blur"}],password:[{validator:t,trigger:"blur"}],captcha:[{required:!0,message:"请输入验证码",trigger:"blur"},{min:5,max:6,message:"验证码格式不正确",trigger:"blur"}]},logVerify:"",picPath:""}},created:function(){this.loginVerify(),this.curYear=(new Date).getFullYear()},watch:{$route:{handler:function(t){var e=t.query;e&&(this.redirect=e.redirect,this.otherQuery=this.getOtherQuery(e))},immediate:!0}},methods:Object(a["a"])(Object(a["a"])({},Object(s["b"])("user",["myLoginIn"])),{},{checkInit:function(){var t=this;return Object(i["a"])(regeneratorRuntime.mark((function e(){var r,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,checkDB();case 2:r=e.sent,0===r.code&&(null!==(n=r.data)&&void 0!==n&&n.needInit?(t.$store.commit("user/NeedInit"),t.$router.push({name:"Init"})):t.$message({type:"info",message:"已配置数据库信息,无法初始化"}));case 4:case"end":return e.stop()}}),e)})))()},submitForm:function(){var t=this;return Object(i["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.$refs.loginForm.validate(function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(r){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!r){e.next=7;break}return e.next=3,Object(u["e"])(t.loginForm);case 3:n=e.sent,0===n.code&&(Object(c["e"])(n.data.token),Object(c["d"])(n.data.key),console.log("res.data.userinfo"),console.log(n.data.userinfo),sessionStorage.setItem("userinfo",JSON.stringify(n.data.userinfo)),t.$store.commit("user/setUserInfo",n.data.userinfo),t.$store.commit("user/setToken",n.data.token),t.$store.commit("user/setKey",n.data.key),console.log("this.$store.state.user.token"),console.log(t.$store.state.user.token),console.log("this.$store.state.user.userInfo"),console.log(t.$store.state.user.userInfo),console.log("this.$store.state.user.key"),console.log(t.$store.state.user.key),t.$router.push("/"),t.loading=!1),e.next=10;break;case 7:return t.$message({type:"error",message:"请正确填写登录信息",showClose:!0}),t.loginVerify(),e.abrupt("return",!1);case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 1:case"end":return e.stop()}}),e)})))()},getOtherQuery:function(t){return Object.keys(t).reduce((function(e,r){return"redirect"!==r&&(e[r]=t[r]),e}),{})},changeLock:function(){this.lock="lock"===this.lock?"unlock":"lock"},loginVerify:function(){var t=this;Object(u["a"])({}).then((function(e){t.picPath=e.data.picPath,t.loginForm.captchaId=e.data.captchaId}))}})},f=l,h=(r("5990"),r("cba8")),p=Object(h["a"])(f,n,o,!1,null,"60b05bce",null);e["default"]=p.exports},a16b:function(t,e,r){},e186:function(t,e,r){var n=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,o="function"===typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(P){s=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,i=Object.create(o.prototype),a=new $(n||[]);return i._invoke=L(t,r,a),i}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(P){return{type:"throw",arg:P}}}t.wrap=u;var f="suspendedStart",h="suspendedYield",p="executing",d="completed",g={};function m(){}function y(){}function v(){}var w={};s(w,i,(function(){return this}));var b=Object.getPrototypeOf,k=b&&b(b(S([])));k&&k!==r&&n.call(k,i)&&(w=k);var x=v.prototype=m.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function F(t,e){function r(o,i,a,c){var s=l(t[o],t,i);if("throw"!==s.type){var u=s.arg,f=u.value;return f&&"object"===typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return r("throw",t,a,c)}))}c(s.arg)}var o;function i(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}this._invoke=i}function L(t,e,r){var n=f;return function(o,i){if(n===p)throw new Error("Generator is already running");if(n===d){if("throw"===o)throw i;return I()}r.method=o,r.arg=i;while(1){var a=r.delegate;if(a){var c=O(a,r);if(c){if(c===g)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var s=l(t,e,r);if("normal"===s.type){if(n=r.done?d:h,s.arg===g)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=d,r.method="throw",r.arg=s.arg)}}}function O(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator["return"]&&(r.method="return",r.arg=e,O(t,r),"throw"===r.method))return g;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var o=l(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function $(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var r=t[i];if(r)return r.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){while(++o<t.length)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:I}}function I(){return{value:e,done:!0}}return y.prototype=v,s(x,"constructor",v),s(v,"constructor",y),y.displayName=s(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"===typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,s(t,c,"GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},_(F.prototype),s(F.prototype,a,(function(){return this})),t.AsyncIterator=F,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new F(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(x),s(x,c,"Generator"),s(x,i,(function(){return this})),s(x,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){while(e.length){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=S,$.prototype={constructor:$,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(j),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0],e=t.completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:S(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}(t.exports);try{regeneratorRuntime=n}catch(o){"object"===typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},febe:function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));r("e456");function n(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(u){return void r(u)}c.done?e(s):Promise.resolve(s).then(n,o)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(o,i){var a=t.apply(e,r);function c(t){n(a,o,i,c,s,"next",t)}function s(t){n(a,o,i,c,s,"throw",t)}c(void 0)}))}}}}]);
|