detail-ad.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <template>
  2. <view class="detail-ad dir-left-nowrap main-between" :class="theme === 'a' ? 'default' : theme + '-m-back ' + theme">
  3. <view class="text dir-left-nowrap main-between cross-center">
  4. <text class="title">预售</text>
  5. <text class="count">已抢{{sales}}件</text>
  6. </view>
  7. <view class="count-down dir-top-nowrap" style="margin-bottom: 12rpx;">
  8. <text class="advance-title">距定金截止</text>
  9. <view class="dir-left-nowrap main-center cross-center">
  10. <view class="num">{{d}}</view>
  11. <view class="word">天</view>
  12. <view class="num">{{h}}</view>
  13. <view class="word">时</view>
  14. <view class="num">{{m}}</view>
  15. <view class="word">分</view>
  16. <view class="num">{{s}}</view>
  17. <view class="word">秒</view>
  18. </view>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. export default {
  24. name: "detail-ad",
  25. props: {
  26. sales: {
  27. type: Number,
  28. default() {
  29. return 0;
  30. }
  31. },
  32. d: {
  33. type: Number,
  34. default() {
  35. return 0;
  36. }
  37. },
  38. h: {
  39. type: Number,
  40. default() {
  41. return 0;
  42. }
  43. },
  44. m: {
  45. type: Number,
  46. default() {
  47. return 0;
  48. }
  49. },
  50. s: {
  51. type: Number,
  52. default() {
  53. return 0;
  54. }
  55. },
  56. theme: String
  57. }
  58. }
  59. </script>
  60. <style scoped lang="scss">
  61. .default {
  62. background:linear-gradient(to right, #ff5527, #ff2755);
  63. }
  64. .detail-ad {
  65. width: #{750rpx};
  66. height: #{88rpx};
  67. padding: 0 #{24rpx};
  68. .text {
  69. color: #ffffff;
  70. .title {
  71. display: inline-block;
  72. font-size: #{32rpx};
  73. margin-right: #{12rpx};
  74. height: #{88upx};
  75. line-height: #{88upx};
  76. }
  77. .count {
  78. display: inline-block;
  79. padding: #{5upx 16rpx};
  80. border-radius: #{18rpx};
  81. background-color: rgba(0,0,0,.2);
  82. font-size: #{22rpx};
  83. }
  84. }
  85. .count-down {
  86. height: #{88rpx};
  87. text-align: center;
  88. .advance-title {
  89. font-size: #{20rpx};
  90. color: #ffffff;
  91. margin-top: #{5rpx};
  92. margin-bottom: #{5rpx};
  93. }
  94. .num {
  95. width:#{40rpx};
  96. height: #{36rpx};
  97. line-height: #{36rpx};
  98. text-align: center;
  99. border-radius: #{4rpx};
  100. font-size: #{24rpx};
  101. color: #353535;
  102. background-color: #ffffff;
  103. }
  104. .word {
  105. width: #{35rpx};
  106. height: #{36rpx};
  107. line-height: #{36rpx};
  108. text-align: center;
  109. font-size: #{24rpx};
  110. color: #ffffff;
  111. }
  112. }
  113. }
  114. </style>