app-order-goods-info.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <template>
  2. <view class="app-order-goods-info">
  3. <view class='dir-left-nowrap item-box'>
  4. <image class='img box-grow-0' mode='aspectFill' :src='goods.pic_url'></image>
  5. <view class='box-grow-1'>
  6. <view class='goods-name'>{{goods.name}}</view>
  7. <view class='attr'>规格:
  8. <text v-for='item in goods.attr_list' :key='item.id'>{{item.attr_name}}</text>
  9. </view>
  10. <view class='dir-left-nowrap'>
  11. <view class='box-grow-1 goods-num'>x{{goods.num}}</view>
  12. <view class='box-grow-0' v-if="plugin == 'composition'">
  13. <view class='main-right price delete-price'>¥{{goods.total_original_price}}</view>
  14. </view>
  15. <view class='box-grow-0' v-else>
  16. <view class='main-right price'>¥{{goods.total_original_price}}</view>
  17. </view>
  18. </view>
  19. <view class="composition-price" v-if="plugin == 'composition'">
  20. 搭配套餐价<text>¥{{goods.total_price}}</text>
  21. </view>
  22. </view>
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. export default {
  28. name: 'app-order-goods-info',
  29. data() {
  30. return {}
  31. },
  32. props: {
  33. goods: {
  34. type: Object,
  35. default: {}
  36. },
  37. plugin: {
  38. type: String,
  39. default: ''
  40. },
  41. },
  42. }
  43. </script>
  44. <style scoped lang="scss">
  45. .app-order-goods-info {
  46. font-size: 24#{rpx};
  47. width: 100%;
  48. .img {
  49. width: 160#{rpx};
  50. height: 160#{rpx};
  51. margin-right: 20#{rpx};
  52. }
  53. .item-box {
  54. width: 100%;
  55. margin-bottom: 24#{rpx};
  56. }
  57. .label {
  58. color: $uni-general-color-two;
  59. }
  60. .price {
  61. color: $uni-important-color-black;
  62. &.delete-price {
  63. text-decoration: line-through;
  64. }
  65. }
  66. .composition-price {
  67. text-align: right;
  68. font-size: #{22rpx};
  69. color: #999999;
  70. text {
  71. font-size: #{28rpx};
  72. color: #353535;
  73. margin-left: #{8rpx};
  74. }
  75. }
  76. .goods-num {
  77. font-size: $uni-font-size-weak-one;
  78. color: $uni-general-color-two;
  79. }
  80. .attr {
  81. margin: 10#{rpx} 0;
  82. color: $uni-general-color-two;
  83. font-size: $uni-font-size-weak-one;
  84. display: inline-block;
  85. white-space: nowrap;
  86. width: 100%;
  87. overflow: hidden;
  88. text-overflow: ellipsis;
  89. text {
  90. margin-right: 10#{rpx};
  91. }
  92. }
  93. .goods-name {
  94. color: $uni-important-color-black;
  95. font-size: $uni-font-size-weak-one;
  96. word-break: break-all;
  97. text-overflow: ellipsis;
  98. display: -webkit-box;
  99. -webkit-box-orient: vertical;
  100. -webkit-line-clamp: 2;
  101. overflow: hidden;
  102. height: 64#{rpx};
  103. }
  104. }
  105. </style>