后端

3.js 7.8KB

    webpackJsonp([3],{ /***/ "Adnh": /***/ (function(module, exports, __webpack_require__) { exports = module.exports = __webpack_require__("WpAN")(false); // imports // module exports.push([module.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.6);\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(" + __webpack_require__("npKG") + ");\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}\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: .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", ""]); // exports /***/ }), /***/ "T+/8": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); // EXTERNAL MODULE: ./src/api/index.js + 3 modules var api = __webpack_require__("gyMJ"); // CONCATENATED MODULE: ./node_modules/.7.1.1@babel-loader/lib!./node_modules/.13.3.0@vue-loader/lib/selector.js?type=script&index=0!./src/views/login/index.vue // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* harmony default export */ var login = ({ data: function data() { return { loginForm: { userName: '', password: '', captcha: '' }, loginRules: { userName: [{ required: true, message: '请输入帐号', trigger: 'blur' }], password: [{ required: true, message: '请输入密码', trigger: 'blur' }], captcha: [{ required: true, message: '请输入验证码', trigger: 'blur' }] }, captchaPath: '' }; }, created: function created() { this.updateCaptchaHandle(); }, methods: { // 提交表单 submitHandle: function submitHandle() { var _this = this; this.$refs['loginForm'].validate(function (valid) { if (valid) { var params = { 'username': _this.loginForm.userName, 'password': _this.loginForm.password, 'captcha': _this.loginForm.captcha }; api["k" /* login */](params).then(function (_ref) { var data = _ref.data; if (data && data.code === 0) { _this.$router.push({ name: 'home' }); } else { _this.$message.error(data.msg); } }); } }); }, // 更新验证码 updateCaptchaHandle: function updateCaptchaHandle() { this.captchaPath = window.SITE_CONFIG.apiPath + '/captcha.jpg?t=' + new Date().getTime(); } } }); // CONCATENATED MODULE: ./node_modules/.13.3.0@vue-loader/lib/template-compiler?{"id":"data-v-274726ed","hasScoped":false,"transformToRequire":{"video":["src","poster"],"source":"src","img":"src","image":"xlink:href"},"buble":{"transforms":{}}}!./node_modules/.13.3.0@vue-loader/lib/selector.js?type=template&index=0!./src/views/login/index.vue var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"site-wrapper site-page--login"},[_c('div',{staticClass:"site-content__wrapper"},[_c('div',{staticClass:"site-content"},[_vm._m(0),_vm._v(" "),_c('div',{staticClass:"login-main"},[_c('h3',{staticClass:"login-title"},[_vm._v("管理员登录")]),_vm._v(" "),_c('el-form',{ref:"loginForm",attrs:{"model":_vm.loginForm,"rules":_vm.loginRules,"status-icon":""},nativeOn:{"keyup":function($event){if(!('button' in $event)&&_vm._k($event.keyCode,"enter",13,$event.key)){ return null; }_vm.submitHandle()}}},[_c('el-form-item',{attrs:{"prop":"userName"}},[_c('el-input',{attrs:{"placeholder":"帐号"},model:{value:(_vm.loginForm.userName),callback:function ($$v) {_vm.$set(_vm.loginForm, "userName", $$v)},expression:"loginForm.userName"}})],1),_vm._v(" "),_c('el-form-item',{attrs:{"prop":"password"}},[_c('el-input',{attrs:{"type":"password","placeholder":"密码"},model:{value:(_vm.loginForm.password),callback:function ($$v) {_vm.$set(_vm.loginForm, "password", $$v)},expression:"loginForm.password"}})],1),_vm._v(" "),_c('el-form-item',{attrs:{"prop":"captcha"}},[_c('el-row',{attrs:{"gutter":20}},[_c('el-col',{attrs:{"span":14}},[_c('el-input',{attrs:{"placeholder":"验证码"},model:{value:(_vm.loginForm.captcha),callback:function ($$v) {_vm.$set(_vm.loginForm, "captcha", $$v)},expression:"loginForm.captcha"}})],1),_vm._v(" "),_c('el-col',{staticClass:"login-captcha",attrs:{"span":10}},[_c('img',{attrs:{"src":_vm.captchaPath,"alt":""},on:{"click":function($event){_vm.updateCaptchaHandle()}}})])],1)],1),_vm._v(" "),_c('el-form-item',[_c('el-button',{staticClass:"login-btn-submit",attrs:{"type":"primary"},on:{"click":function($event){_vm.submitHandle()}}},[_vm._v("登录")])],1)],1)],1)])])])} var staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"brand-info"},[_c('h2',{staticClass:"brand-info__text"},[_vm._v("Vue-cli-basic")]),_vm._v(" "),_c('p',{staticClass:"brand-info__intro"},[_vm._v("基于Vue.js 2.0+生态圈,构建一套常用/基础的代码结构规范。通过实现人人开源renren-security轻量级权限管理系统,验证可行性!")])])}] var esExports = { render: render, staticRenderFns: staticRenderFns } /* harmony default export */ var views_login = (esExports); // CONCATENATED MODULE: ./src/views/login/index.vue function injectStyle (ssrContext) { __webpack_require__("aUUz") } var normalizeComponent = __webpack_require__("mPyB") /* script */ /* template */ /* template functional */ var __vue_template_functional__ = false /* styles */ var __vue_styles__ = injectStyle /* scopeId */ var __vue_scopeId__ = null /* moduleIdentifier (server only) */ var __vue_module_identifier__ = null var Component = normalizeComponent( login, views_login, __vue_template_functional__, __vue_styles__, __vue_scopeId__, __vue_module_identifier__ ) /* harmony default export */ var src_views_login = __webpack_exports__["default"] = (Component.exports); /***/ }), /***/ "aUUz": /***/ (function(module, exports, __webpack_require__) { // style-loader: Adds some css to the DOM by adding a <style> tag // load the styles var content = __webpack_require__("Adnh"); if(typeof content === 'string') content = [[module.i, content, '']]; if(content.locals) module.exports = content.locals; // add the styles to the DOM var update = __webpack_require__("wkH5")("691f3759", content, true); /***/ }), /***/ "npKG": /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__.p + "static/img/login_bg.144e19d.jpg"; /***/ }) });