forked from verdnatura/hedera-web
perf: change code position(clean code)
This commit is contained in:
parent
38a88bb0cc
commit
929623949b
|
@ -17,6 +17,14 @@ const rows = ref([]);
|
|||
const ticket = ref({});
|
||||
const orderId = ref(null);
|
||||
|
||||
onBeforeMount(() => {
|
||||
appStore.check();
|
||||
});
|
||||
|
||||
onMounted(async () => {
|
||||
orderId.value = route.params.id || basketOrderId.value;
|
||||
if (orderId.value) await fetchData();
|
||||
});
|
||||
const getOrder = async () => {
|
||||
try {
|
||||
const [data] = await jApi.query(
|
||||
|
@ -88,15 +96,6 @@ const fetchData = async () => {
|
|||
await getItems();
|
||||
await getOrder();
|
||||
};
|
||||
|
||||
onBeforeMount(() => {
|
||||
appStore.check();
|
||||
});
|
||||
|
||||
onMounted(async () => {
|
||||
orderId.value = route.params.id || basketOrderId.value;
|
||||
await fetchData();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
Loading…
Reference in New Issue