Files
xdd-uniapp-new/components/OrderGoods.vue
T
2026-05-12 15:19:37 +08:00

138 lines
3.4 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<view class="orderGoods">
<view
v-if="title.length > 0"
class="v12-pa-3 acea-row row-middle"
>
<view
style="position: relative;"
class="acea-row row-left row-middle"
>
<!-- <image
style="width: 32rpx;height: 32rpx;margin-right: 12rpx;"
src="http://admin-api.xdd618.com/file/pic/20210807230759738342.png" mode=""
/> -->
<text class="title v12-font-32">
{{ title }}
</text>
</view>
</view>
<view
v-else
class=""
>{{ cartInfo.length }}件商品</view>
<view class="goodWrapper">
<view
v-for="cart in cartInfo"
:key="cart.id"
class="item acea-row row-between-wrapper v12-mt-3"
style="flex-wrap: nowrap; border:none"
>
<view class="pictrue" style="margin-right: 20rpx;">
<image :src="cart.productInfo.image" class="image" />
</view>
<view class="text" style="height: 100%;justify-content: space-between;">
<view class="acea-row row-between-wrapper">
<view class="name line1 one-t v12-font-bold">{{ cart.productInfo.storeName }}</view>
</view>
<view class="acea-row row-middle row-between attr-wrap">
<view
v-if="cart.productInfo.attrInfo"
class="more-t v12-font-24 v12-secondary-dark-text"
>
规格{{ cart.productInfo.attrInfo.sku }}
</view>
<view
v-if="evaluate == 3"
class="evaluate"
@click="routerGo(cart)"
>评价</view>
</view>
<view class="money font-color-lightred acea-row row-between">
<view class="v12-font-bold">
<text class="v12-font-28 v12-dark-text">应付</text>
<text class="v12-font-22"></text>
<text class="v12-primary-text v12-font-28">{{ cart.truePrice }}</text>
</view>
<text class="num v12-dark-text">x{{ cart.cartNum }}</text>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
name: "OrderGoods",
props: {
evaluate: Number,
cartInfo: {
type: Array,
default: () => []
},
title:{
type: String,
default:''
}
},
data: function() {
return {};
},
mounted: function() {},
methods: {
routerGo(cart) {
this.$yrouter.push({
path: "/pagesShop/shop/GoodsEvaluate/index",
query: { id: cart.unique }
});
}
}
};
</script>
<style scoped>
.orderGoods{
border-radius: 20rpx 20rpx 0 0;
}
.item{
height: 160rpx !important;
}
.title{
font-size:26rpx;
color:#080F1A;
font-weight: bold;
}
.goodWrapper .item .pictrue {
width: 160rpx;
height: 160rpx;
}
.goodWrapper .item .pictrue .image {
display: block;
width: 160rpx;
height: 160rpx;
border-radius: 16rpx;
}
.attr-wrap {
position: relative;
margin-top: 8rpx;
align-items: flex-start;
}
.text .attr {
max-width: calc(100% - 130rpx);
margin: 0 !important;
padding: 6rpx 20rpx;
border-radius: 20rpx;
line-height: 28rpx;
box-sizing: border-box;
background-color: #FFF3F2;
}
.evaluate {
position: relative;
top: 0;
height: 36rpx;
width: 90rpx;
border-radius: 36rpx !important;
line-height: 36rpx;
font-size: 28rpx;
}
</style>