购物车逻辑调整
This commit is contained in:
@@ -42,7 +42,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class='recommend-view c-flex-column' v-if='recommendList?.length>0'>
|
||||
<view class='recommend-view c-flex-column' v-if='(recommendList?.length||0)>0'>
|
||||
<text>浏览此商品的客户还浏览了</text>
|
||||
<scroll-view scroll-x>
|
||||
<view style='display: inline-block' v-for='(item, index) in recommendList'
|
||||
@@ -78,7 +78,7 @@
|
||||
<view class='small-button-item'>
|
||||
<view class='shoppingcart-count' @click.stop='goPath("/pages/mall/subs/shoppingcart/index")'>
|
||||
<image :src='assetsUrl("ic_goods_shoppingcart.png")' />
|
||||
<text v-if='shoppingCartList.length>0'>{{ shoppingCartList.length }}</text>
|
||||
<text v-if='totalCount>0'>{{ totalCount }}</text>
|
||||
</view>
|
||||
<text>购物车</text>
|
||||
</view>
|
||||
@@ -102,7 +102,7 @@ import { GoodsBean } from '@/api/goods/types';
|
||||
import useShoppingCartStore from '@/store/modules/shoppingcart';
|
||||
|
||||
const shoppingCartStore = useShoppingCartStore();
|
||||
const { shoppingCartList } = storeToRefs(shoppingCartStore);
|
||||
const { totalCount } = storeToRefs(shoppingCartStore);
|
||||
|
||||
const goodsBean = ref<GoodsBean>();
|
||||
const recommendList = ref<GoodsBean[]>();
|
||||
|
Reference in New Issue
Block a user