productContent.vue 2.5 KB

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