- 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
40 lines
1.1 KiB
Vue
40 lines
1.1 KiB
Vue
<script setup lang="ts">
|
|
import { t as pick } from "@vmall/shared";
|
|
import { MOCK_COUPONS } from "~/mock/data";
|
|
|
|
definePageMeta({ middleware: "auth" });
|
|
|
|
const { locale, t } = useI18n();
|
|
</script>
|
|
|
|
<template>
|
|
<section class="mpanel coupons-panel">
|
|
<h1 class="mpanel-title">{{ t("user.couponsTitle") }}</h1>
|
|
<UiEmptyState v-if="MOCK_COUPONS.length === 0" :text="t('user.noCoupons')" />
|
|
<table v-else class="mtable">
|
|
<thead>
|
|
<tr>
|
|
<th>{{ t("user.couponTitle") }}</th>
|
|
<th>{{ t("user.amount") }}</th>
|
|
<th>{{ t("user.threshold") }}</th>
|
|
<th>{{ t("user.expiresAt") }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr v-for="coupon in MOCK_COUPONS" :key="coupon.id">
|
|
<td>{{ pick(coupon.title, locale) }}</td>
|
|
<td><PriceText :amount-minor="coupon.amountMinor" :currency="coupon.currency" /></td>
|
|
<td><PriceText :amount-minor="coupon.thresholdMinor" :currency="coupon.currency" /></td>
|
|
<td>{{ coupon.expiresAt }}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.coupons-panel {
|
|
min-height: 560px;
|
|
}
|
|
</style>
|