fix(RewardDetail): 修复分享功能中图片URL未使用缩略图的问题
使用reward.thumbnail作为分享图片URL,确保分享时显示正确的缩略图
Showing
1 changed file
with
3 additions
and
3 deletions
| ... | @@ -5,7 +5,7 @@ | ... | @@ -5,7 +5,7 @@ |
| 5 | <!-- 内容区域 --> | 5 | <!-- 内容区域 --> |
| 6 | <!-- Top Image --> | 6 | <!-- Top Image --> |
| 7 | <view class="w-full h-48"> | 7 | <view class="w-full h-48"> |
| 8 | - <image :src="reward.banner" class="w-full h-full object-cover" /> | 8 | + <image :src="reward.banner" mode="aspectFill" class="w-full h-full object-cover" /> |
| 9 | </view> | 9 | </view> |
| 10 | 10 | ||
| 11 | <!-- Main Content --> | 11 | <!-- Main Content --> |
| ... | @@ -259,12 +259,12 @@ const onShareAppMessage = (res) => { | ... | @@ -259,12 +259,12 @@ const onShareAppMessage = (res) => { |
| 259 | // 确保数据已加载,提供默认值 | 259 | // 确保数据已加载,提供默认值 |
| 260 | // const title = reward.value?.title ? `${reward.value.title}` : '精彩优惠券等你来兑换'; | 260 | // const title = reward.value?.title ? `${reward.value.title}` : '精彩优惠券等你来兑换'; |
| 261 | const shareId = reward.value?.id || couponId.value || ''; | 261 | const shareId = reward.value?.id || couponId.value || ''; |
| 262 | - // const imageUrl = reward.value?.banner || ''; | 262 | + const imageUrl = reward.value?.thumbnail || ''; |
| 263 | 263 | ||
| 264 | const shareData = { | 264 | const shareData = { |
| 265 | title: '众多抵用优惠券等你健步积分来换', | 265 | title: '众多抵用优惠券等你健步积分来换', |
| 266 | path: addShareFlag(`/pages/RewardDetail/index?id=${shareId}`), | 266 | path: addShareFlag(`/pages/RewardDetail/index?id=${shareId}`), |
| 267 | - // imageUrl: imageUrl | 267 | + imageUrl: imageUrl |
| 268 | }; | 268 | }; |
| 269 | 269 | ||
| 270 | return shareData; | 270 | return shareData; | ... | ... |
-
Please register or login to post a comment