Files
xdd-uniapp-new/components/GoodList.vue
T
2023-09-20 21:49:33 +08:00

55 lines
1.5 KiB
Vue

<template>
<view class="goodList">
<view @click="routerGo(item)" class="item acea-row row-between-wrapper" v-for="(item, goodlistIndex) in goodList" :key="goodlistIndex">
<view class="pictrue">
<image :src="item.image" class="image" />
</view>
<view class="underline">
<view class="text">
<view class="line1">{{ item.storeName }}</view>
<view class="money font-color-red">
<!-- <text class="num">{{ force2Decimal(item.price) }}</text> -->
<text
class="num"
v-if="item.vipPrice && item.vipPrice > 0"
>{{force2Decimal(item.vipPrice)}}</text>
<text class="num" v-else>{{ force2Decimal(item.price) }}</text>
</view>
<view class="vip-money acea-row row-middle">
<view class="vip">{{ item.otPrice?force2Decimal(item.otPrice) : 0.00 }}</view>
<text class="num">已售{{ item.sales }}{{ item.unitName }}</text>
</view>
</view>
</view>
<view class="iconfont icon-gouwuche cart-color acea-row row-center-wrapper"></view>
</view>
</view>
</template>
<script>
export default {
name: "GoodList",
props: {
goodList: {
type: Array,
default: () => []
},
isSort: {
type: Boolean,
default: true
}
},
data: function() {
return {};
},
methods:{
force2Decimal(value){
return this.$force2Decimal(value);
},
routerGo(item) {
this.$yrouter.push({ path: '/pages/shop/GoodsCon/index', query: { id: item.id } });
}
}
};
</script>