productContent.vue 2.2 KB

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