Files
tekelanew_acs/acs/nladmin-ui/node_modules/.cache/vue-loader/1d6f4641ad460308051ebb4ef7ceb9ec.json

1 line
3.1 KiB
JSON
Raw Normal View History

2024-12-03 17:40:13 +08:00
{"remainingRequest":"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\\updatePass.vue?vue&type=script&lang=js","dependencies":[{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\src\\views\\system\\user\\center\\updatePass.vue","mtime":1732871026807},{"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":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nimport store from '@/store'\r\nimport { updatePass } from '@/views/system/user/user'\r\nimport i18n from '@/i18n'\r\nexport default {\r\n data() {\r\n const confirmPass = (rule, value, callback) => {\r\n if (value) {\r\n if (this.form.newPass !== value) {\r\n callback(new Error(this.$t('auto.common.Tip8')))\r\n } else {\r\n callback()\r\n }\r\n } else {\r\n callback(new Error(i18n.t('auto.common.Tip9')))\r\n }\r\n }\r\n return {\r\n loading: false, dialog: false, title: i18n.t('auto.common.Change_password'), form: { oldPass: '', newPass: '', confirmPass: '' },\r\n rules: {\r\n oldPass: [\r\n { required: true, message: i18n.t('auto.common.Tip10'), trigger: 'blur' }\r\n ],\r\n newPass: [\r\n { required: true, message: i18n.t('auto.common.Tip11'), trigger: 'blur' },\r\n { min: 6, max: 20, message: i18n.t('auto.common.Tip12'), trigger: 'blur' }\r\n ],\r\n confirmPass: [\r\n { required: true, validator: confirmPass, trigger: 'blur' }\r\n ]\r\n }\r\n }\r\n },\r\n methods: {\r\n cancel() {\r\n this.resetForm()\r\n },\r\n doSubmit() {\r\n this.$refs['form'].validate((valid) => {\r\n if (valid) {\r\n this.loading = true\r\n updatePass(this.form).then(res => {\r\n this.resetForm()\r\n this.$notify({\r\n title: '密码修改成功,请重新登录',\r\n type: 'success',\r\n duration: 1500\r\n })\r\n setTimeout(() => {\r\n store.dispatch('LogOut').then(() => {\r\n location.reload() // 为了重新实例化vue-router对象 避免bug\r\n })\r\n }, 1500)\r\n }).catch(err => {\r\n this.loading = false\r\n console.log(err.response.data.message)\r\n })\r\n } else {\r\n return false\r\n }\r\n })\r\n },\r\n resetForm() {\r\n this.dialog = false\r\n this.$refs['form'].resetFields()\r\n this.form = { oldPass: '', newPass: '', confirmPass: '' }\r\n }\r\n }\r\n}\r\n",null]}