index.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <template>
  2. <div class="spikeList" :class="'terminal'+terminal">
  3. <div class="warp" v-if="componentContent.shopSeckillId && productData">
  4. <div>
  5. <div class="spikeCard">
  6. <div class="listLeft">
  7. <img src="../../../static/images/spike/bg-spike.png">
  8. <div class="bgBox">
  9. <div class="title"><img src="../../../static/images/spike/tit-spike.png" alt="秒杀专区"></div>
  10. <div class="text">整点秒杀,数量有限</div>
  11. <div class="sessions">{{productData.seckillName}} {{isStart && '倒计时'}}</div>
  12. <div class="time-text">距离{{count[0]}}还有</div>
  13. <div class="timeBox">
  14. <span>{{count[1]}}</span><i>:</i><span>{{count[2]}}</span><i>:</i><span>{{count[3]}}</span>
  15. </div>
  16. <button class="btn-more" @click="jumpSeckills(productData)">查看全部 <span class="icon iconfont icon-arrow-right"></span></button>
  17. </div>
  18. </div>
  19. <div class="listRight">
  20. <div class="listItem" v-for='it in productData.products' :key='it.productId' @click="jumpProductDetail(it)">
  21. <div class="imgBox">
  22. <img :src="it.image" alt="">
  23. </div>
  24. <div class="itemInfo">
  25. <h3>{{it.productName}}</h3>
  26. <div class="begrenzt">
  27. <span class="people">还剩{{it.stockNumber}}件</span>
  28. <div class="progress" :style="{'width':it.sliderVal + '%'}"></div>
  29. </div>
  30. <div class="originalPrice">¥{{it.originalPrice}}</div>
  31. <dl class="discountPrice">
  32. <dt>
  33. <img src="../../../static/images/spike/flag-spike.png" alt="秒杀价">
  34. </dt>
  35. <dd>
  36. <span>¥</span><b>{{it.price}}</b>
  37. </dd>
  38. </dl>
  39. </div>
  40. </div>
  41. </div>
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. </template>
  47. <script>
  48. import {commonMixin} from '../mixin'
  49. export default {
  50. mixins: [commonMixin]
  51. }
  52. </script>
  53. <style lang="scss" scoped>
  54. .spikeList{
  55. min-height: 100px;
  56. &.terminal4{
  57. background-color: #F3F4F5;
  58. .warp{
  59. width: 1200px;
  60. }
  61. .spikeCard {
  62. display: flex;
  63. width: 100%;
  64. .listLeft {
  65. width: 487px;
  66. height: 758px;
  67. text-align: center;
  68. position: relative;
  69. .bgBox {
  70. position: absolute;
  71. top: 0;
  72. left: 0;
  73. width: 100%;
  74. .title{
  75. padding-top: 140px;
  76. }
  77. .text{
  78. color: #8E8D8C;
  79. font-size: 30px;
  80. line-height: 40px;
  81. margin: 15px 0 100px 0;
  82. }
  83. .sessions{
  84. color: #FFEBC4;
  85. font-size: 30px;
  86. line-height: 40px;
  87. }
  88. .time-text{
  89. padding-top: 60px;
  90. color: #FFEBC4;
  91. font-size: 18px;
  92. }
  93. .timeBox {
  94. display: flex;
  95. align-items: center;
  96. justify-content: center;
  97. margin:10px 0 50px;
  98. span {
  99. display: block;
  100. width: 60px;
  101. height: 60px;
  102. background: rgba(51,51,51,0.8);
  103. color: #FFFFFF;
  104. font-size: 30px;
  105. line-height: 60px;
  106. }
  107. i {
  108. font-size: 30px;
  109. color: #fff;
  110. font-style: normal;
  111. font-weight: bold;
  112. padding: 0 13px;
  113. }
  114. }
  115. .btn-more {
  116. width: 130px;
  117. height: 41px;
  118. border: 2px solid #FFEBC4;
  119. color: #FFEBC4;
  120. font-size: 18px;
  121. background-color: transparent;
  122. }
  123. }
  124. }
  125. .listRight {
  126. padding: 40px 0 0 8px;
  127. .listItem {
  128. float:left;
  129. width: 220px;
  130. height: 335px;
  131. margin:0 0 15px 15px;
  132. background-color: #fff;
  133. .imgBox {
  134. width: 220px;
  135. height: 220px;
  136. img {
  137. width: 100%;
  138. height: 100%;
  139. }
  140. }
  141. .itemInfo {
  142. position: relative;
  143. padding: 10px;
  144. text-align: center;
  145. h3{
  146. font-size: 14px;
  147. color: #333;
  148. line-height: 18px;
  149. overflow: hidden;
  150. text-overflow:ellipsis;
  151. white-space: nowrap;
  152. }
  153. .begrenzt{
  154. position: absolute;
  155. left: 5px;
  156. top: -35px;
  157. width: 210px;
  158. height: 30px;
  159. border: 1px solid #C83732;
  160. background-color: #C83732;
  161. text-align: center;
  162. .people{
  163. position: relative;
  164. z-index: 2;
  165. font-size: 12px;
  166. color: #FFBAB8;
  167. line-height: 30px;
  168. }
  169. .progress{
  170. position: absolute;
  171. right: 0;
  172. top: 0;
  173. background-color: #fff;
  174. height: 28px;
  175. }
  176. }
  177. .discountPrice {
  178. display: inline-block;
  179. width: 130px;
  180. dt{
  181. float: left;
  182. }
  183. dd{
  184. border: 1px solid #F3F4F5;
  185. color: #C83732;
  186. line-height: 30px;
  187. font-weight: bold;
  188. span {
  189. font-size: 18px;
  190. }
  191. b {
  192. font-size: 18px;
  193. }
  194. }
  195. }
  196. .originalPrice {
  197. font-size: 14px;
  198. line-height: 19px;
  199. padding: 10px 0 6px;
  200. color: #ccc;
  201. text-decoration: line-through;
  202. }
  203. }
  204. }
  205. }
  206. }
  207. }
  208. }
  209. </style>