Files
xdd-uniapp-new/components/OrderGoods.vue
T
2024-04-24 14:36:24 +08:00

128 lines
2.9 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="total 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">
{{ title }}
</text>
</view>
</view>
<view
v-else
class="total"
>{{ cartInfo.length }}件商品</view>
<view class="goodWrapper">
<view
v-for="cart in cartInfo"
:key="cart.id"
class="item acea-row row-between-wrapper"
style="flex-wrap: nowrap;"
>
<view class="pictrue" style="margin-right: 20rpx;">
<image :src="cart.productInfo.image" class="image" />
</view>
<view class="text">
<view class="acea-row row-between-wrapper">
<view class="name line1 one-t">{{ cart.productInfo.storeName }}</view>
</view>
<view class="acea-row row-middle row-between attr-wrap">
<view
v-if="cart.productInfo.attrInfo"
class="attr more-t"
>
规格{{ 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">
<text>{{ cart.truePrice }}</text>
<text class="num">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: "/pages/shop/GoodsEvaluate/index",
query: { id: cart.unique }
});
}
}
};
</script>
<style scoped>
.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;
}
.attr-wrap {
position: relative;
min-height: 80rpx;
margin-top: 8rpx;
align-items: flex-start;
}
.text .attr {
max-width: calc(100% - 130rpx);
margin: 0 !important;
padding: 4rpx 20rpx;
border-radius: 19rpx;
line-height:38rpx;
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>