| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { mapGetters } from "vuex"; |
| | | import {updatePerson,getCurInfo} from "@/api/user"; |
| | | import {mapGetters} from "vuex"; |
| | | import {getCurInfo, updatePerson} from "@/api/user"; |
| | | import {getDownUrl, upLoadFile} from "@/utils/base"; |
| | | |
| | | export default { |
| | |
| | | ]) |
| | | }, |
| | | created(){ |
| | | this.user = JSON.parse(JSON.stringify(this.userInfo)) |
| | | console.log(this.user) |
| | | // 获取登录用户信息 |
| | | this.getUserInfo() |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | getUserInfo() { |
| | | getCurInfo().then(res => { |
| | | this.user = res |
| | | }) |
| | | }, |
| | | getHead(){ |
| | | return this.baseUrl + this.user.avatar |
| | | }, |