All checks were successful
Build and Deploy Front / deploy (push) Successful in 6m33s
Co-authored-by: Cursor <cursoragent@cursor.com>
53 lines
1.2 KiB
Vue
53 lines
1.2 KiB
Vue
<template>
|
|
<div class="h5-order-detail-page">
|
|
<H5AdminOrderDetailSheet
|
|
v-model:visible="sheetVisible"
|
|
:order-id="orderId"
|
|
:initial-tab="initialTab"
|
|
/>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { computed, onMounted, ref, watch } from 'vue';
|
|
import { useRoute, useRouter } from 'vue-router';
|
|
import H5AdminOrderDetailSheet from '../components/H5AdminOrderDetailSheet.vue';
|
|
|
|
defineOptions({ name: 'H5AdminOrderDetail' });
|
|
|
|
const route = useRoute();
|
|
const router = useRouter();
|
|
|
|
const sheetVisible = ref(true);
|
|
const orderId = computed(() => String(route.params.id || ''));
|
|
const initialTab = computed(() => {
|
|
const tab = String(route.query.tab || '');
|
|
if (tab === 'track' || tab === 'fee' || tab === 'overview') return tab;
|
|
return 'overview' as const;
|
|
});
|
|
|
|
function leave() {
|
|
if (window.history.length > 1) {
|
|
router.back();
|
|
return;
|
|
}
|
|
router.replace('/h5/admin/orders');
|
|
}
|
|
|
|
watch(sheetVisible, (visible) => {
|
|
if (!visible) leave();
|
|
});
|
|
|
|
onMounted(() => {
|
|
sheetVisible.value = true;
|
|
});
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
.h5-order-detail-page {
|
|
min-height: 100%;
|
|
min-height: 100dvh;
|
|
background: #f5f7f8;
|
|
}
|
|
</style>
|