commodity.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <template>
  2. <view class="list">
  3. <view class="merchant"
  4. ><image class="merchant-img" :src="goodsList.image" mode="scaleToFill" />
  5. <view class="merchant-name">{{ goodsList.merchant_name }}</view>
  6. </view>
  7. <view v-for="item in goodsList.order_goods" :key="item.id" class="detail">
  8. <image :src="item.sku_item.image" class="detail-img" mode=""></image>
  9. <view class="detail-right">
  10. <view class="">
  11. <text class="toptitle">{{ item.goods.name_cn }}</text>
  12. <view class="weight">{{ item.sku_item.item }} </view>
  13. </view>
  14. <view class="u-flex u-row-between">
  15. <view class="money">
  16. <text>¥</text>
  17. <text style="font-size: 34rpx">{{ item.sku_item.price }}</text>
  18. </view>
  19. <view class="stepping">
  20. <u-icon name="minus" size="12"></u-icon>
  21. <text>{{ goodsValue }}</text>
  22. <u-icon name="plus" size="12"></u-icon>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. export default {
  31. props: {
  32. //商品列表
  33. goodsList: {
  34. typeof: Array,
  35. default: () => {
  36. return [];
  37. },
  38. },
  39. goodsValue: {
  40. typeof: Number,
  41. default: 0,
  42. },
  43. },
  44. };
  45. </script>
  46. <style scoped lang="scss">
  47. .list {
  48. margin-top: 20rpx;
  49. background-color: #fff;
  50. border-radius: 16rpx;
  51. padding: 28rpx 26rpx 36rpx 24rpx;
  52. .merchant {
  53. display: flex;
  54. justify-content: flex-start;
  55. .merchant-img {
  56. width: 38rpx;
  57. height: 38rpx;
  58. margin-right: 16rpx;
  59. }
  60. .merchant-name {
  61. font-size: 30rpx;
  62. color: #222;
  63. }
  64. }
  65. .detail {
  66. margin-top: 32rpx;
  67. display: flex;
  68. .detail-img {
  69. width: 184rpx;
  70. height: 184rpx;
  71. margin-right: 24rpx;
  72. }
  73. .detail-right {
  74. flex-direction: column;
  75. justify-content: space-between;
  76. height: 184rpx;
  77. display: flex;
  78. flex: 1;
  79. .toptitle {
  80. font-family: PingFangSC, PingFang SC;
  81. font-size: 28rpx;
  82. color: #222222;
  83. width: 100%;
  84. overflow: hidden;
  85. text-overflow: ellipsis;
  86. -webkit-line-clamp: 1;
  87. display: -webkit-box;
  88. -webkit-box-orient: vertical;
  89. word-break: break-all;
  90. margin-bottom: 16rpx;
  91. }
  92. .weight {
  93. font-family: PingFangSC, PingFang SC;
  94. font-size: 24rpx;
  95. color: rgba(34, 34, 34, 0.6);
  96. line-height: 34rpx;
  97. }
  98. .money {
  99. font-family: HarmonyOS_Sans_Medium;
  100. font-size: 24rpx;
  101. color: #f83224;
  102. line-height: 38rpx;
  103. text-align: left;
  104. font-style: normal;
  105. // font-weight: 500;
  106. font-weight: bold;
  107. }
  108. .stepping {
  109. display: flex;
  110. width: 140rpx;
  111. height: 40rpx;
  112. justify-content: space-around;
  113. align-items: center;
  114. font-size: 20rpx;
  115. border: 2rpx solid rgba(151, 151, 151, 0.4);
  116. border-radius: 20rpx;
  117. }
  118. }
  119. }
  120. }
  121. </style>