feat: 增加图片的预览

This commit is contained in:
2026-06-01 15:25:59 +08:00
parent a04e52bfa5
commit 92e17395e2
5 changed files with 47 additions and 6 deletions

View File

@@ -21,7 +21,7 @@
这是景区最完整的打法全程顺着响水河往下游走不用爬坡回头把最精华的水景一次看个够从古朴的石桥热身一路走到碧蓝的卧龙潭收尾节奏刚刚好
</view>
<image class="overview-image-card" :src="overviewImage" mode="widthFix" />
<image class="overview-image-card" :src="overviewImage" mode="widthFix" @click="previewPhoto(overviewImage)" />
<view class="detail-section-title">这几个地方不能错过</view>
<view class="detail-paragraph">
@@ -33,7 +33,7 @@
<text class="detail-highlight">{{ spot.index }} {{ spot.name }}</text>
{{ spot.desc }}
</view>
<image class="overview-image-card" :src="spot.image" mode="aspectFill" />
<image class="overview-image-card" :src="spot.image" mode="aspectFill" @click="previewPhoto(spot.image)" />
</template>
<view class="detail-section-title">一天大概这样分</view>
@@ -166,6 +166,12 @@ const showToast = (title) => {
});
};
const previewPhoto = (url) => {
uni.previewImage({
current: url,
urls: [url],
});
};
const goodsDetail = (item) => {
uni.navigateTo({