feat(mini-app): 清理冗余组件,新增详情页分享与管家交互功能

- 移除 ProductList、ProductCard、SectionHeading、InlineLeadForm、SearchFilterBar 等无用业务组件
- 重构线路详情页操作栏,替换电话按钮逻辑,新增原生分享按钮与页面分享配置
- 新增 ConciergeContactSheet 弹窗组件,实现专属管家咨询交互
- 调整 PlayCategorySidebar 选中态样式,优化侧边栏交互逻辑
- 统一组件导入路径为绝对路径,修复路径错误问题
- 移除详情页自定义导航栏配置,优化页面显示效果
- 优化 DetailHero 组件模板排版,提升代码可读性
This commit is contained in:
duanshuwen committed 2026-08-14 22:38:34 +08:00
1 parent d5a4f7549b
commit 1d44266595
12 files changed
+82 -552

No files matched your search

@@ -3,7 +3,7 @@
class="flex w-full shrink-0 items-center gap-2 border-t border-[#e8e2da] bg-white/95 px-3 pb-[calc(10px+env(safe-area-inset-bottom))] pt-2">
<view class="flex w-full shrink-0 items-center gap-1">
<view class="tap-feedback m-0 flex h-12 w-12 flex-col items-center justify-center p-0 text-[#81776f]"
@click="$emit('home')">
@click="$emit('call')">
<uni-icons type="phone" :size="18" color="#81776f" />
<text class="mt-0.5 text-[9px]">电话</text>
</view>
@@ -14,6 +14,18 @@
<text class="mt-0.5 text-[9px]">管家</text>
</view>
<view class="tap-feedback relative m-0 flex h-12 w-12 flex-col items-center justify-center p-0 text-[#81776f]">
<uni-icons type="redo" :size="18" color="#81776f" />
<text class="mt-0.5 text-[9px]">分享</text>
<button
open-type="share"
plain
hover-class="none"
aria-label="分享"
class="absolute inset-0 z-10 m-0 h-full w-full border-0 bg-transparent p-0 opacity-0"
/>
</view>
<view class="ml-auto flex min-w-0 items-center gap-2">
<view class="min-w-0">
<text class="block text-[10px] text-[#9b9188]">参考起价</text>
@@ -37,8 +49,7 @@ defineProps<{
}>();
defineEmits<{
home: [];
toggleFavorite: [];
call: [];
concierge: [];
booking: [];
}>();
@@ -4,12 +4,13 @@
<view class="absolute bottom-10 left-4 right-4 z-10 text-white">
<view class="flex items-center gap-2">
<text class="flex items-center justify-center rounded-[20px] bg-[#e96635] px-2 py-1 text-[10px] font-semibold">
{{ presentation.eyebrow }}
</text>
<text
class="flex items-center justify-center rounded-[20px] bg-[#e96635] px-2 py-1 text-[10px] font-semibold">{{
presentation.eyebrow }}</text>
<text
class="flex items-center justify-center rounded-[20px] text-[10px] bg-[#333333] text-white px-2 py-1 font-semibold">{{
presentation.duration }}</text>
class="flex items-center justify-center rounded-[20px] text-[10px] bg-[#333333] text-white px-2 py-1 font-semibold">
{{ presentation.duration }}
</text>
</view>
</view>
</view>
+35 -8
View File
@@ -18,22 +18,26 @@
<DetailMediaGallery :images="presentation.gallery" />
</scroll-view>
<DetailActionBar :price="1.68" :favorite="favorite" @home="goHome" @toggle-favorite="toggleFavorite"
@concierge="goConcierge" @booking="goBooking(product)" />
<DetailActionBar :price="1.68" :favorite="favorite" @call="goCall" @concierge="goConcierge"
@booking="goBooking(product)" />
<ConciergeContactSheet :open="Boolean(selectedAdvisor)" :advisor="selectedAdvisor" @close="handleConciergeClosed" />
</view>
</template>
<script setup lang="ts">
import { computed, ref } from "vue";
import { onLoad, onShow } from "@dcloudio/uni-app";
import { onLoad, onShareAppMessage, onShow } from "@dcloudio/uni-app";
import DetailActionBar from "./components/DetailActionBar.vue";
import DetailHero from "./components/DetailHero.vue";
import DetailInfoCard from "./components/DetailInfoCard.vue";
import DetailMediaGallery from "./components/DetailMediaGallery.vue";
import DetailOverviewCard from "./components/DetailOverviewCard.vue";
import ConciergeContactSheet from "@/components/ConciergeContactSheet.vue";
import type { ConciergeAdvisor } from "../concierge/components/conciergeTypes";
import { createDetailPresentation } from "./components/detailPresentation";
import { getDetailMeta, getProductDetailSections } from "@/lib/data";
import { goBack, goBooking, goRoot } from "@/lib/navigation";
import { getDetailMeta, getProductDetailSections, productKey } from "@/lib/data";
import { goBack, goBooking } from "@/lib/navigation";
import { findProduct, isProductFavorite, loadAppData, rememberProduct, toggleFavoriteProduct } from "@/lib/store";
import type { Product } from "@/lib/types";
@@ -48,6 +52,12 @@ onShow(() => {
void loadAppData();
});
onShareAppMessage(() => ({
title: presentation.value.title,
path: `/pages/detail/index?product=${encodeURIComponent(productKey(product.value))}`,
imageUrl: product.value.image,
}));
const meta = computed(() => getDetailMeta(product.value));
const presentation = computed(() => createDetailPresentation(product.value));
const detailSections = computed(() => getProductDetailSections(product.value, meta.value));
@@ -74,11 +84,28 @@ function toggleFavorite() {
function goHome() {
goRoot("/pages/home/index");
function goCall() {
uni.makePhoneCall({ phoneNumber: '13800000000' });
}
function goConcierge() {
goRoot("/pages/concierge/index");
selectedAdvisor.value = conciergeAdvisor;
}
function handleConciergeClosed() {
selectedAdvisor.value = null;
}
const conciergeAdvisor: ConciergeAdvisor = {
avatar: "https://images.unsplash.com/photo-1494790108377-be9c29b29330?auto=format&fit=crop&fm=jpg&q=80&w=240&h=240",
name: "Amanda",
role: "SENIOR TRAVEL ADVISOR",
qrImage: "https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=WonderQ%20Concierge",
details: [
{ icon: "calendar", label: "服务经验:8年" },
{ icon: "navigate", label: "擅长领域:瀑降 / 探洞" },
],
};
const selectedAdvisor = ref<ConciergeAdvisor | null>(null);
</script>