feat: 商品详情对接调试

This commit is contained in:
2025-08-10 19:13:02 +08:00
parent ff855fc2eb
commit ff7e135ef0
7 changed files with 264 additions and 23 deletions

View File

@@ -14,7 +14,7 @@
v-for="(item, index) in thumbnails"
:key="index"
>
<image :src="item.photoUrl" mode="aspectFill"></image>
<image :src="item.imageUrl" mode="aspectFill"></image>
</swiper-item>
</swiper>
@@ -39,8 +39,8 @@
:id="`thumbnail-${index}`"
@click="handleThumbnailClick(index)"
>
<image :src="thumb.photoUrl" mode="aspectFill"></image>
<text>{{ thumb.photoName }}</text>
<image :src="thumb.imageUrl" mode="aspectFill"></image>
<text>{{ thumb.name }}</text>
</view>
</view>
</scroll-view>
@@ -106,35 +106,35 @@ const swiperStyle = computed(() => {
// 默认图片数据
const defaultImages = [
{
photoUrl:
"https://fastly.picsum.photos/id/866/654/400.jpg?hmac=z3vI4CYrpnXEgimSlJCDwXRxEa-UDHiRwzGEyB8V-po",
photoName: "瑶山古寨",
imageUrl:
"https://one-feel-image-bucket.oss-cn-chengdu.aliyuncs.com/DH04006.jpg",
name: "瑶山古寨",
},
{
photoUrl:
"https://fastly.picsum.photos/id/284/654/400.jpg?hmac=89XRCJxYTblKIFGLOp6hJ9U0GC8BQrcnJwE5pG21NAk",
photoName: "民俗表演",
imageUrl:
"https://one-feel-image-bucket.oss-cn-chengdu.aliyuncs.com/DH04002.JPG",
name: "民俗表演",
},
{
photoUrl:
"https://fastly.picsum.photos/id/281/654/400.jpg?hmac=hcAJB7y2Xz3DVuz6S4XeQZgzaTJ_QWnxtbnaagZL6Fs",
photoName: "特色美食",
imageUrl:
"https://one-feel-image-bucket.oss-cn-chengdu.aliyuncs.com/DH04007.jpg",
name: "特色美食",
},
{
photoUrl:
"https://fastly.picsum.photos/id/435/654/400.jpg?hmac=TSVDxfo-zXbunxNQK0erSG_nmKcS20xfhbQsCAXLlHo",
photoName: "传统服饰",
imageUrl:
"https://one-feel-image-bucket.oss-cn-chengdu.aliyuncs.com/DH04014.JPG",
name: "传统服饰",
},
{
photoUrl:
"https://fastly.picsum.photos/id/737/654/400.jpg?hmac=VED05oEK3XB0Aa_DUVoZjTAf0bHjAmNYyJky4lq5vVo",
photoName: "其他",
imageUrl:
"https://one-feel-image-bucket.oss-cn-chengdu.aliyuncs.com/DH04020.JPG",
name: "其他",
},
];
// 使用传入的图片数据或默认数据
const thumbnails = computed(() => {
return props.images.length ? props.images : defaultImages;
return props.images;
});
const handleThumbnailClick = (index) => {

View File

@@ -29,7 +29,7 @@
position: absolute;
left: 12px;
right: 12px;
bottom: 36px;
bottom: 0px;
height: 60px;
}