feat(mall): classic B2B2C PC storefront with fixed mock API layer
- Mock adapter implementing @vmall/shared ApiClient (localStorage-persisted cart/orders/invoices), runtime switch via mockApi flag (default on) - Fixed bilingual mock catalog: 3-level categories, 24 products w/ SKUs, stores, brands, banners, floors, seckill/collective/integral, comments, coupons, addresses, seeded orders/shipments/invoices - B2B2C mall shell: top bar, logo/search/cart header, dark nav + category mega-menu, value-prop footer, back-to-top; 1200px grid, #ca151e theme - UI primitives replacing element-plus: carousel, pagination, breadcrumb, qty stepper, rating stars, modal, tabs, step bar, product card - Pages: home floors, search (filters/sort/paging), goods detail (SKU picker, store rail, review tabs), cart -> checkout -> pay -> success, auth pages, user center (dashboard/orders/addresses/favorites/coupons/ invoices), stores, seckill, collective, integral - i18n split into per-domain locale modules (en+zh) - OpenSpec change mall-pc-storefront-replica archived; all specs green
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
<script setup lang="ts">
|
||||
definePageMeta({ middleware: "auth" });
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const stepLabels = computed(() => [
|
||||
t("checkout.steps.cart"),
|
||||
t("checkout.steps.order"),
|
||||
t("checkout.steps.payment"),
|
||||
t("checkout.steps.complete"),
|
||||
]);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="transaction-page success-page">
|
||||
<div class="w1200">
|
||||
<UiStepBar :steps="stepLabels" :active="3" />
|
||||
<section class="mpanel success-panel">
|
||||
<div class="success-icon" aria-hidden="true">✓</div>
|
||||
<h1>{{ t("checkout.successTitle") }}</h1>
|
||||
<p>{{ t("checkout.successMessage") }}</p>
|
||||
<div class="success-actions">
|
||||
<NuxtLink class="mbtn red" to="/user/orders">{{ t("checkout.viewOrders") }}</NuxtLink>
|
||||
<NuxtLink class="mbtn gray" to="/">{{ t("checkout.continueShopping") }}</NuxtLink>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.transaction-page {
|
||||
padding: 24px 0 80px;
|
||||
background: #f5f5f5;
|
||||
min-height: 60vh;
|
||||
}
|
||||
.success-panel {
|
||||
padding: 60px 20px 70px;
|
||||
text-align: center;
|
||||
}
|
||||
.success-icon {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 72px;
|
||||
height: 72px;
|
||||
border-radius: 50%;
|
||||
background: var(--mall-green);
|
||||
color: #fff;
|
||||
font-size: 48px;
|
||||
line-height: 1;
|
||||
}
|
||||
.success-panel h1 {
|
||||
margin: 22px 0 10px;
|
||||
font-size: 24px;
|
||||
font-weight: 500;
|
||||
}
|
||||
.success-panel p {
|
||||
margin: 0;
|
||||
color: var(--mall-muted);
|
||||
}
|
||||
.success-actions {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 12px;
|
||||
margin-top: 28px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user