feat(route-detail): 实现路线详情独立管理全链路功能

添加`DetailRecord`数据库模型、迁移脚本及完整的CRUD管理接口,将路线详情从玩法路线表解耦,实现独立存储。
在Admin UI的路线编辑器中集成详情配置面板,支持编辑详情文案、图片等展示内容。
完善MiniAPP路线详情页,新增导航函数、API调用及数据归一化逻辑,并添加对应单元测试。
更新所有相关文档,明确领域边界、联调流程及接口契约规范。
调整首页和玩法页的点击跳转逻辑,优先跳转路线详情页而非原需求页。
新增数值格式化工具函数优化内容展示效果。
This commit is contained in:
duanshuwen committed 2026-08-19 21:20:51 +08:00
1 parent 7ba92f3c5d
commit c143b67275
32 files changed
+1343 -259

No files matched your search

@@ -1,49 +1,32 @@
<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 class="relative z-10 -mt-5 mx-3 rounded-[14px] bg-white px-4 py-5 shadow-[0_8px_24px_rgba(63,48,37,0.08)]">
<view class="flex flex-wrap items-center gap-2">
<text class="rounded-full bg-[#eaf6f1] px-2.5 py-1 text-[10px] font-semibold text-[#16806d]">
{{ presentation.eyebrow }}
</text>
<text class="rounded-full bg-[#f3f0eb] px-2.5 py-1 text-[10px] font-medium text-[#746c64]">
{{ presentation.duration }}
</text>
</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>
<text class="mt-3 block text-[24px] font-bold leading-8 text-[#24211f]">{{ presentation.title }}</text>
<text class="mt-2 block text-[13px] leading-6 text-[#756d65]">{{ presentation.subtitle }}</text>
<view class="mt-4 grid grid-cols-2 gap-2 border-t border-[#f0ebe5] pt-3">
<view class="rounded-[8px] bg-[#f8f6f2] px-3 py-2.5">
<text class="block text-[10px] text-[#a39a91]">路线状态</text>
<text class="mt-1 block text-[12px] font-medium text-[#3d3833]">可咨询规划</text>
</view>
<view class="rounded-[8px] bg-[#f8f6f2] px-3 py-2.5">
<text class="block text-[10px] text-[#a39a91]">详情图片</text>
<text class="mt-1 block text-[12px] font-medium text-[#3d3833]">{{ presentation.gallery.length }} 张</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 };
defineProps<{
presentation: DetailPresentation;
favorite: boolean;
}>();
defineEmits<{
toggleFavorite: [];
}>();
const quickFacts = [
{ label: "出行方式", value: "小包团" },
{ label: "适合人数", value: "2-8人" },
{ label: "服务方式", value: "管家跟进" },
];
const { product, meta, presentation, favorite } = toRefs(props);
</script>