productContent.vue 3.2 KB

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