productContent.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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. </view>
  12. </template>
  13. <script>
  14. export default {
  15. props: {
  16. goodsObjact: {
  17. type: Object,
  18. default: function() {
  19. return {
  20. percent:1
  21. };
  22. }
  23. }
  24. },
  25. filters: {
  26. parseIntTo(percent) {
  27. percent = +percent * 100;
  28. if (percent % 1 === 0) {
  29. return percent;
  30. } else {
  31. percent = percent.toFixed(1);
  32. return percent;
  33. }
  34. }
  35. },
  36. data() {
  37. return {};
  38. }
  39. };
  40. </script>
  41. <style lang="scss">
  42. /* 标题简介 */
  43. .introduce-section {
  44. position: relative;
  45. background: #fff;
  46. padding: 26rpx 24rpx 30rpx;
  47. .title {
  48. font-size: 36rpx;
  49. color: $font-color-dark;
  50. .tip-o {
  51. color: #ff3334;
  52. padding-left: 15rpx;
  53. }
  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. font-size: 26rpx;
  97. color: $uni-color-primary;
  98. }
  99. .price-tip {
  100. color: #FF4C4C;
  101. }
  102. .price {
  103. font-size: 50rpx;
  104. font-family: PingFang SC;
  105. font-weight: 800;
  106. color: #FF4C4C;
  107. }
  108. .m-price {
  109. margin: 0 12rpx;
  110. color: $font-color-light;
  111. text-decoration: line-through;
  112. font-size: 34rpx;
  113. }
  114. }
  115. </style>