| 1 |
- {"remainingRequest":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\babel-loader\\lib\\index.js!D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\HTC\\program\\善行少年\\security-enterprise-admin\\src\\views\\pages\\login.vue?vue&type=script&lang=js","dependencies":[{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\src\\views\\pages\\login.vue","mtime":1760164952963},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\babel.config.js","mtime":1581948662000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.regexp.replace\";\nimport Cookies from 'js-cookie';\nimport debounce from 'lodash/debounce';\nimport { messages } from '@/i18n';\nimport { getUUID } from '@/utils';\nexport default {\n data: function data() {\n return {\n i18nMessages: messages,\n captchaPath: '',\n dataForm: {\n username: '',\n password: '',\n uuid: '',\n captcha: ''\n }\n };\n },\n computed: {\n dataRule: function dataRule() {\n return {\n username: [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }],\n password: [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }],\n captcha: [{\n required: true,\n message: this.$t('validate.required'),\n trigger: 'blur'\n }]\n };\n }\n },\n created: function created() {\n this.getCaptcha();\n },\n methods: {\n // 获取验证码\n getCaptcha: function getCaptcha() {\n this.dataForm.uuid = getUUID();\n this.captchaPath = \"\".concat(window.SITE_CONFIG['apiURL'], \"/captcha?uuid=\").concat(this.dataForm.uuid);\n },\n // 表单提交\n dataFormSubmitHandle: debounce(function () {\n var _this = this;\n this.$refs['dataForm'].validate(function (valid) {\n if (!valid) {\n return false;\n }\n _this.$http.post('/login', _this.dataForm).then(function (_ref) {\n var res = _ref.data;\n if (res.code !== 0) {\n _this.getCaptcha();\n return _this.$message.error(res.msg);\n }\n Cookies.set('token', res.data.token);\n _this.$router.replace({\n name: 'home'\n });\n }).catch(function () {});\n });\n }, 1000, {\n 'leading': true,\n 'trailing': false\n })\n }\n};",{"version":3,"names":["Cookies","debounce","messages","getUUID","data","i18nMessages","captchaPath","dataForm","username","password","uuid","captcha","computed","dataRule","required","message","$t","trigger","created","getCaptcha","methods","concat","window","SITE_CONFIG","dataFormSubmitHandle","_this","$refs","validate","valid","$http","post","then","_ref","res","code","$message","error","msg","set","token","$router","replace","name","catch"],"sources":["src/views/pages/login.vue"],"sourcesContent":["<template>\r\n <div class=\"aui-wrapper aui-page__login\">\r\n <div class=\"aui-content__wrapper\">\r\n <main class=\"aui-content\">\r\n <div class=\"login-header\">\r\n <h2 class=\"login-brand\">{{ $t('brand.lg') }}</h2>\r\n </div>\r\n <div class=\"login-body\">\r\n <h3 class=\"login-title\">{{ $t('login.title') }}</h3>\r\n <el-form :model=\"dataForm\" :rules=\"dataRule\" ref=\"dataForm\" @keyup.enter.native=\"dataFormSubmitHandle()\" status-icon>\r\n <el-form-item prop=\"username\">\r\n <el-input v-model=\"dataForm.username\" :placeholder=\"$t('login.username')\">\r\n <span slot=\"prefix\" class=\"el-input__icon\">\r\n <svg class=\"icon-svg\" aria-hidden=\"true\"><use xlink:href=\"#icon-user\"></use></svg>\r\n </span>\r\n </el-input>\r\n </el-form-item>\r\n <el-form-item prop=\"password\">\r\n <el-input v-model=\"dataForm.password\" type=\"password\" :placeholder=\"$t('login.password')\">\r\n <span slot=\"prefix\" class=\"el-input__icon\">\r\n <svg class=\"icon-svg\" aria-hidden=\"true\"><use xlink:href=\"#icon-lock\"></use></svg>\r\n </span>\r\n </el-input>\r\n </el-form-item>\r\n <el-form-item prop=\"captcha\">\r\n <el-row :gutter=\"20\">\r\n <el-col :span=\"14\">\r\n <el-input v-model=\"dataForm.captcha\" :placeholder=\"$t('login.captcha')\">\r\n <span slot=\"prefix\" class=\"el-input__icon\">\r\n <svg class=\"icon-svg\" aria-hidden=\"true\"><use xlink:href=\"#icon-safetycertificate\"></use></svg>\r\n </span>\r\n </el-input>\r\n </el-col>\r\n <el-col :span=\"10\" class=\"login-captcha\">\r\n <img :src=\"captchaPath\" @click=\"getCaptcha()\">\r\n </el-col>\r\n </el-row>\r\n </el-form-item>\r\n <el-form-item>\r\n <el-button type=\"primary\" @click=\"dataFormSubmitHandle()\" class=\"w-percent-100\">{{ $t('login.title') }}</el-button>\r\n </el-form-item>\r\n </el-form>\r\n </div>\r\n <div class=\"login-footer\">\r\n <p>\r\n <a href=\"https://demo.renren.io/security-enterprise\" target=\"_blank\">{{ $t('login.demo') }}</a>\r\n </p>\r\n <p><a href=\"https://www.renren.io/\" target=\"_blank\">{{ $t('login.copyright') }}</a>2019 © renren.io</p>\r\n </div>\r\n </main>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport Cookies from 'js-cookie'\r\nimport debounce from 'lodash/debounce'\r\nimport { messages } from '@/i18n'\r\nimport { getUUID } from '@/utils'\r\nexport default {\r\n data () {\r\n return {\r\n i18nMessages: messages,\r\n captchaPath: '',\r\n dataForm: {\r\n username: '',\r\n password: '',\r\n uuid: '',\r\n captcha: ''\r\n }\r\n }\r\n },\r\n computed: {\r\n dataRule () {\r\n return {\r\n username: [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ],\r\n password: [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ],\r\n captcha: [\r\n { required: true, message: this.$t('validate.required'), trigger: 'blur' }\r\n ]\r\n }\r\n }\r\n },\r\n created () {\r\n this.getCaptcha()\r\n },\r\n methods: {\r\n // 获取验证码\r\n getCaptcha () {\r\n this.dataForm.uuid = getUUID()\r\n this.captchaPath = `${window.SITE_CONFIG['apiURL']}/captcha?uuid=${this.dataForm.uuid}`\r\n },\r\n // 表单提交\r\n dataFormSubmitHandle: debounce(function () {\r\n this.$refs['dataForm'].validate((valid) => {\r\n if (!valid) {\r\n return false\r\n }\r\n this.$http.post('/login', this.dataForm).then(({ data: res }) => {\r\n if (res.code !== 0) {\r\n this.getCaptcha()\r\n return this.$message.error(res.msg)\r\n }\r\n Cookies.set('token', res.data.token)\r\n this.$router.replace({ name: 'home' })\r\n }).catch(() => {})\r\n })\r\n }, 1000, { 'leading': true, 'trailing': false })\r\n }\r\n}\r\n</script>\r\n"],"mappings":";AAuDA,OAAAA,OAAA;AACA,OAAAC,QAAA;AACA,SAAAC,QAAA;AACA,SAAAC,OAAA;AACA;EACAC,IAAA,WAAAA,KAAA;IACA;MACAC,YAAA,EAAAH,QAAA;MACAI,WAAA;MACAC,QAAA;QACAC,QAAA;QACAC,QAAA;QACAC,IAAA;QACAC,OAAA;MACA;IACA;EACA;EACAC,QAAA;IACAC,QAAA,WAAAA,SAAA;MACA;QACAL,QAAA,GACA;UAAAM,QAAA;UAAAC,OAAA,OAAAC,EAAA;UAAAC,OAAA;QAAA,EACA;QACAR,QAAA,GACA;UAAAK,QAAA;UAAAC,OAAA,OAAAC,EAAA;UAAAC,OAAA;QAAA,EACA;QACAN,OAAA,GACA;UAAAG,QAAA;UAAAC,OAAA,OAAAC,EAAA;UAAAC,OAAA;QAAA;MAEA;IACA;EACA;EACAC,OAAA,WAAAA,QAAA;IACA,KAAAC,UAAA;EACA;EACAC,OAAA;IACA;IACAD,UAAA,WAAAA,WAAA;MACA,KAAAZ,QAAA,CAAAG,IAAA,GAAAP,OAAA;MACA,KAAAG,WAAA,MAAAe,MAAA,CAAAC,MAAA,CAAAC,WAAA,8BAAAF,MAAA,MAAAd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