index.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. <template>
  2. <div class="group-list">
  3. <div class="group-warp">
  4. <div class="title">
  5. <label>
  6. <!-- #ifdef MP-WEIXIN -->
  7. <img class="title-img" src="../../../static/images/price/img-title.png" alt="组合优惠" mode="widthFix"/>
  8. <!-- #endif -->
  9. <!-- #ifdef H5 || APP-PLUS -->
  10. <image class="title-img" src="../../../static/images/price/img-title.png" alt="组合优惠" mode="widthFix"/>
  11. <!-- #endif -->
  12. </label>
  13. <div class="price-text">
  14. <swiper class="swiper" :autoplay="true" :vertical="true">
  15. <swiper-item v-for="(item,index) in productData.rules" :key="index">
  16. {{item.price}}元任选{{item.number}}件
  17. </swiper-item>
  18. </swiper>
  19. </div>
  20. <a v-show="componentContent.showMore" class="btn-all a-link" @click="jumpCombination(productData)">更多<i class="iconfont icon-arrow-right"></i></a>
  21. </div>
  22. <div>
  23. <swiper class="swiper pro-box" :indicator-dots="true" :autoplay="true" :display-multiple-items="2">
  24. <swiper-item class="pro-item-warp" v-for="(item,index) in productData.composeProducts" :key="index" @click="jumpProductDetail(item)">
  25. <div class="pro-item-inner">
  26. <div class="pro-item">
  27. <div class="pro-item-img">
  28. <img v-show="item.image" class="img" :src="item.image">
  29. </div>
  30. <div class="pro-item-info">
  31. <h3 class="name">
  32. {{item.productName}}
  33. </h3>
  34. <div class="stock">
  35. 还剩{{item.stockNumber}}件
  36. </div>
  37. <div class="price-warp">
  38. <div class="price">
  39. ¥ {{item.price}}
  40. </div>
  41. <div class="original-price">
  42. ¥ {{item.originalPrice}}
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47. </div>
  48. </swiper-item>
  49. </swiper>
  50. </div>
  51. </div>
  52. </div>
  53. </template>
  54. <script>
  55. import {commonMixin} from '../mixin'
  56. export default {
  57. mixins: [commonMixin],
  58. // data () {
  59. // return {
  60. // swiperOption: {
  61. // slidesPerView: 2, // 显示数量
  62. // spaceBetween: 20, // 间隔
  63. // autoplay: false, // 可选选项,自动滑动
  64. // loop: true,
  65. // pagination: {
  66. // el: '.price-pagination'
  67. // },
  68. // navigation: {
  69. // nextEl: '.swiper-button-next',
  70. // prevEl: '.swiper-button-prev'
  71. // }
  72. // }
  73. // }
  74. // }
  75. }
  76. </script>
  77. <style lang="scss" scoped>
  78. .group-list{
  79. padding: 30upx 20upx 60upx;
  80. .group-warp{
  81. height: 544upx;
  82. padding: 0 10upx;
  83. background: #333333;
  84. box-shadow: 0 20upx 30upx rgba(0, 0, 0, 0.3);
  85. opacity: 1;
  86. border-radius: 20upx;
  87. }
  88. .title{
  89. display: flex;
  90. align-items:center;
  91. position: relative;
  92. padding: 32upx 0 20upx 20upx;
  93. .title-img{
  94. width: 203upx;
  95. }
  96. .price-text{
  97. width: 300upx;
  98. height: 50upx;
  99. background: linear-gradient(90deg, #C83732 0%, #E25C44 100%);
  100. box-shadow: 0 6upx 12upx rgba(233, 0, 0, 0.3);
  101. border-radius: 26upx;
  102. font-size: 24upx;
  103. color: #fff;
  104. text-align: center;
  105. line-height: 50upx;
  106. margin-left: 20upx;
  107. .swiper{
  108. height: 50upx;
  109. }
  110. }
  111. .btn-all{
  112. position: absolute;
  113. right: 8upx;
  114. top: 40upx;
  115. line-height: 33upx;
  116. padding-right: 25upx;
  117. font-size: 24upx;
  118. color: #FFEBC4;
  119. .iconfont{
  120. content: '';
  121. font-size: 26upx;
  122. position: absolute;
  123. right: 0;
  124. top: 0;
  125. }
  126. }
  127. }
  128. .pro-box{
  129. padding-bottom: 20upx;
  130. height: 450upx;
  131. .pro-item-inner{
  132. padding: 0 10upx;
  133. }
  134. .pro-item{
  135. width: 100%;
  136. height: 412upx;
  137. background: #FFFFFF;
  138. .pro-item-img{
  139. .img{
  140. width: 100%;
  141. height: 236upx;
  142. }
  143. }
  144. .pro-item-info{
  145. padding: 0 20upx;
  146. .name{
  147. font-size: 24upx;
  148. line-height: 40upx;
  149. color: #333333;
  150. overflow: hidden;
  151. text-overflow:ellipsis;
  152. white-space: nowrap;
  153. }
  154. .stock{
  155. padding: 0 8upx;
  156. height: 40upx;
  157. border: 2upx solid #E4E5E6;
  158. line-height: 40upx;
  159. margin: 10upx 0;
  160. display: inline-block;
  161. font-size: 20upx;
  162. color: #C5AA7B;
  163. }
  164. .price{
  165. font-size: 32upx;
  166. font-weight: bold;
  167. line-height: 44upx;
  168. color: #C83732;
  169. padding-right: 10upx;
  170. display: inline-block;
  171. }
  172. .original-price{
  173. font-size: 20upx;
  174. line-height: 28upx;
  175. color: #CCCCCC;
  176. display: inline-block;
  177. }
  178. }
  179. }
  180. }
  181. .pagination{
  182. display: flex;
  183. justify-content: center;
  184. ::v-deep .swiper-pagination-bullet{
  185. width: 24upx;
  186. height: 4upx;
  187. background: #fff;
  188. opacity: 0.5;
  189. border-radius: 2upx;
  190. margin: 0 5upx;
  191. }
  192. ::v-deep .swiper-pagination-bullet-active{
  193. opacity: 1;
  194. }
  195. }
  196. }
  197. </style>