feat: 打开详情页

This commit is contained in:
2026-05-25 16:36:03 +08:00
parent e0a28c87fb
commit 281dffdccd

View File

@@ -2,7 +2,7 @@
<view class="w-full bg-white border-box border-ff overflow-hidden rounded-20 flex flex-col"> <view class="w-full bg-white border-box border-ff overflow-hidden rounded-20 flex flex-col">
<!-- 占位撑开 --> <!-- 占位撑开 -->
<view class="w-vw"></view> <view class="w-vw"></view>
<view class="flex flex-col px-16 pt-16 pb-12 border-box"> <view class="flex flex-col px-16 pt-16 pb-12 border-box" @click="openDetail(item)">
<view class="long-text-guide-card__badge font-size-12 font-900" :class="`is-${item.badgeTone}`"> <view class="long-text-guide-card__badge font-size-12 font-900" :class="`is-${item.badgeTone}`">
{{ item.badge }} {{ item.badge }}
@@ -34,6 +34,7 @@ const props = defineProps({
}); });
const longTextCard = { const longTextCard = {
type: 'longTextCard',
badge: "漂流攻略", badge: "漂流攻略",
badgeTone: "amber", badgeTone: "amber",
title: "下水之前,先听小七唠两句", title: "下水之前,先听小七唠两句",
@@ -42,6 +43,7 @@ const longTextCard = {
} }
const longTextCardSnap = { const longTextCardSnap = {
type: 'longTextCardSnap',
badge: "景点故事", badge: "景点故事",
badgeTone: "blue", badgeTone: "blue",
title: "小七孔古桥 · 走了三百年的石拱", title: "小七孔古桥 · 走了三百年的石拱",
@@ -50,6 +52,7 @@ const longTextCardSnap = {
} }
const longTextCardRoute = { const longTextCardRoute = {
type: 'longTextCardRoute',
badge: "路线指引", badge: "路线指引",
badgeTone: "green", badgeTone: "green",
title: "漂完卧龙潭,顺道去鸳鸯湖", title: "漂完卧龙潭,顺道去鸳鸯湖",
@@ -58,6 +61,7 @@ const longTextCardRoute = {
} }
const longTextCardScenicSpot = { const longTextCardScenicSpot = {
type: 'longTextCardScenicSpot',
badge: "拍照攻略", badge: "拍照攻略",
badgeTone: "indigo", badgeTone: "indigo",
title: "鸳鸯湖玻璃船,这样拍才不亏", title: "鸳鸯湖玻璃船,这样拍才不亏",
@@ -80,6 +84,10 @@ const item = computed(() => {
} }
}); });
const openDetail = (item) => {
/// 这里可以根据 item.type 来区分打开不同的详情页,目前先统一处理
};
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">