feat(mini-app, docs): 新增小程序详情页,更新项目文档与规范

新增全套关联组件:DetailHero、DetailOverviewCard、DetailInfoCard、DetailMediaGallery、DetailActionBar及ConciergeContactSheet。
新增详情页数据处理工具类detailPresentation.ts,处理商品展示数据的格式化与默认值兼容。
更新项目文档:补充三个领域API补充文档引用,优化AGENTS.md中的前端代码规范与docs文档列表。
This commit is contained in:
duanshuwen committed 2026-08-17 23:28:07 +08:00
1 parent 548f91c37f
commit ca6f9397e0
17 files changed
+1351 -7

No files matched your search

@@ -0,0 +1,49 @@
<template>
<view
class="relative z-10 -mt-4 mx-3 rounded-[12px] border border-[#e8e2da] bg-white p-4 shadow-[0_8px_24px_rgba(63,48,37,0.08)]">
<text class="block text-[22px] font-bold leading-7 text-[#24211f]">{{ presentation.title }}</text>
<view class="mt-4 flex items-end justify-between gap-3 border-t border-[#f0ebe5] pt-3">
<view>
<text class="block text-[11px] text-[#a69d95]">参考起价</text>
<view class="mt-1 flex items-baseline gap-1">
<text class="text-[25px] font-bold leading-none text-[#e96635]">¥{{ formatWan(product.price) }}</text>
<text class="text-[11px] text-[#8f857d]">万起/人</text>
</view>
</view>
</view>
<view class="mt-4 grid grid-cols-3 gap-2">
<view v-for="item in quickFacts" :key="item.label" class="rounded-[8px] bg-[#f8f6f2] px-2 py-2.5">
<text class="block text-[10px] text-[#a39a91]">{{ item.label }}</text>
<text class="mt-1 block truncate text-[12px] font-medium text-[#3d3833]">{{ item.value }}</text>
</view>
</view>
</view>
</template>
<script setup lang="ts">
import { toRefs } from "vue";
import { formatWan } from "@/lib/data";
import type { Product } from "@/lib/types";
import type { DetailPresentation } from "./detailPresentation";
const props = defineProps<{
product: Product;
meta: { location: string; summary: string };
presentation: DetailPresentation;
favorite: boolean;
}>();
defineEmits<{
toggleFavorite: [];
}>();
const quickFacts = [
{ label: "出行方式", value: "小包团" },
{ label: "适合人数", value: "2-8人" },
{ label: "服务方式", value: "管家跟进" },
];
const { product, meta, presentation, favorite } = toRefs(props);
</script>