productContent.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <template>
  2. <view class="introduce-section">
  3. <view class="price-box">
  4. <text class="price-tip" v-if="goodsObjact.vip_price && goodsObjact.vip_price == 0">现金</text>
  5. <text class="price-tip" v-if="goodsObjact.vip_price && goodsObjact.vip_price != 0">美容院价格</text>
  6. <view class="price" v-if="goodsObjact.vip_price == 0">
  7. {{ (goodsObjact.price*1-goodsObjact.max_integral*1).toFixed(2)}}
  8. </view>
  9. <view class="price" v-if="goodsObjact.vip_price != 0">
  10. {{ (goodsObjact.vip_price*1-goodsObjact.max_integral*1).toFixed(2) }}
  11. </view>
  12. <view class="" v-if="isgold == 1" style="color: #ffac60;">
  13. 可获金豆{{goodsObjact.price}}
  14. </view>
  15. <view class="" v-if="goodsObjact.is_integral == 1" style="color: #ffac60; margin-left: 5rpx;">
  16. +金券{{goodsObjact.max_integral}}
  17. </view>
  18. <text class="m-price" v-if="goodsObjact.ot_price*1 >= goodsObjact.price*1">原价¥{{ goodsObjact.ot_price }}</text>
  19. </view>
  20. <text class="title clamp2">{{ goodsObjact.store_name }}</text>
  21. <view class="flex" style="color: #999;font-size: 22rpx;padding-top: 8rpx;">
  22. <view class="">
  23. 销量:{{goodsObjact.sales || '0'}}
  24. </view>
  25. <view class="">
  26. 库存: {{goodsObjact.stock || '0'}}
  27. </view>
  28. </view>
  29. </view>
  30. </template>
  31. <script>
  32. export default {
  33. props: {
  34. goodsObjact: {
  35. type: Object,
  36. default: function() {
  37. return {
  38. percent:1
  39. };
  40. }
  41. },
  42. isgold: {
  43. type: Number,
  44. default: 0
  45. },
  46. },
  47. filters: {
  48. parseIntTo(percent) {
  49. percent = +percent * 100;
  50. if (percent % 1 === 0) {
  51. return percent;
  52. } else {
  53. percent = percent.toFixed(1);
  54. return percent;
  55. }
  56. }
  57. },
  58. data() {
  59. return {};
  60. }
  61. };
  62. </script>
  63. <style lang="scss">
  64. /* 标题简介 */
  65. .introduce-section {
  66. position: relative;
  67. background: #fff;
  68. padding: 26rpx 24rpx 30rpx;
  69. .title {
  70. font-size: 36rpx;
  71. color: $font-color-dark;
  72. .tip-o {
  73. color: #ff3334;
  74. padding-left: 15rpx;
  75. }
  76. }
  77. .shareDate {
  78. position: absolute;
  79. top: 25rpx;
  80. right: 25rpx;
  81. font-size: 26rpx;
  82. color: #3d3f46;
  83. border-radius: 15rpx;
  84. background-color: #ffffff;
  85. height: 60rpx;
  86. line-height: 60rpx;
  87. }
  88. .share-img {
  89. width: 30rpx;
  90. height: 30rpx;
  91. position: relative;
  92. top: 5rpx;
  93. left: 0;
  94. margin-right: 10rpx;
  95. }
  96. .info {
  97. color: #999999;
  98. font-size: 26rpx;
  99. padding-bottom: 15rpx;
  100. }
  101. .progress-box {
  102. width: 260rpx;
  103. position: relative;
  104. margin-top: 15rpx;
  105. line-height: 10px;
  106. .number {
  107. font-size: 17rpx;
  108. position: absolute;
  109. z-index: 999;
  110. top: 3rpx;
  111. left: 15rpx;
  112. color: #ffffff;
  113. }
  114. }
  115. .price-box {
  116. display: flex;
  117. align-items: baseline;
  118. font-size: 26rpx;
  119. color: $uni-color-primary;
  120. }
  121. .price-tip {
  122. color: #FF4C4C;
  123. }
  124. .price {
  125. font-size: 50rpx;
  126. font-family: PingFang SC;
  127. font-weight: 800;
  128. color: #FF4C4C;
  129. }
  130. .m-price {
  131. margin: 0 12rpx;
  132. color: $font-color-light;
  133. text-decoration: line-through;
  134. font-size: 34rpx;
  135. }
  136. }
  137. </style>