(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0b6e8a"],{"1ebb":function(e,t,o){"use strict";o.r(t);var r=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"app-container"},[o("el-form",{ref:"loginForm",staticClass:"center-form",attrs:{model:e.loginForm,rules:e.loginRules,"auto-complete":"on"},nativeOn:{submit:function(e){e.preventDefault()}}},[o("div",{staticClass:"title-container"},[o("h3",{staticClass:"title"},[e._v("开放平台登录")])]),e._v(" "),o("el-form-item",{attrs:{prop:"username"}},[o("el-input",{attrs:{placeholder:"登录邮箱","prefix-icon":"el-icon-user","auto-complete":"on"},model:{value:e.loginForm.username,callback:function(t){e.$set(e.loginForm,"username",t)},expression:"loginForm.username"}})],1),e._v(" "),o("el-form-item",{attrs:{prop:"password"}},[o("el-input",{attrs:{type:"password",placeholder:"登录密码","prefix-icon":"el-icon-lock","auto-complete":"on"},model:{value:e.loginForm.password,callback:function(t){e.$set(e.loginForm,"password",t)},expression:"loginForm.password"}})],1),e._v(" "),o("el-button",{staticStyle:{width:"100%"},attrs:{loading:e.loading,type:"primary","native-type":"submit"},on:{click:e.handleLogin}},[e._v("登 录")]),e._v(" "),o("div",{staticClass:"footer"},[o("el-link",{attrs:{type:"primary",underline:!1},on:{click:e.onReg}},[e._v("注册新账号")])],1)],1)],1)},n=[],i=o("8237"),s=o.n(i),a=o("5f87"),l={name:"Login",data:function(){var e=function(e,t,o){0===t.length?o(new Error("请输入登录邮箱")):o()},t=function(e,t,o){0===t.length?o(new Error("请输入密码")):o()};return{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(){Object(a["b"])()},methods:{onReg:function(){this.$router.push({path:"/isvReg"})},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){t&&e.doSubmit()}))},onCaptchaSuccess:function(e){this.doSubmit((function(t){t.captcha=e}))},doSubmit:function(e){var t=this.loginForm,o=t.password;o=s()(o);var r={username:t.username,password:o};e&&e.call(this,r),this.post("/portal/common/login",r,(function(e){var t=e.data;this.setUserType("2"),Object(a["c"])(t.token),this.goRoute(this.redirect||"/dashboard")}))},useVerify:function(){this.$refs.verify.show()}}},c=l,u=o("2877"),d=Object(u["a"])(c,r,n,!1,null,null,null);t["default"]=d.exports}}]);