chunk-0b3cebcf.656a29bf.js 6.4 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-0b3cebcf"],{2017:function(e,t,n){"use strict";n("cafe")},"6a1e":function(e,t,n){"use strict";var s=n("1b69");t.a={verfiy:function(e,t){return Object(s.a)("Api/verify_code",e,"post",t)},resetpwd:function(e,t){return Object(s.a)("Api/passmobile",e,"post",t)},resetmobile:function(e,t){return Object(s.a)("Api/resetmobile",e,"post",t)},setpwd:function(e,t){return Object(s.a)("Api/passsave",e,"post",t)},list:function(e,t){return Object(s.a)("admin/menu",e,"post",t)},detail:function(e,t){return Object(s.a)("Admin/userinfo",e,"post",t)},version:function(e,t){return Object(s.a)("Admin/lastversion",e,"post",t)},prefect:function(e,t){return Object(s.a)("Api/prefect",e,"post",t)}}},"86ac":function(e,t,n){"use strict";n("b70f")},"9ed6":function(e,t,n){"use strict";n.r(t);var s=n("1da1"),i=(n("d3b7"),n("b64b"),n("96cf"),n("6a1e")),r=n("9f53"),o=n("61f7"),a=(r={name:"Login",mixins:[r.a],data:function(){return{ver:"",show:!1,loginForm:{username:"",password:""},loginRules:{username:[{required:!0,trigger:"blur",validator:function(e,t,n){""===t?n(new Error("手机号不能为空!")):Object(o.g)(t)?n():n(new Error("请输入正确的手机号"))}}],password:[{required:!0,trigger:"blur",validator:function(e,t,n){""===t?n(new Error("密码不能为空!")):!Object(o.b)(t)||t.length<6||18<t.length?n(new Error("密码为6-18位数字字母组合!")):Object(o.i)(t)?n(new Error("密码不能为纯数字!")):Object(o.o)(t)?n(new Error("密码不能为纯字母!")):n()}}]},passwordType:"password",capsTooltip:!1,loading:!1,showDialog:!1,redirect:void 0,otherQuery:{}}},watch:{$route:{handler:function(e){e=e.query,e&&(this.redirect=e.redirect,this.otherQuery=this.getOtherQuery(e))},immediate:!0}},created:function(){},mounted:function(){this.getversion(),""===this.loginForm.username?this.$refs.username.focus():""===this.loginForm.password&&this.$refs.password.focus()},methods:{getversion:function(){var e=this;return Object(s.a)(regeneratorRuntime.mark((function t(){var n,s;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.a.version({});case 2:if(!(n=t.sent)||0!==n.code){t.next=8;break}s=n.data,e.ver=s.version,t.next=14;break;case 8:if(n&&100<=n.code&&n.code<=104)return t.next=11,e.logout();t.next=13;break;case 11:t.next=14;break;case 13:e.$message.warning(n.message);case 14:case"end":return t.stop()}}),t)})))()},setVisible:function(e){this.show=e},handleClick:function(){this.show=!0},handleSuccess:function(){this.show=!1,this.handleLogin()},checkCapslock:function(e){e=e.key,this.capsTooltip=e&&1===e.length&&"A"<=e&&e<="Z"},showPwd:function(){var e=this;"password"===this.passwordType?this.passwordType="":this.passwordType="password",this.$nextTick((function(){e.$refs.password.focus()}))},handleLogin:function(){var e=this;this.$refs.loginForm.validate((function(t){if(!t)return!1;e.loading=!0,e.$store.dispatch("user/login",e.loginForm).then((function(t){0===t.code?e.getMenu():(e.$message.warning(t.message),e.loading=!1)})).catch((function(t){e.loading=!1}))}))},getMenu:function(){var e=this;this.$store.dispatch("user/getMenuList",this).then((function(t){window.vm.$router.push({path:"/welcome",query:e.otherQuery}),e.loading=!1})).catch((function(t){e.loading=!1}))},getOtherQuery:function(e){return Object.keys(e).reduce((function(t,n){return"redirect"!==n&&(t[n]=e[n]),t}),{})}}},n("2017"),n("86ac"),n("2877"));a=Object(a.a)(r,(function(){var e=this,t=e.$createElement;t=e._self._c||t;return t("div",{staticClass:"login-container"},[t("div",{staticClass:"login-form-main"},[t("img",{attrs:{src:n("a56b"),alt:""}}),e._m(0),t("el-form",{ref:"loginForm",staticClass:"login-form",attrs:{model:e.loginForm,rules:e.loginRules,autocomplete:"on","label-position":"left"}},[t("div",{staticClass:"title-container"},[t("h3",{staticClass:"title"},[e._v(" 采销平台结算系统"),t("span",[e._v(e._s(e.ver))])])]),t("el-form-item",{attrs:{prop:"username"}},[t("span",{staticClass:"svg-container"},[t("i",{staticClass:"el-icon-user"})]),t("el-input",{ref:"username",attrs:{placeholder:"手机号",name:"username",type:"text",tabindex:"1",autocomplete:"on"},model:{value:e.loginForm.username,callback:function(t){e.$set(e.loginForm,"username",t)},expression:"loginForm.username"}})],1),t("el-tooltip",{attrs:{content:"Caps lock is On",placement:"right",manual:""},model:{value:e.capsTooltip,callback:function(t){e.capsTooltip=t},expression:"capsTooltip"}},[t("el-form-item",{attrs:{prop:"password"}},[t("span",{staticClass:"svg-container"},[t("i",{staticClass:"el-icon-unlock"})]),t("el-input",{key:e.passwordType,ref:"password",attrs:{type:e.passwordType,placeholder:"密码",name:"password",tabindex:"2",autocomplete:"on"},on:{blur:function(t){e.capsTooltip=!1}},nativeOn:{keyup:[function(t){return e.checkCapslock(t)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleLogin(t)}]},model:{value:e.loginForm.password,callback:function(t){e.$set(e.loginForm,"password",t)},expression:"loginForm.password"}}),t("span",{staticClass:"show-pwd",on:{click:e.showPwd}},[t("svg-icon",{attrs:{"icon-class":"password"===e.passwordType?"eye":"eye-open"}})],1)],1)],1),t("el-button",{staticStyle:{width:"100%","margin-top":"5px"},attrs:{loading:e.loading,disabled:e.loading,type:"primary"},nativeOn:{click:function(t){return t.preventDefault(),e.handleLogin()}}},[e._v("登 录")]),t("div",{staticStyle:{position:"relative",padding:"12px 0 0 0"}},[t("div",{staticClass:"tips",staticStyle:{float:"left"}},[t("el-popover",{attrs:{placement:"top",title:"初始密码:",width:"200",trigger:"click",content:"dingding123"}},[t("i",{staticClass:"el-icon-info",attrs:{slot:"reference"},slot:"reference"})])],1),t("router-link",{attrs:{to:"/forget-password"}},[t("div",{staticClass:"tips",staticStyle:{float:"right"}},[t("span",[e._v("忘记密码")])])])],1)],1)],1),e._m(1)])}),[function(){var e=this.$createElement;e=this._self._c||e;return e("div",{staticClass:"main-title"},[e("h1",[this._v("欢迎登录")]),e("h3",[this._v("采销平台结算系统")])])},function(){var e=this.$createElement;e=this._self._c||e;return e("div",{staticClass:"beian"},[e("span",[this._v("万宇恒通")]),e("a",{attrs:{target:"_blank",href:"https://beian.miit.gov.cn/"}},[this._v("京ICP备2020033956号-1")]),e("span")])}],!1,null,"92933c18",null);t.default=a.exports},a56b:function(e,t,n){e.exports=n.p+"static/img/loginlan.1ecbd4ab.png"},b70f:function(e,t,n){},cafe:function(e,t,n){}}]);