fix: await API fileByFile
This commit is contained in:
parent
7d46985570
commit
176b22e756
6 changed files with 38 additions and 21 deletions
|
|
@ -8,6 +8,7 @@ import config from "@/app.config";
|
|||
import type { PropType } from "vue";
|
||||
import type { FormProfile } from "@/interface/main";
|
||||
import type { DataProfile } from "@/modules/05_placement/interface/index/Main";
|
||||
import avatarMain from "@/assets/avatar_user.jpg";
|
||||
|
||||
/** importComponents*/
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
||||
|
|
@ -91,8 +92,11 @@ function fetchProfile(id: string, name: string) {
|
|||
if (profile.avatar === "") {
|
||||
http
|
||||
.get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, `${name}`))
|
||||
.then(async (res) => {
|
||||
.then((res) => {
|
||||
profile.avatar = res.data.downloadUrl;
|
||||
})
|
||||
.catch(() => {
|
||||
profile.avatar = avatarMain;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue