1
0

detail-ad.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <template>
  2. <view class="detail-ad dir-left-nowrap main-between" :class="theme === 'a' ? 'default' : theme + '-m-back ' + theme">
  3. <view class="app-title">
  4. <text class="icon-text">限时预售</text>
  5. <view class="price">
  6. <view class="current">
  7. ¥{{detail.price_min === detail.price_max?detail.price_min:`${detail.price_min}~${detail.price_max}`}}
  8. <text>历史最低</text>
  9. </view>
  10. <view class="original">¥{{detail.original_price}}</view>
  11. </view>
  12. </view>
  13. <view class="app-content dir-top-nowrap" style="background-color: #FAC4D1;padding-left: 24rpx;">
  14. <text class="app-text" style="color: #F95C87;">距离结束仅剩</text>
  15. <view class="app-time cross-center main-around">
  16. <text class="app-num app-right" v-if="day > 0">{{d}}</text>
  17. <text style="color: #FF3A67;" v-if="day > 0">天</text>
  18. <text class="app-num app-right">{{h}}</text>
  19. <text style="color: #FF3A67;">时</text>
  20. <text class="app-num app-right">{{m}}</text>
  21. <text style="color: #FF3A67;">分</text>
  22. <text class="app-num app-right">{{s}}</text>
  23. <text style="color: #FF3A67;">秒</text>
  24. </view>
  25. </view>
  26. </view>
  27. </template>
  28. <script>
  29. export default {
  30. name: "detail-ad",
  31. props: {
  32. sales: {
  33. type: Number,
  34. default() {
  35. return 0;
  36. }
  37. },
  38. d: {
  39. type: Number,
  40. default() {
  41. return 0;
  42. }
  43. },
  44. h: {
  45. type: Number,
  46. default() {
  47. return 0;
  48. }
  49. },
  50. m: {
  51. type: Number,
  52. default() {
  53. return 0;
  54. }
  55. },
  56. s: {
  57. type: Number,
  58. default() {
  59. return 0;
  60. }
  61. },
  62. theme: String,
  63. detail: Object,
  64. }
  65. }
  66. </script>
  67. <style scoped lang="scss">
  68. .detail-ad {
  69. width: #{750rpx};
  70. height: #{100rpx};
  71. position: relative;
  72. display: flex;
  73. .app-image {
  74. width: #{750rpx};
  75. height: #{100rpx};
  76. background-repeat: no-repeat;
  77. background-size: 100% 100%;
  78. }
  79. .app-title {
  80. width: #{430rpx};
  81. color: white;
  82. font-size: #{22rpx};
  83. display: flex;
  84. align-items: center;
  85. padding-left: 20rpx;
  86. flex: 1;
  87. position: relative;
  88. overflow: hidden;
  89. background: linear-gradient(to right, #FB3B62, #FF3E7A,#FF478D);
  90. &:after{
  91. content: '';
  92. position: absolute;
  93. width: 70rpx;
  94. height: 70rpx;
  95. bottom: 0;
  96. right: 230rpx;
  97. background: url("../../../plugins/miaosha/image/icon-clock.png") no-repeat;
  98. transform: rotate(-45deg);
  99. z-index: 0;
  100. opacity: .85;
  101. }
  102. .icon-text{
  103. background: #d73155;
  104. width: 100rpx;
  105. height: 85%;
  106. font-size: 30rpx;
  107. display: block;
  108. border-radius: 10rpx;
  109. text-align: center;
  110. padding: 0 10rpx;
  111. }
  112. .price{
  113. display: flex;
  114. flex-direction: column;
  115. color: #ffffff;
  116. margin-left: 10rpx;
  117. .current{
  118. font-size: 36rpx;
  119. text{
  120. background: #d73155;
  121. border-radius: 10rpx;
  122. padding: 5rpx 10rpx;
  123. margin-left: 10rpx;
  124. font-size: 24rpx;
  125. }
  126. }
  127. .original{
  128. font-size: 22rpx;
  129. text-decoration: line-through;
  130. }
  131. }
  132. }
  133. .app-content {
  134. background: #FAC4D1;
  135. position: absolute;
  136. right: 0;
  137. top: 0;
  138. height: #{100rpx};
  139. width: #{230rpx};
  140. .app-text {
  141. font-size: #{22rpx};
  142. color: #ffffff;
  143. text-align: center;
  144. margin-top: #{6rpx};
  145. }
  146. .over-text {
  147. font-size: #{32rpx};
  148. line-height: #{100rpx};
  149. margin-top: 0;
  150. }
  151. .app-time {
  152. color: white;
  153. height: #{40rpx};
  154. font-size: #{26rpx};
  155. margin-top: #{6rpx};
  156. .app-num {
  157. display: inline-block;
  158. width: #{44rpx};
  159. height: #{40rpx};
  160. line-height: #{40rpx};
  161. // background-color:white;
  162. background-color: #FF3A67;
  163. border-radius: #{8rpx};
  164. // color: #353535;
  165. color: #fff;
  166. text-align: center;
  167. }
  168. .app-right {
  169. margin: 0 #{4rpx};
  170. }
  171. }
  172. }
  173. }
  174. .default {
  175. background:linear-gradient(to right, #ff5527, #ff2755);
  176. }
  177. </style>