productContent.vue 2.5 KB

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