productContent.vue 2.0 KB

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