index.vue 6.2 KB

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