yd-order-product.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <template>
  2. <view>
  3. <view class="product-item" v-for="(item, index) in productList" :key="item.productId">
  4. <image class="product-image" :src="item.coverUrl"></image>
  5. <view class="item-info">
  6. <view class="info-text">
  7. <u--text :lines="1" size="15px" color="#333333" :text="item.productTitle"></u--text>
  8. <u-gap height="10"></u-gap>
  9. <yd-text-price class="product-price" size="13" intSize="16" :price="item.sellPrice"></yd-text-price>
  10. </view>
  11. <view class="price-number-box">
  12. <view class="number-box">
  13. <view class="product-number">共 {{ item.productCount }} 件</view> 小计:
  14. </view>
  15. <view class="number-box" @click.stop>
  16. <yd-text-price size="13" intSize="18" :price="item.totalPrice"></yd-text-price>
  17. </view>
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. /**
  25. * 订单商品列表
  26. */
  27. export default {
  28. name: 'yd-order-product',
  29. props: {
  30. productList: {
  31. type: Array,
  32. default: () => []
  33. }
  34. },
  35. data() {
  36. return {}
  37. },
  38. methods: {
  39. handleProductItemClick(productId) {
  40. uni.$u.route('/pages/product/product', {
  41. id: productId
  42. })
  43. }
  44. }
  45. }
  46. </script>
  47. <style lang="scss" scoped>
  48. .product-item {
  49. background: #ffffff;
  50. @include flex-space-between;
  51. border-bottom: $custom-border-style;
  52. padding: 10rpx 0 0 5rpx;
  53. .product-check {
  54. padding: 20rpx;
  55. .un-check-box {
  56. width: 20px;
  57. height: 20px;
  58. border: 1px solid #939393;
  59. border-radius: 50%;
  60. }
  61. }
  62. .product-image {
  63. width: 180rpx;
  64. height: 180rpx;
  65. border-radius: 10rpx;
  66. }
  67. .item-info {
  68. flex: 1;
  69. padding: 0 20rpx;
  70. .info-text {
  71. padding-bottom: 10rpx;
  72. .product-price {
  73. margin-top: 15rpx;
  74. }
  75. }
  76. .price-number-box {
  77. @include flex-space-between;
  78. .number-box {
  79. font-size: 24rpx;
  80. .product-number {
  81. width: 200rpx;
  82. }
  83. }
  84. .number-box {
  85. height: 60rpx;
  86. @include flex-center;
  87. }
  88. }
  89. }
  90. }
  91. </style>