{"remainingRequest":"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\\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":["\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",{"version":3,"sources":["login.vue"],"names":[],"mappings":";AAuDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"login.vue","sourceRoot":"src/views/pages","sourcesContent":["\r\n \r\n
\r\n
\r\n \r\n \r\n
{{ $t('login.title') }}
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n {{ $t('login.title') }}\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n\r\n\r\n"]}]}