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