KlonContent.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <template>
  2. <view class="introduce-section">
  3. <text class="title clamp">{{ goodsObjact.title }}</text>
  4. <text class="info" v-if="goodsObjact.store_info">{{ goodsObjact.store_info }}</text>
  5. <view class="progress-box">
  6. <progress :percent="goodsObjact.percent | parseIntTo" activeColor="#F65527" font-size="10" show-info border-radius="5" stroke-width="9" />
  7. <view class="number">剩余{{ goodsObjact.percent | parseIntTo }}%</view>
  8. </view>
  9. <view class="price-box">
  10. <text class="price-tip">¥</text>
  11. <view class="price">
  12. {{ goodsObjact.price }}
  13. <text class="text">/份</text>
  14. <text class="m-price" v-if="goodsObjact.ot_price > goodsObjact.price">¥{{ goodsObjact.ot_price }}</text>
  15. </view>
  16. </view>
  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: 32rpx;
  60. color: $font-color-dark;
  61. height: 50rpx;
  62. width: 70%;
  63. .tip-o {
  64. color: #ff3334;
  65. padding-left: 15rpx;
  66. }
  67. }
  68. .shareDate {
  69. position: absolute;
  70. top: 25rpx;
  71. right: 25rpx;
  72. font-size: 26rpx;
  73. color: #3d3f46;
  74. border-radius: 15rpx;
  75. background-color: #ffffff;
  76. height: 60rpx;
  77. line-height: 60rpx;
  78. }
  79. .share-img {
  80. width: 30rpx;
  81. height: 30rpx;
  82. position: relative;
  83. top: 5rpx;
  84. left: 0;
  85. margin-right: 10rpx;
  86. }
  87. .info {
  88. color: #999999;
  89. font-size: 26rpx;
  90. padding-bottom: 15rpx;
  91. }
  92. .progress-box {
  93. width: 260rpx;
  94. position: relative;
  95. margin-top: 15rpx;
  96. line-height: 10px;
  97. .number {
  98. font-size: 17rpx;
  99. position: absolute;
  100. z-index: 99;
  101. top: 3rpx;
  102. left: 15rpx;
  103. color: #ffffff;
  104. }
  105. }
  106. .price-box {
  107. display: flex;
  108. align-items: baseline;
  109. height: 64rpx;
  110. padding: 10rpx 0;
  111. font-size: 26rpx;
  112. color: $uni-color-primary;
  113. }
  114. .price {
  115. font-size: $font-lg + 6rpx;
  116. .text {
  117. padding-left: 5rpx;
  118. color: #b0b0b0;
  119. font-size: 22rpx !important;
  120. }
  121. }
  122. .price-green {
  123. color: #2dbd59;
  124. font-size: 28rpx !important;
  125. text {
  126. background: #2dbd59;
  127. color: #ffffff;
  128. padding: 0rpx 10rpx;
  129. border-radius: 5rpx;
  130. font-size: 22rpx !important;
  131. margin-left: 15rpx;
  132. }
  133. }
  134. .m-price {
  135. margin: 0 12rpx;
  136. color: $font-color-light;
  137. text-decoration: line-through;
  138. margin-left: 25rpx;
  139. font-size: 24rpx;
  140. }
  141. }
  142. </style>