e2292e07b5ed1d25f50b42306080d9c1.json 7.4 KB

1
  1. {"remainingRequest":"/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/node_modules/vue-loader/lib/index.js??vue-loader-options!/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/src/views/personalCenter/resetPwd.vue?vue&type=script&lang=js","dependencies":[{"path":"/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/src/views/personalCenter/resetPwd.vue","mtime":1708395041888},{"path":"/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/node_modules/cache-loader/dist/cjs.js","mtime":1708395146433},{"path":"/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/node_modules/babel-loader/lib/index.js","mtime":1708395147257},{"path":"/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/node_modules/cache-loader/dist/cjs.js","mtime":1708395146433},{"path":"/Users/caoge/Desktop/地质现场/VehicleMonitor-WEB/node_modules/vue-loader/lib/index.js","mtime":1708395147382}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:Ly8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KDQppbXBvcnQgeyBlZGl0VXNlciB9IGZyb20gIkAvYXBpL3BlcnNvbmFsQ2VudGVyLmpzIjsNCmltcG9ydCB7IHVwZGF0ZXB3ZCB9IGZyb20gIkAvYXBpL3N5c01hbmFnZSI7DQppbXBvcnQgc3RvcmUgZnJvbSAiQC9zdG9yZSI7DQpleHBvcnQgZGVmYXVsdCB7DQogIHByb3BzOiB7DQogICAgdXNlcjogew0KICAgICAgdHlwZTogT2JqZWN0LA0KICAgIH0sDQogIH0sDQogIGRhdGEoKSB7DQogICAgY29uc3QgZXF1YWxUb1Bhc3N3b3JkID0gKHJ1bGUsIHZhbHVlLCBjYWxsYmFjaykgPT4gew0KICAgICAgaWYgKHRoaXMudXNlclBhc3N3b3JkLnBhc3N3b3JkICE9PSB2YWx1ZSkgew0KICAgICAgICBjYWxsYmFjayhuZXcgRXJyb3IoIuS4pOasoei+k+WFpeeahOWvhueggeS4jeS4gOiHtCIpKTsNCiAgICAgIH0gZWxzZSB7DQogICAgICAgIGNhbGxiYWNrKCk7DQogICAgICB9DQogICAgfTsNCiAgICByZXR1cm4gew0KICAgICAgdXNlclBhc3N3b3JkOiB7DQogICAgICAgIG9sZFBhc3N3b3JkOiB1bmRlZmluZWQsDQogICAgICAgIHBhc3N3b3JkOiB1bmRlZmluZWQsDQogICAgICAgIGNvbmZpcm1QYXNzd29yZDogdW5kZWZpbmVkLA0KICAgICAgICBpZDogbnVsbCwNCiAgICAgIH0sDQogICAgICAvLyDooajljZXmoKHpqowNCiAgICAgIHJ1bGVzOiB7DQogICAgICAgIG9sZFBhc3N3b3JkOiBbDQogICAgICAgICAgeyByZXF1aXJlZDogdHJ1ZSwgbWVzc2FnZTogIuaXp+WvhueggeS4jeiDveS4uuepuiIsIHRyaWdnZXI6ICJibHVyIiB9LA0KICAgICAgICBdLA0KICAgICAgICBwYXNzd29yZDogWw0KICAgICAgICAgIHsgcmVxdWlyZWQ6IHRydWUsIG1lc3NhZ2U6ICLmlrDlr4bnoIHkuI3og73kuLrnqboiLCB0cmlnZ2VyOiAiYmx1ciIgfSwNCiAgICAgICAgICB7DQogICAgICAgICAgICBtaW46IDYsDQogICAgICAgICAgICBtYXg6IDIwLA0KICAgICAgICAgICAgbWVzc2FnZTogIumVv+W6puWcqCA2IOWIsCAyMCDkuKrlrZfnrKYiLA0KICAgICAgICAgICAgdHJpZ2dlcjogImJsdXIiLA0KICAgICAgICAgIH0sDQogICAgICAgIF0sDQogICAgICAgIGNvbmZpcm1QYXNzd29yZDogWw0KICAgICAgICAgIHsgcmVxdWlyZWQ6IHRydWUsIG1lc3NhZ2U6ICLnoa7orqTlr4bnoIHkuI3og73kuLrnqboiLCB0cmlnZ2VyOiAiYmx1ciIgfSwNCiAgICAgICAgICB7IHJlcXVpcmVkOiB0cnVlLCB2YWxpZGF0b3I6IGVxdWFsVG9QYXNzd29yZCwgdHJpZ2dlcjogImJsdXIiIH0sDQogICAgICAgIF0sDQogICAgICB9LA0KICAgIH07DQogIH0sDQogIG1ldGhvZHM6IHsNCiAgICBzdWJtaXQoKSB7DQogICAgICB0aGlzLiRyZWZzWyJmb3JtIl0udmFsaWRhdGUoKHZhbGlkKSA9PiB7DQogICAgICAgIGlmICh2YWxpZCkgew0KICAgICAgICAgIHRoaXMudXNlclBhc3N3b3JkLmlkID0gdGhpcy51c2VyLmlkOw0KICAgICAgICAgIGVkaXRVc2VyKHRoaXMudXNlclBhc3N3b3JkKS50aGVuKChyZXNwb25zZSkgPT4gew0KICAgICAgICAgICAgaWYgKHJlc3BvbnNlLmNvZGUgPT0gMjAwKSB7DQogICAgICAgICAgICAgIHRoaXMuJG1lc3NhZ2Uoew0KICAgICAgICAgICAgICAgIG1lc3NhZ2U6ICLkv67mlLnmiJDlip8iLA0KICAgICAgICAgICAgICAgIHR5cGU6ICJzdWNjZXNzIiwNCiAgICAgICAgICAgICAgfSk7DQogICAgICAgICAgICAgIHN0b3JlLmRpc3BhdGNoKCJ1c2VyL3Jlc2V0VG9rZW4iKS50aGVuKCgpID0+IHsNCiAgICAgICAgICAgICAgICBsb2NhdGlvbi5yZWxvYWQoKTsNCiAgICAgICAgICAgICAgfSk7DQogICAgICAgICAgICB9IGVsc2Ugew0KICAgICAgICAgICAgICB0aGlzLiRtZXNzYWdlLmVycm9yKHJlc3BvbnNlLm1zZyk7DQogICAgICAgICAgICB9DQogICAgICAgICAgfSk7DQogICAgICAgIH0NCiAgICAgIH0pOw0KICAgIH0sDQogICAgY2xvc2UoKSB7DQogICAgICB0aGlzLiRyb3V0ZXIucHVzaCgiL2Rhc2hib2FyZCIpOw0KICAgIH0sDQogIH0sDQp9Ow0K"},{"version":3,"sources":["resetPwd.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"resetPwd.vue","sourceRoot":"src/views/personalCenter","sourcesContent":["<template>\r\n <el-form ref=\"form\" :model=\"userPassword\" :rules=\"rules\" label-width=\"80px\">\r\n <el-form-item label=\"旧密码\" prop=\"oldPassword\">\r\n <el-input\r\n v-model=\"userPassword.oldPassword\"\r\n placeholder=\"请输入旧密码\"\r\n type=\"password\"\r\n show-password\r\n />\r\n </el-form-item>\r\n <el-form-item label=\"新密码\" prop=\"password\">\r\n <el-input\r\n v-model=\"userPassword.password\"\r\n placeholder=\"请输入新密码\"\r\n type=\"password\"\r\n show-password\r\n />\r\n </el-form-item>\r\n <el-form-item label=\"确认密码\" prop=\"confirmPassword\">\r\n <el-input\r\n v-model=\"userPassword.confirmPassword\"\r\n placeholder=\"请确认新密码\"\r\n type=\"password\"\r\n show-password\r\n />\r\n </el-form-item>\r\n <el-form-item>\r\n <el-button type=\"primary\" size=\"mini\" @click=\"submit\">保存</el-button>\r\n <el-button type=\"danger\" size=\"mini\" @click=\"close\">关闭</el-button>\r\n </el-form-item>\r\n </el-form>\r\n</template>\r\n\r\n<script>\r\nimport { editUser } from \"@/api/personalCenter.js\";\r\nimport { updatepwd } from \"@/api/sysManage\";\r\nimport store from \"@/store\";\r\nexport default {\r\n props: {\r\n user: {\r\n type: Object,\r\n },\r\n },\r\n data() {\r\n const equalToPassword = (rule, value, callback) => {\r\n if (this.userPassword.password !== value) {\r\n callback(new Error(\"两次输入的密码不一致\"));\r\n } else {\r\n callback();\r\n }\r\n };\r\n return {\r\n userPassword: {\r\n oldPassword: undefined,\r\n password: undefined,\r\n confirmPassword: undefined,\r\n id: null,\r\n },\r\n // 表单校验\r\n rules: {\r\n oldPassword: [\r\n { required: true, message: \"旧密码不能为空\", trigger: \"blur\" },\r\n ],\r\n password: [\r\n { required: true, message: \"新密码不能为空\", trigger: \"blur\" },\r\n {\r\n min: 6,\r\n max: 20,\r\n message: \"长度在 6 到 20 个字符\",\r\n trigger: \"blur\",\r\n },\r\n ],\r\n confirmPassword: [\r\n { required: true, message: \"确认密码不能为空\", trigger: \"blur\" },\r\n { required: true, validator: equalToPassword, trigger: \"blur\" },\r\n ],\r\n },\r\n };\r\n },\r\n methods: {\r\n submit() {\r\n this.$refs[\"form\"].validate((valid) => {\r\n if (valid) {\r\n this.userPassword.id = this.user.id;\r\n editUser(this.userPassword).then((response) => {\r\n if (response.code == 200) {\r\n this.$message({\r\n message: \"修改成功\",\r\n type: \"success\",\r\n });\r\n store.dispatch(\"user/resetToken\").then(() => {\r\n location.reload();\r\n });\r\n } else {\r\n this.$message.error(response.msg);\r\n }\r\n });\r\n }\r\n });\r\n },\r\n close() {\r\n this.$router.push(\"/dashboard\");\r\n },\r\n },\r\n};\r\n</script>\r\n"]}]}