Files
tekelanew_acs/acs/nladmin-ui/node_modules/.cache/babel-loader/74490fc4c3917f7b9f5acbb45a50168f.json
2024-12-05 09:33:18 +08:00

1 line
5.1 KiB
JSON
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"remainingRequest":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\babel-loader\\lib\\index.js!D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\src\\views\\system\\user\\center\\updateEmail.vue?vue&type=script&lang=js","dependencies":[{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\src\\views\\system\\user\\center\\updateEmail.vue","mtime":1732871026807},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\babel.config.js","mtime":1732871025888},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1732872824662},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\babel-loader\\lib\\index.js","mtime":1732872825017},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1732872824662},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\vue-loader\\lib\\index.js","mtime":1732872825835}],"contextDependencies":[],"result":["\"use strict\";\n\nvar _interopRequireDefault = require(\"D:/data/hanguodoushan/acs2/nladmin-ui/node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _store = _interopRequireDefault(require(\"@/store\"));\nvar _validate = require(\"@/utils/validate\");\nvar _user = require(\"@/views/system/user\");\nvar _code = require(\"@/api/system/code\");\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nvar _default = exports.default = {\n props: {\n email: {\n type: String,\n required: true\n }\n },\n data: function data() {\n var _this2 = this;\n var validMail = function validMail(rule, value, callback) {\n if (value === '' || value === null) {\n callback(new Error('新邮箱不能为空'));\n } else if (value === _this2.email) {\n callback(new Error('新邮箱不能与旧邮箱相同'));\n } else if ((0, _validate.validEmail)(value)) {\n callback();\n } else {\n callback(new Error('邮箱格式错误'));\n }\n };\n return {\n loading: false,\n dialog: false,\n title: '修改邮箱',\n form: {\n pass: '',\n email: '',\n code: ''\n },\n user: {\n email: '',\n password: ''\n },\n codeLoading: false,\n rules: {\n pass: [{\n required: true,\n message: '当前密码不能为空',\n trigger: 'blur'\n }],\n email: [{\n required: true,\n validator: validMail,\n trigger: 'blur'\n }]\n }\n };\n },\n methods: {\n cancel: function cancel() {\n this.resetForm();\n },\n sendCode: function sendCode() {\n var _this3 = this;\n if (this.form.email && this.form.email !== this.email) {\n this.codeLoading = true;\n this.buttonName = '验证码发送中';\n var _this = this;\n (0, _code.resetEmail)(this.form.email).then(function (res) {\n _this3.$message({\n showClose: true,\n message: '发送成功验证码有效期5分钟',\n type: 'success'\n });\n _this3.codeLoading = false;\n _this3.isDisabled = true;\n _this3.buttonName = _this3.time-- + '秒后重新发送';\n _this3.timer = window.setInterval(function () {\n _this.buttonName = _this.time + '秒后重新发送';\n --_this.time;\n if (_this.time < 0) {\n _this.buttonName = '重新发送';\n _this.time = 60;\n _this.isDisabled = false;\n window.clearInterval(_this.timer);\n }\n }, 1000);\n }).catch(function (err) {\n _this3.resetForm();\n _this3.codeLoading = false;\n console.log(err.response.data.message);\n });\n }\n },\n doSubmit: function doSubmit() {\n var _this4 = this;\n this.$refs['form'].validate(function (valid) {\n if (valid) {\n _this4.loading = true;\n (0, _user.updateEmail)(_this4.form).then(function (res) {\n _this4.loading = false;\n _this4.resetForm();\n _this4.$notify({\n title: '邮箱修改成功',\n type: 'success',\n duration: 1500\n });\n _store.default.dispatch('GetInfo').then(function () {});\n }).catch(function (err) {\n _this4.loading = false;\n console.log(err.response.data.message);\n });\n } else {\n return false;\n }\n });\n },\n resetForm: function resetForm() {\n this.dialog = false;\n this.$refs['form'].resetFields();\n window.clearInterval(this.timer);\n this.time = 60;\n this.buttonName = '获取验证码';\n this.isDisabled = false;\n this.form = {\n pass: '',\n email: '',\n device_code: ''\n };\n }\n }\n};",null]}