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 line
3.9 KiB
1 line
3.9 KiB
|
3 months ago
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2b812ece"],{"1b5a":function(e,t,o){"use strict";o("3adf")},"3adf":function(e,t,o){},"68d8":function(e,t,o){"use strict";o("d8cb")},"9ed6":function(e,t,o){"use strict";o.r(t);var s=function(){var e=this,t=e.$createElement,o=e._self._c||t;return e.showLogin?o("div",{staticClass:"login-container"},[o("vue-particles",{attrs:{color:"#ffffff",particleOpacity:.7,particlesNumber:80,shapeType:"circle",particleSize:4,linesColor:"#ffffff",linesWidth:1,lineLinked:!0,lineOpacity:.4,linesDistance:150,moveSpeed:3,hoverEffect:!0,hoverMode:"grab",clickEffect:!0,clickMode:"push"}}),o("el-form",{ref:"loginForm",staticClass:"login-form",attrs:{model:e.loginForm,rules:e.loginRules,"auto-complete":"on","label-position":"left"}},[o("div",{staticClass:"title-container"},[o("h3",{staticClass:"title"},[e._v(e._s(e.title))])]),o("el-form-item",{attrs:{prop:"username"}},[o("span",{staticClass:"svg-container"},[o("svg-icon",{attrs:{"icon-class":"user"}})],1),o("el-input",{ref:"username",attrs:{placeholder:"请输入登录名",name:"username",type:"text",tabindex:"1","auto-complete":"on"},model:{value:e.loginForm.username,callback:function(t){e.$set(e.loginForm,"username",t)},expression:"loginForm.username"}})],1),o("el-form-item",{attrs:{prop:"password"}},[o("span",{staticClass:"svg-container"},[o("svg-icon",{attrs:{"icon-class":"password"}})],1),o("el-input",{key:e.passwordType,ref:"password",attrs:{type:e.passwordType,placeholder:"请输入密码",name:"password",tabindex:"2","auto-complete":"on"},nativeOn:{keyup: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"}}),o("span",{staticClass:"show-pwd",on:{click:e.showPwd}},[o("svg-icon",{attrs:{"icon-class":"password"===e.passwordType?"eye":"eye-open"}})],1)],1),o("el-button",{staticStyle:{width:"100%","margin-bottom":"30px"},attrs:{loading:e.loading,type:"primary"},nativeOn:{click:function(t){return t.preventDefault(),e.handleLogin(t)}}},[e._v("登录")])],1)],1):e._e()},n=[],r=o("61f7"),i=o("83d6"),a={name:"Login",data:function(){var e=function(e,t,o){Object(r["b"])(t)?o():o(new Error("请正确输入登录名"))},t=function(e,t,o){t.length<6?o(new Error("密码输入错误")):o()};return{title:"",showLogin:!0,loginForm:{username:"",password:""},loginRules:{username:[{required:!0,trigger:"blur",validator:e}],password:[{required:!0,trigger:"blur",validator:t}]},loading:!1,passwordType:"password",redirect:void 0}},watch:{$route:{handler:function(e){this.redirect=e.query&&e.query.redirect},immediate:!0}},created:function(){var e=this;this.title=i.title;var t=this.$route.query;console.log("query_created",t),t.oss_token?this.showLogin=!1:this.showLogin=!0,t.oss_token&&(this.loading=!0,this.$store.dispatch("user/loginskip",{oss_token:t.oss_token,tp:""}).then((function(){e.$router.push({path:"/"}),e.loading=!1})).catch((function(t){console.log(t),e.loading=!1})))},methods:{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 console.log("error submit!!"),!1;e.loading=!0,e.$store.dispatch("user/login",e.loginForm).then((function(){e.$router.push({path:e.redirect||"/"}),e.loading=!1})).catch((function(){e.loading=!1}))}))}}},l=a,c=(o("68d8"),o("1b5a"),o("2877")),u=Object(c["a"])(l,s,n,!1,null,"109ccff7",null);t["default"]=u.exports},d8cb:function(e,t,o){e.exports={menuText:"#000",menuActiveText:"#0082ca",subMenuActiveText:"#0082ca",menuBg:"rgba(255,255,255,0)",menuHover:"rgba(242,242,242,.4)",menuActiveBg:"rgba(242,242,242,.4)",submenuActiveBg:"rgba(242,242,242,.4)",subMenuHover:"rgba(242,242,242,.4)",sideBarWidth:"210px",primaryColor:"#0082ca"}}}]);
|