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:
Chengdong Zhang
2026-09-17 19:13:29 +08:00
parent 997c312cda
commit 21e99bb52b
111 changed files with 9458 additions and 1035 deletions
+66
View File
@@ -0,0 +1,66 @@
<script setup lang="ts">
import type { Invoice } from "@vmall/shared";
definePageMeta({ middleware: "auth" });
const { t } = useI18n();
const { $api } = useNuxtApp();
const rows = ref<Invoice[]>([]);
const loading = ref(true);
async function load(): Promise<void> {
loading.value = true;
try {
rows.value = await $api.listMyInvoices();
} finally {
loading.value = false;
}
}
onMounted(() => {
void load();
});
</script>
<template>
<section class="mpanel invoices-panel">
<h1 class="mpanel-title">{{ t("user.invoicesTitle") }}</h1>
<div v-if="loading" class="muted">{{ t("common.loading") }}</div>
<UiEmptyState v-else-if="rows.length === 0" :text="t('user.noInvoices')" />
<table v-else class="mtable">
<thead>
<tr>
<th>{{ t("user.invoiceNo") }}</th>
<th>{{ t("user.invoiceOrderNo") }}</th>
<th>{{ t("user.invoiceTitle") }}</th>
<th>{{ t("user.invoiceKind") }}</th>
<th>{{ t("user.amount") }}</th>
<th>{{ t("common.status") }}</th>
<th>{{ t("user.invoiceIssuedAt") }}</th>
</tr>
</thead>
<tbody>
<tr v-for="invoice in rows" :key="invoice.id">
<td>{{ invoice.invoice_no }}</td>
<td>{{ invoice.order_no || t("mall.notAvailable") }}</td>
<td>{{ invoice.title }}</td>
<td>{{ invoice.kind === "personal" ? t("user.personal") : t("user.company") }}</td>
<td><PriceText :amount-minor="invoice.amount_minor" :currency="invoice.currency" /></td>
<td><StatusBadge :status="invoice.status" kind="invoice" /></td>
<td>{{ invoice.issued_at ? invoice.issued_at.slice(0, 10) : t("mall.notAvailable") }}</td>
</tr>
</tbody>
</table>
</section>
</template>
<style scoped>
.invoices-panel {
min-height: 560px;
}
.muted {
color: var(--mall-faint);
padding: 20px 0;
}
</style>