.
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
<block v-if="modelValue.favorite">
|
||||
<image
|
||||
class="item-icon"
|
||||
:src="sheep.$url.static('/static/img/shop/goods/collect_1.gif')"
|
||||
:src="sheep.$url.static('https://puton.huimeimeta.com/imgs/collect_1.gif')"
|
||||
mode="aspectFit"
|
||||
/>
|
||||
<view class="item-title">已收藏</view>
|
||||
@@ -19,7 +19,7 @@
|
||||
<block v-else>
|
||||
<image
|
||||
class="item-icon"
|
||||
:src="sheep.$url.static('/static/img/shop/goods/collect_0.png')"
|
||||
:src="sheep.$url.static('https://puton.huimeimeta.com/imgs/collect_0.png')"
|
||||
mode="aspectFit"
|
||||
/>
|
||||
<view class="item-title">收藏</view>
|
||||
@@ -32,7 +32,7 @@
|
||||
>
|
||||
<image
|
||||
class="item-icon"
|
||||
:src="sheep.$url.static('/static/img/shop/goods/message.png')"
|
||||
:src="sheep.$url.static('https://puton.huimeimeta.com/imgs/message.png')"
|
||||
mode="aspectFit"
|
||||
/>
|
||||
<view class="item-title">客服</view>
|
||||
@@ -44,7 +44,7 @@
|
||||
>
|
||||
<image
|
||||
class="item-icon"
|
||||
:src="sheep.$url.static('/static/img/shop/goods/share.png')"
|
||||
:src="sheep.$url.static('https://puton.huimeimeta.com/imgs/share.png')"
|
||||
mode="aspectFit"
|
||||
/>
|
||||
<view class="item-title">分享</view>
|
||||
@@ -119,15 +119,15 @@
|
||||
if (props.modelValue.favorite) {
|
||||
const { code } = await FavoriteApi.deleteFavorite(props.modelValue.id);
|
||||
if (code !== 0) {
|
||||
return
|
||||
return;
|
||||
}
|
||||
sheep.$helper.toast('取消收藏');
|
||||
props.modelValue.favorite = false;
|
||||
// 情况二:添加收藏
|
||||
// 情况二:添加收藏
|
||||
} else {
|
||||
const { code } = await FavoriteApi.createFavorite(props.modelValue.id);
|
||||
if (code !== 0) {
|
||||
return
|
||||
return;
|
||||
}
|
||||
sheep.$helper.toast('收藏成功');
|
||||
props.modelValue.favorite = true;
|
||||
|
||||
Reference in New Issue
Block a user