webpackJsonp([21],{"6Qob":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=i("mvHQ"),n=i.n(s),o=i("5reh"),a=i("zL8q");function r(t){return t?(a.Message.warning(t),!1):(a.Message.warning("操作失败"),!1)}function l(t){return"cancel"==t?(a.Message.info(t||"cancel"),!1):!!t.hasOwnProperty("response")&&(401==t.response.status?(a.Message.error("登录过期"),!1):500==t.response.status?(a.Message.error("服务器错误500"),!1):void 0)}var c=i("mw3O"),u={name:"login",data:function(){return{redirect:this.$route.query.redirect,token:"",form:{loginName:"HAZZYS",password:"EA48576F30BE1669971699C09AD05C94",eid:"ff8080816494494b0164a76b553a00e5"}}},computed:{imgHeight:function(){return document.body.clientHeight},imgWidth:function(){return document.body.clientWidth}},methods:{loginAnimate:function(){new LoginAnimate(loginwrap,{length:90,LineWeight:.1,clicked:!0,moveon:!0}).Run()},submitLogin:function(){var t=this;this.axios.post("/api-auth/do-login",c.stringify({loginName:this.form.loginName,password:this.form.password,eid:"ff8080816494494b0164a76b553a00e5"})).then(function(e){if(e.data.success){(s=e.data.message)?a.Message.success(s):a.Message.success("操作成功");var i=decodeURIComponent(t.$route.query.redirect||"/index");t.$router.push({path:i})}else r(e.data.message);var s}).catch(function(t){l(t)})},getMenu:function(){var t=this;this.axios.get("/gic/get-menu").then(function(e){if(e.data.success){t.menuList=e.data.list,sessionStorage.setItem("menuList",n()(t.menuList));var i=t.$route.query.redirect||"/index";t.$router.push({path:i})}else r(e.data.errorMessage)}).catch(function(t){l(t)})}},mounted:function(){this.$store.commit(o.d,"login"),document.title=this.$store.state.title,this.loginAnimate()}},m={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"loginwrap",style:{height:t.imgHeight+"px"}},[i("div",{staticStyle:{position:"absolute",left:"0",height:"0",width:"100%"}},[i("canvas",{attrs:{id:"loginwrap",width:t.imgWidth,height:t.imgHeight}})]),t._v(" "),t._m(0),t._v(" "),i("div",{staticClass:"login_contetnt"},[i("h3",{staticClass:"login-top"},[t._v("让信息连接一切")]),t._v(" "),i("h4",{staticClass:"login-bottom"},[t._v("GIC商户后台")]),t._v(" "),i("div",{staticClass:"formlogin"},[i("el-form",{ref:"form",attrs:{model:t.form,"label-width":""}},[i("el-form-item",{attrs:{label:""}},[i("el-input",{staticClass:"forminput",attrs:{placeholder:"账号"},model:{value:t.form.loginName,callback:function(e){t.$set(t.form,"loginName",e)},expression:"form.loginName"}})],1),t._v(" "),i("el-form-item",{attrs:{label:""}},[i("el-input",{attrs:{type:"password",placeholder:"密码"},nativeOn:{keyup:function(e){if(!("button"in e)&&t._k(e.keyCode,"enter",13,e.key))return null;t.submitLogin("form")}},model:{value:t.form.password,callback:function(e){t.$set(t.form,"password",e)},expression:"form.password"}})],1),t._v(" "),i("el-form-item",[i("button",{staticClass:"submit",on:{click:function(e){e.preventDefault(),t.submitLogin("form")}}},[t._v("立即登录")])])],1)],1)])])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"logintop"},[e("div",{staticClass:"fl loginlogo"},[e("a",{staticClass:"fr logo",attrs:{href:"#"}},[this._v("login_logo.png")])]),this._v(" "),e("a",{staticClass:"home-link fr",attrs:{href:"http://www.demogic.com/"}},[this._v("返回首页")])])}]};var f=i("VU/8")(u,m,!1,function(t){i("i8uS")},null,null);e.default=f.exports},i8uS:function(t,e){}});