1 line
4.1 KiB
JavaScript
1 line
4.1 KiB
JavaScript
webpackJsonp([4],{FUCY:function(n,t,e){n.exports=e.p+"static/img/12.07c5158.png"},KEXa:function(n,t,e){var a=e("jJrr");"string"==typeof a&&(a=[[n.i,a,""]]),a.locals&&(n.exports=a.locals);e("rjj0")("7354be3a",a,!0)},jJrr:function(n,t,e){(n.exports=e("FZ+f")(!1)).push([n.i,'\n.site-wrapper.site-page--login {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background-color: rgba(38, 50, 56, 0.1);\n overflow: hidden;\n}\n.site-wrapper.site-page--login:before {\n position: fixed;\n top: 0;\n left: 0;\n z-index: -1;\n width: 100%;\n height: 100%;\n content: "";\n background-image: url('+e("FUCY")+");\n background-size: cover;\n}\n.site-wrapper.site-page--login .site-content__wrapper {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n padding: 0;\n margin: 0;\n overflow-x: hidden;\n overflow-y: auto;\n background-color: transparent;\n}\n.site-wrapper.site-page--login .site-content {\n min-height: 100%;\n padding: 30px 500px 30px 30px;\n}\n.site-wrapper.site-page--login .brand-info {\n margin: 220px 100px 0 90px;\n color: #fff;\n}\n.site-wrapper.site-page--login .brand-info__text {\n margin: 0 0 22px 0;\n font-size: 48px;\n font-weight: 400;\n text-transform: uppercase;\n}\n.site-wrapper.site-page--login .brand-info__intro {\n margin: 10px 0;\n font-size: 16px;\n line-height: 1.58;\n opacity: 0.6;\n}\n.site-wrapper.site-page--login .login-main {\n position: absolute;\n top: 0;\n right: 0;\n padding: 150px 60px 180px;\n width: 470px;\n min-height: 100%;\n background-color: #fff;\n}\n.site-wrapper.site-page--login .login-title {\n font-size: 16px;\n}\n.site-wrapper.site-page--login .login-captcha {\n overflow: hidden;\n}\n.site-wrapper.site-page--login .login-captcha > img {\n width: 100%;\n cursor: pointer;\n}\n.site-wrapper.site-page--login .login-btn-submit {\n width: 100%;\n margin-top: 38px;\n}\n",""])},wQTO:function(n,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={render:function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("div",{staticClass:"site-wrapper site-page--login"},[e("div",{staticClass:"site-content__wrapper"},[e("div",{staticClass:"site-content"},[n._m(0),n._v(" "),e("div",{staticClass:"login-main"},[e("h3",{staticClass:"login-title"},[n._v("管理员登录")]),n._v(" "),e("el-form",{ref:"dataForm",attrs:{model:n.dataForm,rules:n.dataRule,"status-icon":""},nativeOn:{keyup:function(t){if(!("button"in t)&&n._k(t.keyCode,"enter",13,t.key,"Enter"))return null;n.dataFormSubmit()}}},[e("el-form-item",{attrs:{prop:"username"}},[e("el-input",{attrs:{placeholder:"帐号"},model:{value:n.dataForm.username,callback:function(t){n.$set(n.dataForm,"username",t)},expression:"dataForm.username"}})],1),n._v(" "),e("el-form-item",{attrs:{prop:"password"}},[e("el-input",{attrs:{type:"password",placeholder:"密码"},model:{value:n.dataForm.password,callback:function(t){n.$set(n.dataForm,"password",t)},expression:"dataForm.password"}})],1),n._v(" "),e("el-form-item",[e("el-button",{staticClass:"login-btn-submit",attrs:{type:"primary"},on:{click:function(t){n.dataFormSubmit()}}},[n._v("登录")])],1)],1)],1)])])])},staticRenderFns:[function(){var n=this.$createElement,t=this._self._c||n;return t("div",{staticClass:"brand-info"},[t("h2",{staticClass:"brand-info__text"},[this._v("MT-IG-B-1.5 "),t("br"),this._v("智能网关")])])}]};var r=e("VU/8")({data:function(){return{dataForm:{username:"admin",password:"admin"},dataRule:{username:[{required:!0,message:"帐号不能为空",trigger:"blur"}],password:[{required:!0,message:"密码不能为空",trigger:"blur"}]}}},created:function(){},methods:{dataFormSubmit:function(){var n=this;this.$refs.dataForm.validate(function(t){if(t){var e={password:n.dataForm.password,userName:n.dataForm.username};n.$http({url:n.$http.adornUrl("api/server/user/login"),method:"post",data:e}).then(function(t){var e=t.data;e&&0===e.code?(n.$cookie.set("token",e.token),n.$router.replace({name:"home"})):n.$message.error(e.msg)})}})}}},a,!1,function(n){e("KEXa")},null,null);t.default=r.exports}}); |