order-goods.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <template>
  2. <view class="order-goods">
  3. <view v-for="(item, index) in list" :key="index" class="item-wrap">
  4. <view class="item flex" @click="jumpGoods(item)">
  5. <view class="goods-img">
  6. <u-image width="180rpx" border-radius="10rpx" height="180rpx" lazy-load
  7. :src="item.image_str || item.image"></u-image>
  8. </view>
  9. <view class="goods-info m-l-20 flex-1">
  10. <view class="goods-name line-2 m-b-10">
  11. <u-tag class="m-r-10" v-if="item.people_num" :text="item.people_num + '人团'" size="mini"
  12. type="primary" mode="plain" />
  13. {{item.goods_name || item.name}}
  14. </view>
  15. <view class="goods-spec xs muted m-b-20">{{item.spec_value || item.spec_value_str}}</view>
  16. <view class="flex row-between">
  17. <view class="goods-price ">
  18. <view class="primary flex">
  19. <price-format weight="500" :subscript-size="24" :first-size="32" :second-size="24"
  20. :price="item.price || item.goods_price" />
  21. <!-- 会员价 -->
  22. <view class="vip-price flex" v-if="item.is_member">
  23. <view class="price-name xxs">会员价</view>
  24. <view style="padding: 0 10rpx">
  25. <price-format :price="item.member_amount" :first-size="22" :second-size="22"
  26. :subscript-size="22" :weight="500" color="#7B3200" />
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. <view class="goods-num sm ">x{{item.num || item.goods_num || item.count}}</view>
  32. </view>
  33. </view>
  34. </view>
  35. <view class="goods-footer flex" v-if="link && item.comment_btn || item.refund_btn">
  36. <view class="flex-1"></view>
  37. <router-link v-if="item.comment_btn" class="m-r-20"
  38. :to="{path: '/bundle/pages/goods_reviews/goods_reviews', query:{id: item.id}}">
  39. <button size="xs" class="plain br60" hover-class="none">
  40. 评价晒图
  41. </button>
  42. </router-link>
  43. <router-link v-if="item.refund_btn"
  44. :to="{path: '/bundle/pages/apply_refund/apply_refund', query:{id: item.id, order_id: item.order_id, item_id: item.item_id}}">
  45. <button size="xs" class="plain br60" hover-class="none">
  46. 申请退款
  47. </button>
  48. </router-link>
  49. </view>
  50. </view>
  51. </view>
  52. </template>
  53. <script>
  54. export default {
  55. data() {
  56. return {};
  57. },
  58. components: {},
  59. props: {
  60. list: {
  61. type: Array,
  62. default: () => []
  63. },
  64. link: {
  65. type: Boolean,
  66. default: false
  67. },
  68. // 是否点击商品跳转
  69. isJumpGoods: {
  70. type: Boolean,
  71. default: false
  72. }
  73. },
  74. created() {
  75. setTimeout(() => {
  76. console.log(this.list)
  77. }, 700)
  78. },
  79. methods: {
  80. jumpGoods(item) {
  81. if (!this.isJumpGoods) return
  82. this.$Router.push({
  83. path: '/pages/goods_details/goods_details?id=',
  84. query: {
  85. id: item.goods_id
  86. }
  87. })
  88. }
  89. }
  90. };
  91. </script>
  92. <style lang="scss" scoped>
  93. .order-goods {
  94. .item {
  95. padding: 20rpx 24rpx;
  96. .vip-price {
  97. margin: 0 10rpx;
  98. background-color: #FFE9BA;
  99. line-height: 30rpx;
  100. border-radius: 6rpx;
  101. overflow: hidden;
  102. .price-name {
  103. background-color: #101010;
  104. padding: 3rpx 10rpx;
  105. color: #FFD4B7;
  106. position: relative;
  107. overflow: hidden;
  108. &::after {
  109. content: '';
  110. display: block;
  111. width: 20rpx;
  112. height: 20rpx;
  113. position: absolute;
  114. right: -15rpx;
  115. background-color: #FFE9BA;
  116. border-radius: 50%;
  117. top: 50%;
  118. transform: translateY(-50%);
  119. box-sizing: border-box;
  120. }
  121. }
  122. }
  123. }
  124. .goods-footer {
  125. height: 70rpx;
  126. align-items: flex-start;
  127. padding: 0 24rpx;
  128. .plain {
  129. border: 1px solid #999;
  130. height: 52rpx;
  131. line-height: 52rpx;
  132. font-size: 26rpx;
  133. }
  134. }
  135. }
  136. </style>