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