1
0
mirror of https://github.com/PanJiaChen/electron-vue-admin.git synced 2025-04-05 05:32:44 +08:00
2017-07-14 16:08:15 +08:00

1 line
3.7 KiB
JavaScript

webpackJsonp([1],{141:function(t,o,n){n(162);var i=n(2)(n(148),n(158),null,null);t.exports=i.exports},145:function(t,o,n){"use strict";function i(t){return/^[a-z0-9](?:[-_.+]?[a-z0-9]+)*@wallstreetcn\.com$/i.test(t.trim())}o.a=i},148:function(t,o,n){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var i=n(145);o.default={name:"login",data:function(){return{loginForm:{email:"admin@wallstreetcn.com",password:"111111"},loginRules:{email:[{required:!0,trigger:"blur",validator:function(t,o,e){n.i(i.a)(o)?e():e(new Error("请输入正确的合法邮箱"))}}],password:[{required:!0,trigger:"blur",validator:function(t,o,n){o.length<6?n(new Error("密码不能小于6位")):n()}}]},loading:!1}},methods:{handleLogin:function(){var t=this;this.$refs.loginForm.validate(function(o){if(!o)return console.log("error submit!!"),!1;t.loading=!0,t.$store.dispatch("Login",t.loginForm).then(function(){t.loading=!1,t.$router.push({path:"/"})}).catch(function(){t.loading=!1})})}}}},152:function(t,o,n){o=t.exports=n(3)(),o.push([t.i,".tips{font-size:14px;color:#fff;margin-bottom:5px}.login-container{position:relative;width:100%;height:100%;height:100vh;background-color:#2d3a4b}.login-container input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px #293444 inset!important;-webkit-text-fill-color:#fff!important}.login-container input{background:transparent;border:0;-webkit-appearance:none;border-radius:0;padding:12px 5px 12px 15px;color:#eee;height:47px}.login-container .el-input{display:inline-block;height:47px;width:85%}.login-container .svg-container{padding:6px 5px 6px 15px;color:#889aa4}.login-container .title{font-size:26px;font-weight:400;color:#eee;margin:0 auto 40px;text-align:center;font-weight:700}.login-container .login-form{position:absolute;left:0;right:0;width:400px;padding:35px 35px 15px;margin:120px auto}.login-container .el-form-item{border:1px solid hsla(0,0%,100%,.1);background:rgba(0,0,0,.1);border-radius:5px;color:#454545}.login-container .forget-pwd{color:#fff}",""])},158:function(t,o){t.exports={render:function(){var t=this,o=t.$createElement,n=t._self._c||o;return n("div",{staticClass:"login-container"},[n("el-form",{ref:"loginForm",staticClass:"card-box login-form",attrs:{autoComplete:"on",model:t.loginForm,rules:t.loginRules,"label-position":"left","label-width":"0px"}},[n("h3",{staticClass:"title"},[t._v("系统登录")]),t._v(" "),n("el-form-item",{attrs:{prop:"email"}},[n("span",{staticClass:"svg-container"},[n("icon-svg",{attrs:{"icon-class":"jiedianyoujian"}})],1),t._v(" "),n("el-input",{attrs:{name:"email",type:"text",autoComplete:"on",placeholder:"邮箱"},model:{value:t.loginForm.email,callback:function(o){t.loginForm.email=o},expression:"loginForm.email"}})],1),t._v(" "),n("el-form-item",{attrs:{prop:"password"}},[n("span",{staticClass:"svg-container"},[n("icon-svg",{attrs:{"icon-class":"mima"}})],1),t._v(" "),n("el-input",{attrs:{name:"password",type:"password",autoComplete:"on",placeholder:"密码"},nativeOn:{keyup:function(o){if(!("button"in o)&&t._k(o.keyCode,"enter",13))return null;t.handleLogin(o)}},model:{value:t.loginForm.password,callback:function(o){t.loginForm.password=o},expression:"loginForm.password"}})],1),t._v(" "),n("el-form-item",[n("el-button",{staticStyle:{width:"100%"},attrs:{type:"primary",loading:t.loading},nativeOn:{click:function(o){o.preventDefault(),t.handleLogin(o)}}},[t._v("\n 登录\n ")])],1),t._v(" "),n("div",{staticClass:"tips"},[t._v("admin账号为:admin@wallstreetcn.com 密码随便填")]),t._v(" "),n("div",{staticClass:"tips"},[t._v("editor账号:editor@wallstreetcn.com 密码随便填")])],1)],1)},staticRenderFns:[]}},162:function(t,o,n){var i=n(152);"string"==typeof i&&(i=[[t.i,i,""]]),n(4)(i,{}),i.locals&&(t.exports=i.locals)}});