Files
xdd-uniapp-new/components/OrderGoods.vue
T

89 lines
2.7 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 class="acea-row row-left row-middle" style="position: relative;">
<image style="width: 32rpx;height: 32rpx;margin-right: 12rpx;" src="http://admin-api.xdd618.com/file/pic/20210807230759738342.png" mode=""></image>
<text class="title">{{title}}</text>
<!-- <text class="pink-dot"></text> -->
</view>
</view>
<view v-else class="total">{{ cartInfo.length }}件商品</view>
<view class="goodWrapper">
<view class="item acea-row row-between-wrapper" style="flex-wrap: nowrap;" v-for="cart in cartInfo" :key="cart.id">
<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">{{ cart.productInfo.storeName }}</view>
<!-- <view class="num">x {{ cart.cartNum }}</view> -->
</view>
<!-- <view
class="attr line1"
v-if="cart.productInfo.attrInfo"
>{{ cart.productInfo.attrInfo.sku }}</view> -->
<view class="acea-row row-middle row-between">
<view
class="attr"
style="height: 38rpx;line-height:38rpx;background-color: #FFF3F2;border-radius: 19rpx;padding: 4rpx 20rpx;"
v-if="cart.productInfo.attrInfo"
>规格{{ cart.productInfo.attrInfo.sku }}</view>
<view v-if="evaluate == 3" class="evaluate" style="bottom: 0 !important;position: relative;height: 36rpx !important;width: 90rpx !important;line-height: 36rpx !important;font-size: 32rpx;border-radius: 18rpx;" @click="routerGo(cart)">评价</view>
</view>
<view class="money font-color-lightred acea-row row-between">
<text>{{ cart.truePrice }}</text>
<text class="num" style="margin-left: 10rpx;">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>
.pink-dot{
width:24rpx;
height:24rpx;
background:rgba(255,86,74,0.4);
border-radius:50%;
position: absolute;
z-index: 0;
bottom: 24rpx;
right: -12rpx;
}
.title{
font-size:26rpx;
color:#080F1A;
font-weight: bold;
}
</style>