share-buy-product-info.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <template>
  2. <view class="product-info">
  3. <view class="product">
  4. <image class="cover" :src="goodsData.productImage" mode="widthFix"></image>
  5. <view class="product-content">
  6. <view class="name" v-text="goodsData.productName"></view>
  7. <view class="unit">规格:{{ goodsData.unit }}</view>
  8. <view class="tags">
  9. <view class="tag pt">{{ goodsData.memberNum }}人拼团价</view>
  10. </view>
  11. <view class="row">
  12. <view class="price">¥{{ goodsData.price | priceFormat }}</view>
  13. <view class="delete" v-if="goodsData.normalPrice">单买价¥{{ goodsData.normalPrice | priceFormat }}</view>
  14. </view>
  15. </view>
  16. </view>
  17. <view class="service">
  18. <view class="iconfont icon-wuyoushouhou"><text>无忧退货</text></view>
  19. <view class="iconfont icon-wuyoushouhou"><text>快速退款</text></view>
  20. <view class="iconfont icon-wuyoushouhou"><text>正品保证</text></view>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. export default {
  26. name: 'share-buy-product-info',
  27. props: {
  28. goodsData: {
  29. type: Object,
  30. default: () => {}
  31. }
  32. }
  33. }
  34. </script>
  35. <style lang="scss" scoped>
  36. .product-info {
  37. background-color: #fff;
  38. .product {
  39. @extend .cm-flex-between;
  40. padding: 50rpx 24rpx 60rpx;
  41. .cover {
  42. width: 180rpx;
  43. height: 180rpx;
  44. border-radius: 12rpx;
  45. box-sizing: border-box;
  46. border: 1rpx dashed #e1e1e1;
  47. }
  48. .content {
  49. position: relative;
  50. display: flex;
  51. flex-direction: column;
  52. justify-content: center;
  53. flex: 1;
  54. margin-left: 16rpx;
  55. }
  56. .name {
  57. @include ellipsis(2);
  58. width: 500rpx;
  59. min-height: 68rpx;
  60. font-size: 26rpx;
  61. color: #333333;
  62. }
  63. .tip {
  64. margin-top: 80rpx;
  65. font-size: 26rpx;
  66. color: #f83c6c;
  67. }
  68. .unit {
  69. min-height: 28rpx;
  70. font-size: 20rpx;
  71. color: #999999;
  72. }
  73. .tags {
  74. min-height: 30rpx;
  75. }
  76. .buy-num {
  77. position: absolute;
  78. right: 0;
  79. bottom: 0;
  80. font-size: 26rpx;
  81. }
  82. .row {
  83. @extend .cm-flex-center;
  84. justify-content: flex-start;
  85. .price {
  86. font-size: 26rpx;
  87. font-weight: 600;
  88. color: #f83c6c;
  89. }
  90. .delete {
  91. font-size: 20rpx;
  92. color: #999;
  93. margin-left: 32rpx;
  94. }
  95. }
  96. }
  97. .service {
  98. @extend .cm-flex-around;
  99. color: #ff457b;
  100. width: 750rpx;
  101. height: 72rpx;
  102. background: #fff8fd;
  103. box-sizing: border-box;
  104. .iconfont {
  105. font-size: 24rpx;
  106. line-height: 24rpx;
  107. text {
  108. color: #ff457b;
  109. margin-left: 4rpx;
  110. }
  111. }
  112. }
  113. }
  114. </style>