|
@@ -25,7 +25,7 @@
|
|
|
>
|
|
>
|
|
|
<!-- 商品卡片 -->
|
|
<!-- 商品卡片 -->
|
|
|
<template v-if="item.type === 'product'">
|
|
<template v-if="item.type === 'product'">
|
|
|
- <image class="feed-img" :src="item.coverImage || '/static/default-product.png'" mode="aspectFill" />
|
|
|
|
|
|
|
+ <image class="feed-img" :src="getImageUrl(item.coverImage) || '/static/default-product.png'" mode="aspectFill" />
|
|
|
<view class="feed-info">
|
|
<view class="feed-info">
|
|
|
<view class="feed-tag-row">
|
|
<view class="feed-tag-row">
|
|
|
<text class="feed-type-badge product-badge">🛍️ 商品</text>
|
|
<text class="feed-type-badge product-badge">🛍️ 商品</text>
|
|
@@ -38,7 +38,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
<!-- 活动卡片 -->
|
|
<!-- 活动卡片 -->
|
|
|
<template v-else-if="item.type === 'activity'">
|
|
<template v-else-if="item.type === 'activity'">
|
|
|
- <image class="feed-img" :src="item.coverImage || '/static/default-activity.png'" mode="aspectFill" />
|
|
|
|
|
|
|
+ <image class="feed-img" :src="getImageUrl(item.coverImage) || '/static/default-activity.png'" mode="aspectFill" />
|
|
|
<view class="feed-info">
|
|
<view class="feed-info">
|
|
|
<view class="feed-tag-row">
|
|
<view class="feed-tag-row">
|
|
|
<text class="feed-type-badge activity-badge">🔥 活动</text>
|
|
<text class="feed-type-badge activity-badge">🔥 活动</text>
|
|
@@ -60,6 +60,8 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
|
+import config from '@/config.js'
|
|
|
|
|
+
|
|
|
export default {
|
|
export default {
|
|
|
props: {
|
|
props: {
|
|
|
products: { type: Array, default: function() { return [] } },
|
|
products: { type: Array, default: function() { return [] } },
|
|
@@ -124,6 +126,9 @@ export default {
|
|
|
getStatusClass: function(status) {
|
|
getStatusClass: function(status) {
|
|
|
var map = { upcoming: 'status-upcoming', ongoing: 'status-ongoing', ended: 'status-ended' }
|
|
var map = { upcoming: 'status-upcoming', ongoing: 'status-ongoing', ended: 'status-ended' }
|
|
|
return map[status] || ''
|
|
return map[status] || ''
|
|
|
|
|
+ },
|
|
|
|
|
+ getImageUrl: function(path) {
|
|
|
|
|
+ return config.API_BASE_URL + path
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|