webpackJsonp([2],{"7Otq":function(t,e,r){t.exports=r.p+"static/img/logo.1e6719b.png"},AA1p:function(t,e){},vdVF:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=r("VkeE"),o={data:function(){return{form:{user:"",password:""},rules:{user:[{required:!0,message:"账号不能为空",trigger:"blur"}],password:[{required:!0,message:"密码不能为空",trigger:"blur"}]},loginLoading:!1}},created:function(){},methods:{handleSubmit:function(){var t=this;if(""===this.form.user||""===this.form.password)return console.log("error submit!"),!1;this.loginLoading=!0,this.$api.post(s.g,{user:this.form.user,password:this.form.password}).then(function(e){console.log("res_token",e.data),sessionStorage.setItem("token",e.data),setTimeout(function(){t.$router.push("/SPDAS/domain")},1e3)}).catch(function(e){t.$Message.error("登录失败!"),t.loginLoading=!1})}}},n={render:function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"login pull-height"},[t._m(0),t._v(" "),r("div",{staticClass:"login-con"},[r("h2",[t._v("登录语义数据分析平台")]),t._v(" "),r("div",{staticClass:"form-con"},[r("i-form",{ref:"loginForm",attrs:{autocomplete:"on",model:t.form,rules:t.rules}},[r("FormItem",{attrs:{prop:"user"}},[r("Input",{attrs:{placeholder:"请输入用户名"},model:{value:t.form.user,callback:function(e){t.$set(t.form,"user",e)},expression:"form.user"}},[r("span",{attrs:{slot:"prepend"},slot:"prepend"},[r("Icon",{attrs:{size:16,type:"ios-person"}})],1)])],1),t._v(" "),r("FormItem",{attrs:{prop:"password"}},[r("Input",{attrs:{type:"password",placeholder:"请输入密码"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleSubmit(e)}},model:{value:t.form.password,callback:function(e){t.$set(t.form,"password",e)},expression:"form.password"}},[r("span",{attrs:{slot:"prepend"},slot:"prepend"},[r("Icon",{attrs:{size:14,type:"md-lock"}})],1)])],1),t._v(" "),r("FormItem",[r("Button",{attrs:{type:"primary",long:"",loading:t.loginLoading},on:{click:function(e){return t.handleSubmit("form")}}},[t._v("登录")])],1)],1)],1)])])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"login-info text-white animated fadeInLeft"},[e("div",{staticClass:"logo"},[e("img",{staticStyle:{"vertical-align":"middle"},attrs:{src:r("7Otq"),width:"300px",height:"78px",alt:"logo"}})])])}]};var i=r("VU/8")(o,n,!1,function(t){r("AA1p")},null,null);e.default=i.exports}});