优化
This commit is contained in:
@@ -12,8 +12,12 @@
|
||||
<view v-for='(item, index) in goodsList' :key='index' class='goods-item'
|
||||
@click.stop='goPath(`/pages/mall/subs/goods/detail?goodsId=${item.goodsId}`)'>
|
||||
<image class='goods-image' :src='item.images||defaultImage' />
|
||||
<text class='goods-name'>{{ item.goodsName||'未知' }}</text>
|
||||
<text class='goods-price'>¥{{ item.price }}</text>
|
||||
<text class='goods-name'>{{ item.goodsName || '未知' }}</text>
|
||||
<text class='goods-price'>¥{{ (item.price * ((userInfo.levelEntity?.discount || 100)/100)).toFixed(2) }}
|
||||
<text v-if='userInfo.levelEntity?.discount>0'
|
||||
style='text-decoration: line-through;color: #999999;font-size: 25rpx'>¥{{ item.price }}
|
||||
</text>
|
||||
</text>
|
||||
<image class='add-image' :src='assetsUrl("ic_add_goods.png")' @click.stop='addShoppingCart(item)' />
|
||||
</view>
|
||||
</grid-view>
|
||||
@@ -29,10 +33,14 @@ import { goPath } from '@/utils';
|
||||
import { getGoodsList } from '@/api/goods';
|
||||
import useShoppingCartStore from '@/store/modules/shoppingcart';
|
||||
import { GoodsBean } from '@/api/goods/types';
|
||||
import { useUserStore } from '@/store';
|
||||
|
||||
const skuDialogRef = ref();
|
||||
const shoppingCartStore = useShoppingCartStore();
|
||||
|
||||
const userStore = useUserStore();
|
||||
const { userInfo } = storeToRefs(userStore);
|
||||
|
||||
const goodsList = ref<GoodsBean[]>([]);
|
||||
|
||||
onLoad((e) => {
|
||||
|
Reference in New Issue
Block a user