productContent.vue 2.9 KB

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