ปรับ fe sprint2
This commit is contained in:
parent
8576f3c387
commit
0d6ff7be0a
83 changed files with 6932 additions and 2571 deletions
|
|
@ -161,7 +161,7 @@ const { loaderPage } = dataStore;
|
|||
const $q = useQuasar(); // show dialog
|
||||
const mixin = useCounterMixin();
|
||||
const route = useRoute();
|
||||
const { success, messageError, showLoader, hideLoader } = mixin;
|
||||
const { success, messageError } = mixin;
|
||||
const profileId = ref<string>(route.params.id.toString());
|
||||
const edit = ref<boolean>(false);
|
||||
const uploader = ref<any>();
|
||||
|
|
@ -174,7 +174,7 @@ onMounted(async () => {
|
|||
});
|
||||
|
||||
const getData = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.profilePaperId(profileId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -185,12 +185,12 @@ const getData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
};
|
||||
|
||||
const deleteData = async (id: string) => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.delete(config.API.profilePaperId(id))
|
||||
.then((res) => {
|
||||
|
|
@ -211,8 +211,10 @@ const uploadData = async () => {
|
|||
type: file.value[0].type,
|
||||
});
|
||||
const formData = new FormData();
|
||||
formData.append("", newFile);
|
||||
showLoader();
|
||||
formData.append("avatar", newFile);
|
||||
formData.append("moss", "newFile");
|
||||
console.log(formData);
|
||||
loaderPage(true);
|
||||
await http
|
||||
.post(config.API.profilePaperId(profileId.value), formData)
|
||||
.then((res) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue