## P2.1: 商品浏览模块(listings)✅ ### 完整迁移(23个文件) - API: listings.ts, listingOptions.ts, homeConfig.ts - Views: 5个页面(HomeView, ListingsView, ListingDetailView + 移动端2个) - Composables: 3个(useHomeFilters, useFilterOptions, useListingQuery) - Components: 9个(ListingCard, 各种过滤器组件) - Tests: 2个测试文件 **功能:** - 首页浏览、商品列表、详情查看 - 高级筛选(服务器、等级、哈夫币、皮肤等) - 排序和分区功能 - 横幅、公告、统计展示 **技术改进:** - 更新所有导入路径到 @/shared/ - 建立清晰的模块导出 --- ## P2.2: 用户认证模块(auth)✅ ### 完整迁移(12个文件) - API: auth.ts, realname.ts, notifications.ts - Views: 8个页面(登录、注册、个人资料、实名认证、通知 + 移动端) - 模块导出 **功能:** - 用户注册、登录、Token管理 - 实名认证、风险检查 - 个人资料编辑、头像上传 - 消息/通知中心 **技术改进:** - 统一 API 导入路径 - 类型安全增强 --- ## 里程碑 🎉 **P2 阶段完成!** **累计完成:** 6个模块 - ✅ P0: shared(基础设施)- 22个文件 - ✅ P1: wallet, chats, orders - 24个文件 - ✅ P2: listings, auth - 35个文件 **总计:** 81个文件已迁移 **剩余:** P3阶段(seller, disputes, admin)+ 清理工作 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
67 lines
1.0 KiB
Vue
67 lines
1.0 KiB
Vue
<script setup lang="ts">
|
|
interface StatCard {
|
|
label: string
|
|
value: string
|
|
hint: string
|
|
}
|
|
|
|
interface Props {
|
|
stats: StatCard[]
|
|
}
|
|
|
|
defineProps<Props>()
|
|
</script>
|
|
|
|
<template>
|
|
<div class="home-stats-v2">
|
|
<div v-for="item in stats" :key="item.label" class="stat-item">
|
|
<div class="stat-main">
|
|
<strong>{{ item.value }}</strong>
|
|
<span>{{ item.label }}</span>
|
|
</div>
|
|
<small>{{ item.hint }}</small>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.home-stats-v2 {
|
|
display: grid;
|
|
grid-template-rows: repeat(3, 1fr);
|
|
gap: 12px;
|
|
min-width: 0;
|
|
}
|
|
|
|
.stat-item {
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
padding: 16px;
|
|
border: 1px solid #eef1f5;
|
|
border-radius: 16px;
|
|
background: #ffffff;
|
|
}
|
|
|
|
.stat-main {
|
|
display: flex;
|
|
align-items: baseline;
|
|
gap: 8px;
|
|
}
|
|
|
|
.stat-item strong {
|
|
font-size: 24px;
|
|
color: #ff6a00;
|
|
}
|
|
|
|
.stat-item span {
|
|
font-weight: 700;
|
|
color: #17233d;
|
|
}
|
|
|
|
.stat-item small {
|
|
margin-top: 4px;
|
|
color: #7b8798;
|
|
font-size: 12px;
|
|
}
|
|
</style>
|