|
|
@@ -79,7 +79,7 @@
|
|
|
>
|
|
|
<image
|
|
|
class="recommend-img"
|
|
|
- :src="item.image || item.coverImage || '/static/default-product.png'"
|
|
|
+ :src="getImageUrl(item.image || item.coverImage) || '/static/default-product.png'"
|
|
|
mode="aspectFill"
|
|
|
/>
|
|
|
<text class="recommend-name">{{ item.name }}</text>
|
|
|
@@ -112,7 +112,7 @@
|
|
|
>
|
|
|
<image
|
|
|
class="cover"
|
|
|
- :src="item.image || item.coverImage || '/static/default-product.png'"
|
|
|
+ :src="getImageUrl(item.image || item.coverImage) || '/static/default-product.png'"
|
|
|
mode="aspectFill"
|
|
|
/>
|
|
|
<view class="card-body">
|
|
|
@@ -143,6 +143,7 @@
|
|
|
|
|
|
<script>
|
|
|
import { goodsCategory, productList, getMyMembership } from '@/utils/api.js'
|
|
|
+import config from '@/config.js'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -278,6 +279,9 @@ export default {
|
|
|
formatPriceWithSymbol(price) {
|
|
|
if (price === null || price === undefined) return ''
|
|
|
return '¥' + parseFloat(price).toFixed(2)
|
|
|
+ },
|
|
|
+ getImageUrl: function(path) {
|
|
|
+ return config.API_BASE_URL + path
|
|
|
}
|
|
|
}
|
|
|
}
|