fix bug ==> loading

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-09-01 11:25:56 +07:00
parent 31755747da
commit e28e9bc3aa
6 changed files with 12 additions and 27 deletions

View file

@ -109,19 +109,17 @@ function onEdit(id: string) {
async function getProfileId() {
isLoad.value = true;
if (dataStore.profileId) {
profilId.value = dataStore.profileId;
} else {
try {
try {
if (!dataStore.profileId) {
const res = await http.get(config.API.profilePosition());
dataStore.profileId = res.data.result.profileId;
profilId.value = dataStore.profileId;
await getData();
} catch (e) {
messageError($q, e);
} finally {
isLoad.value = false;
}
profilId.value = dataStore.profileId;
await getData();
} catch (e) {
messageError($q, e);
} finally {
isLoad.value = false;
}
}