productContent.vue 3.2 KB

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