productContent.vue 2.7 KB

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