index.vue 4.7 KB

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