Merge branch 'develop' of ssh://gitlab.dongwu-inc.com:10022/BOE/fe-stu into develop

This commit is contained in:
wyx
2022-12-28 14:54:40 +08:00
6 changed files with 23 additions and 30 deletions

View File

@@ -44,7 +44,7 @@ onMounted(() => {
function getUserInfo() {
boeRequest(GET_USER_INFO).then((res) => {
res.result.avatar = import.meta.env.VITE_BOE_API_URL + '/upload' + (res.result.avatar ? res.result.avatar : '/800e23f7-b58c-4192-820d-0c6a2b7544cc.png')
res.result.avatar = res.result.avatar ? res.result.avatar : '/800e23f7-b58c-4192-820d-0c6a2b7544cc.png'
store.commit("SET_USER", res.result);
});
}

View File

@@ -21,7 +21,7 @@ export function useUserInfo(id) {
watch(id, () => {
id.value && boeRequest(GET_USER_LIST, {id: id.value}).then(res => {
userInfo.value = res.result.userInfoList[0]
userInfo.value.avatar = `${import.meta.env.VITE_BOE_API_URL}/upload${userInfo.value.avatar?userInfo.value.avatar:'/800e23f7-b58c-4192-820d-0c6a2b7544cc.png'}`
userInfo.value.avatar = userInfo.value.avatar?userInfo.value.avatar:'/800e23f7-b58c-4192-820d-0c6a2b7544cc.png'
})
})
return userInfo