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,73 @@
|
||||
<script setup lang="ts">
|
||||
const { t } = useI18n();
|
||||
const visible = ref(false);
|
||||
|
||||
function onScroll(): void {
|
||||
visible.value = window.scrollY > 400;
|
||||
}
|
||||
function toTop(): void {
|
||||
window.scrollTo({ top: 0, behavior: "smooth" });
|
||||
}
|
||||
onMounted(() => window.addEventListener("scroll", onScroll, { passive: true }));
|
||||
onBeforeUnmount(() => window.removeEventListener("scroll", onScroll));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<footer class="foot">
|
||||
<div class="w1200">
|
||||
<ul class="props">
|
||||
<li>{{ t("shell.footer.v1") }}</li>
|
||||
<li>{{ t("shell.footer.v2") }}</li>
|
||||
<li>{{ t("shell.footer.v3") }}</li>
|
||||
<li>{{ t("shell.footer.v4") }}</li>
|
||||
</ul>
|
||||
<div class="copyright">
|
||||
<p>{{ t("shell.footer.copyright") }}</p>
|
||||
<p>{{ t("shell.footer.icp") }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<button v-show="visible" class="backtop" type="button" :aria-label="t('shell.backToTop')" @click="toTop">↑</button>
|
||||
</footer>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.foot {
|
||||
padding-top: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
.props {
|
||||
margin: 40px auto 0;
|
||||
width: 720px;
|
||||
border-top: 1px solid var(--mall-line);
|
||||
padding: 40px 0 0;
|
||||
list-style: none;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
}
|
||||
.copyright {
|
||||
font-size: 12px;
|
||||
line-height: 28px;
|
||||
color: var(--mall-muted);
|
||||
padding: 30px 0 20px;
|
||||
}
|
||||
.backtop {
|
||||
position: fixed;
|
||||
right: 40px;
|
||||
bottom: 60px;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
border: 1px solid var(--mall-line-dark);
|
||||
background: #fff;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 18px;
|
||||
color: var(--mall-muted);
|
||||
z-index: 800;
|
||||
}
|
||||
.backtop:hover {
|
||||
color: #fff;
|
||||
background: var(--mall-red);
|
||||
border-color: var(--mall-red);
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user