group.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <template>
  2. <view class="group-box iPhone-bottom box-border-box">
  3. <Nav title='团购专区'></Nav>
  4. <image class="head-img" src="@/static/img/buy/group-bg.png" mode="scaleToFill"></image>
  5. <view class="box-border-box p-24">
  6. <view class="box-card box-border-box p-24 mb-20" v-for="(item,i) in 10" :key="i" @click="todet(item)">
  7. <image class="goods-img mb-16" src="@/static/img/my/lqzx-bg.png" mode="scaleToFill"></image>
  8. <view class="text-overflow-ellipsis fs-36 fw-600 mb-20 w-100100">
  9. [畅销款]奥尔1良烤肉牛油拌饭11[畅销款11 ]奥尔1良烤肉牛油拌饭11[畅销款]奥尔1良烤肉牛油拌饭11[畅销款11 ]奥尔1良烤肉牛油拌饭11
  10. </view>
  11. <view class="mb-40 flex-justify-space align-items-center">
  12. <view class="jd-f">
  13. <view class="jd-1"></view>
  14. <view class="jd-2" :style="{width:setWidth(182,92)+'rpx'}"></view>
  15. </view>
  16. <view class="">
  17. <span class="fs-24 fc-9">已团</span>
  18. <span class="fs-24 ">92件</span>
  19. <span class="fs-24 fc-9">/剩</span>
  20. <span class="fs-24 ">90</span>
  21. </view>
  22. </view>
  23. <view class="info-box display-flex">
  24. <view class="flex-1">
  25. <span class="fs-28 fc-FB3D03 fw-400">团购价¥</span>
  26. <span class="fs-40 fc-FB3D03 fw-600">15.9</span>
  27. </view>
  28. <view class="info-box-qiang">
  29. <image class="qiang-img" src="@/static/img/buy/qiang.png" mode="scaleToFill"></image>
  30. <view class="jiang-box fc-65420c fs-24 fw-600">直降</view>
  31. <view class="jiang-box-1 fs-24 fc-65420c fw-600">¥399</view>
  32. <image class="jiang-img" src="@/static/img/buy/x-jt.png" mode="scaleToFill"></image>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. </template>
  39. <script>
  40. export default {
  41. data(){
  42. return{
  43. }
  44. },
  45. onShow() {
  46. },
  47. methods:{
  48. setWidth(total,num){
  49. let w = 0
  50. let tH = 434;
  51. w = (tH/total * num).toFixed(0)
  52. console.log(w);
  53. return w
  54. },
  55. todet(item){
  56. uni.navigateTo({
  57. url:'/pages-buy/group-det'
  58. })
  59. },
  60. },
  61. }
  62. </script>
  63. <style scoped lang="scss">
  64. .jd-f{
  65. position: relative;
  66. width: 434rpx;
  67. height: 18rpx;
  68. .jd-1{
  69. position: absolute;
  70. top: 0;
  71. left: 0;
  72. width: 434rpx;
  73. height: 18rpx;
  74. background: #FEE0E0;
  75. border-radius: 200rpx 200rpx 200rpx 200rpx;
  76. z-index: 10;
  77. }
  78. .jd-2{
  79. position: absolute;
  80. top: 0;
  81. left: 0;
  82. height: 18rpx;
  83. // background: linear-gradient( 90deg, #3FF9F9 0%, #E0FEA4 100%);
  84. background-color: #FF2652;
  85. border-radius: 200rpx 200rpx 200rpx 200rpx;
  86. z-index: 12;
  87. }
  88. }
  89. .group-box{
  90. background-color: #EF2864;
  91. .head-img{
  92. width: 100%;
  93. height: 422rpx;
  94. }
  95. .box-card{
  96. width: 100%;
  97. min-height: 100rpx;
  98. background: #FFFFFF;
  99. box-shadow: 0rpx 0rpx 12rpx 0rpx rgba(51,51,51,0.1);
  100. border-radius: 20rpx;
  101. .goods-img{
  102. width: 100%;
  103. height: 452rpx;
  104. border-radius: 20rpx;
  105. }
  106. .info-box{
  107. width: 100%;
  108. height: 72rpx;
  109. background: #FEE0E0;
  110. border-radius: 20rpx;
  111. line-height: 72rpx;
  112. padding-left: 14rpx;
  113. box-sizing: border-box;
  114. .info-box-qiang{
  115. width: 148rpx;
  116. height: 72rpx;
  117. background: #F63E36;
  118. border-radius: 0rpx 20rpx 20rpx 0rpx;
  119. position: relative;
  120. .qiang-img{
  121. width: 60rpx;
  122. height: 60rpx;
  123. margin: 6rpx 22rpx 0 auto;
  124. }
  125. .jiang-box{
  126. position: absolute;
  127. top: -30rpx;
  128. left: -22rpx;
  129. z-index: 20;
  130. }
  131. .jiang-box-1{
  132. position: absolute;
  133. top: 0rpx;
  134. left: -30rpx;
  135. z-index: 20;
  136. }
  137. .jiang-img{
  138. position: absolute;
  139. width: 120rpx;
  140. height: 90rpx;
  141. left: -60rpx;
  142. bottom: 0;
  143. z-index: 11;
  144. }
  145. }
  146. }
  147. }
  148. }
  149. </style>