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