fix:call API

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2026-02-13 14:46:51 +07:00
parent ca7e5b247e
commit 559b03c2f0

View file

@ -135,8 +135,24 @@ async function fetchDataCommand(type: string) {
dataAttachment.value = data;
}
})
.catch((e) => {
messageError($q, e);
.catch(async (e) => {
if (type !== "cover") {
try {
const res = await http.get(
config.API.fileByFile(
"ระบบออกคำสั่ง",
newType,
commandId.value,
newType
)
);
dataAttachment.value = res.data;
} catch (error) {
messageError($q, e);
}
} else {
messageError($q, e);
}
})
.finally(() => {
hideLoader();