From 500078714411487af00161e01bd7e0b5efdc3414 Mon Sep 17 00:00:00 2001
From: cloudroam <cloudroam>
Date: 星期四, 07 八月 2025 13:32:32 +0800
Subject: [PATCH] add:热门景点
---
pages/home/community.vue | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/pages/home/community.vue b/pages/home/community.vue
index f1e4cb8..968fbc3 100644
--- a/pages/home/community.vue
+++ b/pages/home/community.vue
@@ -1,5 +1,5 @@
<template>
- <view class="post-card">
+ <view class="post-card" @click="handleClick">
<!-- 用户信息 -->
<view class="user-info">
<up-avatar :src="avatar" size="80rpx" shape="circle" />
@@ -56,11 +56,20 @@
content?: string;
likeCount?: number | string;
commentCount?: number | string;
+ detailUrl?: string; // 新增跳转链接
}
const props = defineProps<Props>();
const imageHeight = ref(0)
+const handleClick = () => {
+ if (props.detailUrl) {
+ uni.navigateTo({
+ url: props.detailUrl
+ });
+ }
+}; // 注意这里需要分号
+
const computeImageHeight = (src?: string) => {
if (!src) return
uni.getImageInfo({
--
Gitblit v1.9.3