dingdong-mall/components/goods-card/vertical-goods-card.vue

54 lines
1.4 KiB
Vue
Raw Normal View History

2022-03-15 17:38:58 +08:00
<template>
<view>
<view class="cu-bar bg-white solid-bottom margin-top-sm">
<view class="action">
<text class="cuIcon-titles text-main-color"></text> {{title}}
2022-03-15 17:38:58 +08:00
</view>
</view>
<view class="cu-card case no-card solid-bottom" v-for="(item, index) in goodsInfos" :key="index" @click="showDetails(item)">
2022-03-15 17:38:58 +08:00
<view class="cu-item shadow">
<view class="image">
2022-06-07 11:23:36 +08:00
<image :src="item.goodsImgUrl" mode="aspectFill"></image>
2022-03-15 17:38:58 +08:00
</view>
<view class="cu-item item-margin-custom">
<view class="content flex-sub">
2022-06-07 11:23:36 +08:00
<view class="text-xl">{{item.goodsName}}</view>
<view class="text-sm text-gray margin-tb-xs">{{item.remark}}</view>
2022-03-15 17:38:58 +08:00
<view class="flex justify-between align-end">
<view class="text-red text-sm">自营直选不满意重新服务全程上险</view>
2022-06-07 11:23:36 +08:00
<view class="text-red text-price text-xl">{{item.goodsStandardList[0].goodsPrice}}</view>
2022-03-15 17:38:58 +08:00
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
2022-04-01 16:54:10 +08:00
name: "vertical-goods-card",
2022-03-15 17:38:58 +08:00
props: {
title: '',
goodsInfos: {
type: Array,
default: []
}
},
data() {
return {};
},
methods: {
showDetails(productItem) {
2022-04-01 16:54:10 +08:00
uni.$emit('index_showProductDetail', productItem)
}
2022-03-15 17:38:58 +08:00
}
}
</script>
<style scoped>
.item-margin-custom {
margin: 10rpx 30rpx 30rpx 30rpx;
2022-03-15 17:38:58 +08:00
}
</style>