Compare commits
No commits in common. "2a4dac58aceffbcbd138dee610eb6d1ba90000d3" and "f632bab6b3945422412aafc67f368070365132b7" have entirely different histories.
2a4dac58ac
...
f632bab6b3
|
@ -50,9 +50,3 @@ export function updateUserInfo(data) {
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
export function getUserInfo(userId) {
|
|
||||||
return request({
|
|
||||||
url: '/system/user/' + userId,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ const useUserStore = defineStore('user', {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
getInfo()
|
getInfo()
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
// res.user.avatar = import.meta.env.VITE_APP_BASE_API + res.user.avatar
|
res.user.avatar = import.meta.env.VITE_APP_BASE_API + res.user.avatar
|
||||||
const user = res.user
|
const user = res.user
|
||||||
this.user = user
|
this.user = user
|
||||||
const avatar = user.avatar == '' || user.avatar == null ? defAva : user.avatar
|
const avatar = user.avatar == '' || user.avatar == null ? defAva : user.avatar
|
||||||
|
|
|
@ -97,10 +97,10 @@ const state = reactive({
|
||||||
postGroup: {}
|
postGroup: {}
|
||||||
})
|
})
|
||||||
|
|
||||||
async function getUser() {
|
function getUser() {
|
||||||
getUserProfile().then((response) => {
|
getUserProfile().then((response) => {
|
||||||
// response.data.avatar = import.meta.env.VITE_APP_BASE_API + response.data.avatar
|
response.data.avatar = import.meta.env.VITE_APP_BASE_API + response.data.avatar
|
||||||
Object.assign(state.user,response.data)
|
state.user = response.data
|
||||||
state.roleGroup = response.roleGroup
|
state.roleGroup = response.roleGroup
|
||||||
state.postGroup = response.postGroup
|
state.postGroup = response.postGroup
|
||||||
})
|
})
|
||||||
|
|
|
@ -68,7 +68,7 @@ function uploadImg(data) {
|
||||||
|
|
||||||
/** 关闭窗口 */
|
/** 关闭窗口 */
|
||||||
function closeDialog() {
|
function closeDialog() {
|
||||||
options.img = userStore.user.avatar
|
// options.img = userStore.avatar
|
||||||
options.visible = false
|
options.visible = false
|
||||||
}
|
}
|
||||||
const cancle = () => {
|
const cancle = () => {
|
||||||
|
|
Loading…
Reference in New Issue