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.2 KiB
1 line
3.2 KiB
11 months ago
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["passport"],{"008a":function(t,e,s){"use strict";s("7e18")},"7e18":function(t,e,s){},"9b19":function(t,e,s){t.exports=s.p+"assets/logo.b24c6fbc.svg"},cedc:function(t,e,s){"use strict";s.r(e);var r=function(){var t=this,e=t._self._c;return e("div",{staticClass:"main"},[t._m(0),e("a-form",{ref:"formLogin",staticClass:"user-layout-login",attrs:{id:"formLogin",form:t.form},on:{submit:t.handleSubmit}},[t.isLoginError?e("a-alert",{attrs:{type:"error",showIcon:"",message:t.loginErrorMsg}}):t._e(),e("a-form-item",[e("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["username",{rules:[{required:!0,message:"您还没有输入用户名"}],validateTrigger:"change"}],expression:"[\n 'username',\n { rules: [{ required: true, message: '您还没有输入用户名' }], validateTrigger: 'change'}\n ]"}],staticClass:"login-input",attrs:{size:"large",type:"text",placeholder:"请输入用户名"}},[e("a-icon",{style:{color:"rgba(0,0,0,.25)"},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:"您还没有输入用户密码"}],validateTrigger:"blur"}],expression:"[\n 'password',\n { rules: [{ required: true, message: '您还没有输入用户密码' }], validateTrigger: 'blur'}\n ]"}],staticClass:"login-input",attrs:{size:"large",type:"password",autocomplete:"false",placeholder:"请输入用户密码"}},[e("a-icon",{style:{color:"rgba(0,0,0,.25)"},attrs:{slot:"prefix",type:"lock"},slot:"prefix"})],1)],1),e("a-form-item",{staticStyle:{"margin-top":"24px"}},[e("a-button",{staticClass:"login-button",attrs:{size:"large",type:"primary",htmlType:"submit",loading:t.state.loginBtn,disabled:t.state.loginBtn}},[t._v("确定")])],1)],1)],1)},i=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"header"},[e("div",{staticClass:"logo"},[e("img",{staticClass:"logo",attrs:{src:s("9b19"),alt:"logo"}})]),e("p",{staticClass:"title"},[t._v("商城系统登录")])])}],a=s("5530"),o=(s("d3b7"),s("2f62")),n=s("ca00"),l={data:function(){return{isLoginError:!1,loginErrorMsg:"登录失败",form:this.$form.createForm(this),state:{loginBtn:!1}}},created:function(){},methods:Object(a["a"])(Object(a["a"])({},Object(o["b"])(["Login"])),{},{handleSubmit:function(t){var e=this;t.preventDefault();var s=this.form.validateFields,r=this.state,i=this.Login;r.loginBtn=!0,s(["username","password"],{force:!0},(function(t,s){if(t)setTimeout((function(){r.loginBtn=!1}),100);else{var o=Object(a["a"])({},s);i(o).then((function(t){return e.loginSuccess(t)})).catch((function(t){return e.loginFailed(t)})).finally((function(){r.loginBtn=!1}))}}))},loginSuccess:function(t){var e=this;this.isLoginError=!1,this.$message.success(t.message,1.5),setTimeout((function(){e.$router.push({path:"/"}),e.$notification.success({message:"欢迎",description:"".concat(Object(n["i"])(),",欢迎回来")})}),1e3)},loginFailed:function(t){this.isLoginError=!0,this.loginErrorMsg=t.message}})},c=l,u=(s("008a"),s("2877")),g=Object(u["a"])(c,r,i,!1,null,"5fe7cf6e",null);e["default"]=g.exports}}]);
|