- MyProfile

- Immagine profilo e small
This commit is contained in:
paoloar77
2022-01-03 21:53:41 +01:00
parent f31eb0ea99
commit 5375e9d728
37 changed files with 542 additions and 128 deletions

View File

@@ -176,6 +176,16 @@ export const useUserStore = defineStore('UserStore', {
return ''
},
getImgByProfile(userparam: IUserFields): string {
try{
if (userparam.profile && userparam.profile.img) {
return 'upload/profile/' + userparam.username + '/' + userparam.profile.img
}
}catch (e) {}
return 'images/noimg.png'
},
getRefLink(username: string): string {
if (username === '')
username = this.my.username
@@ -805,5 +815,19 @@ export const useUserStore = defineStore('UserStore', {
return false
}
},
async loadUserProfile(username: string) {
const data = {
username
}
return Api.SendReq('/users/profile', 'POST', data)
.then((res) => {
return res.data
}).catch((error) => {
return {}
})
}
},
})