| | |
| | | |
| | | <script> |
| | | import option from "@/option/user/info"; |
| | | import {getUserInfo, updateInfo, updatePassword} from "@/api/system/user"; |
| | | import { updateUser } from "@/api/system/user/api"; |
| | | import func from "../../../util/func"; |
| | | import {changePassword} from "../../../api/user" |
| | | import userAvatar from "./userAvatar"; |
| | |
| | | methods: { |
| | | handleSubmit(form, done) { |
| | | if (this.index === 0) { |
| | | updateInfo(form).then(res => { |
| | | updateUser(form).then(res => { |
| | | if (res.data.success) { |
| | | this.$message({ |
| | | type: "success", |
| | |
| | | } |
| | | done(); |
| | | }, error => { |
| | | window.console.log(error); |
| | | done(); |
| | | }) |
| | | } else { |
| | |
| | | handleWitch() { |
| | | if (this.index === 0) { |
| | | this.form = {...this.userInfo}; |
| | | console.log(this.form); |
| | | } |
| | | }, |
| | | handleTabClick(tabs) { |