search-list.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. <template>
  2. <view class="seacrh-record-index iPhone-bottom flex-common-css box-border-box">
  3. <view class="seacrh-bg"></view>
  4. <Nav title='可用商家' bgckgroundBox='transparent'></Nav>
  5. <scroll-view scroll-y="true" class="scroll-view-css seacrh-info box-border-box p-24"
  6. @scrolltolower="scrolltolower">
  7. <view class="goos-list-box box-border-box p-24 display-flex" v-for="(item,i) in list" :key="i"
  8. @click="toShop(item)">
  9. <image class="left-img" :src="item.shop_logo" mode="aspectFill"></image>
  10. <view class="flex-1">
  11. <view class="align-items-center mb-8">
  12. <view class="right-box-title fs-32 fw-600 text-overflow-ellipsis-one">{{item.shop_name}}</view>
  13. <image class="right-box-title-img" src="@/static/img/toRight.png" mode=""></image>
  14. </view>
  15. <view class="align-items-center mb-8">
  16. <image class="img-x mr-12" src="@/static/img/my/wdpj.png" mode=""></image>
  17. <view class="fs-26 fw-600 fc-FF7F00 mr-12">{{item.shop_score}}分</view>
  18. <view class="fc-6 fs-24 mr-12">| 预计{{item.delivery_time}}分钟 |</view>
  19. <view class="fc-6 fs-24 mr-12">{{item.shop_sales}}人购买</view>
  20. </view>
  21. <view class="align-items-center flex-wrap-wrap">
  22. <view class="quan-list display-flex mr-12 mb-12" v-for="(info1,index1) in item.coupon"
  23. :key="index1">
  24. <view class="quan-list-1 fs-24 fc-f">券</view>
  25. <view class="quan-list-2 fs-24 fc-FB3D03">{{info1.money}}元</view>
  26. </view>
  27. </view>
  28. <view class="goods-items-list display-flex">
  29. <view class="goods-items-list-box" v-for="(info2,index2) in item.goods" :key="index2">
  30. <image class="mb-12" :src="info2.goods_image" mode="aspectFill"></image>
  31. <view class="mb-8 fw-600 text-overflow-ellipsis-one fs-26">{{info2.goods_name}}</view>
  32. <view class="">
  33. <span class="fs-24 fc-FB3D03">¥</span>
  34. <span class="fs-32 fc-FB3D03 fw-b">{{info2.price}}</span>
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. </scroll-view>
  41. </view>
  42. </template>
  43. <script>
  44. import {
  45. couponShop
  46. } from '@/api/coupon.js'
  47. export default {
  48. data() {
  49. return {
  50. fromData: {
  51. id: '',
  52. operate_id: '',
  53. page: 1,
  54. },
  55. list: [],
  56. total: 0,
  57. }
  58. },
  59. onLoad(e) {
  60. this.fromData.operate_id = uni.getStorageSync('operate_id');
  61. this.fromData.id = e.ticketId
  62. this.fromData.page = 1;
  63. this.list = [];
  64. this.getList()
  65. },
  66. methods: {
  67. search() {
  68. this.fromData.page = 1;
  69. this.list = [];
  70. this.getList();
  71. },
  72. getList() {
  73. couponShop(this.fromData).then((res) => {
  74. if (res.code === 1) {
  75. this.list = [...this.list, ...res.data.items];
  76. this.total = res.data.total;
  77. }
  78. })
  79. },
  80. scrolltolower() {
  81. if (this.list.length < this.total) {
  82. this.fromData.page += 1;
  83. this.getList();
  84. }
  85. },
  86. toShop(item) {
  87. uni.navigateTo({
  88. url: '/pages-takeout/shop?shop_id=' + item.shop_id
  89. })
  90. },
  91. },
  92. }
  93. </script>
  94. <style scoped lang="scss">
  95. .seacrh-record-index {
  96. position: relative;
  97. .seacrh-bg {
  98. position: absolute;
  99. top: 0;
  100. left: 0;
  101. width: 100%;
  102. height: 376rpx;
  103. filter: blur(80rpx);
  104. background-image: linear-gradient(to right, #C9F7FC, #F9F6E0, #F6F5F3);
  105. z-index: -1;
  106. }
  107. .s-input {
  108. margin-top: 24rpx;
  109. width: 100%;
  110. height: 72rpx;
  111. padding: 0 24rpx;
  112. box-sizing: border-box;
  113. position: relative;
  114. .input-icon {
  115. position: absolute;
  116. left: 48rpx;
  117. top: 20rpx;
  118. }
  119. input {
  120. font-size: 32rpx;
  121. width: 100%;
  122. height: 72rpx;
  123. background: #FFFFFF;
  124. border-radius: 200rpx;
  125. box-sizing: border-box;
  126. padding: 0 126rpx 0 78rpx;
  127. }
  128. .input-buttom {
  129. width: 120rpx;
  130. height: 60rpx;
  131. background: linear-gradient(90deg, #57CAFF 0%, #41ABF5 100%);
  132. border-radius: 200rpx;
  133. text-align: center;
  134. line-height: 60rpx;
  135. position: absolute;
  136. right: 30rpx;
  137. top: 6rpx;
  138. }
  139. }
  140. .seacrh-info {
  141. margin-top: 20rpx;
  142. // border-radius: 24rpx 24rpx 0rpx 0rpx;
  143. }
  144. .goos-list-box {
  145. width: 100%;
  146. min-height: 100rpx;
  147. background: #FFFFFF;
  148. box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(51, 51, 51, 0.1);
  149. border-radius: 20rpx;
  150. margin-bottom: 20rpx;
  151. .goods-items-list {
  152. width: 530rpx;
  153. overflow-y: scroll;
  154. .goods-items-list-box {
  155. width: 140rpx;
  156. margin-right: 16rpx;
  157. image {
  158. width: 140rpx;
  159. height: 140rpx;
  160. border-radius: 12rpx
  161. }
  162. }
  163. }
  164. .left-img {
  165. width: 100rpx;
  166. height: 100rpx;
  167. border-radius: 12rpx;
  168. margin-right: 16rpx;
  169. }
  170. .img-x {
  171. width: 24rpx;
  172. height: 24rpx;
  173. }
  174. .right-box-title {
  175. width: 438rpx;
  176. }
  177. .right-box-title-img {
  178. width: 32rpx;
  179. height: 32rpx;
  180. margin-left: auto;
  181. }
  182. .quan-list {
  183. .quan-list-1 {
  184. width: 32rpx;
  185. height: 34rpx;
  186. background: #FB3D03;
  187. border-radius: 5rpx 0rpx 0rpx 5rpx;
  188. text-align: center;
  189. }
  190. .quan-list-2 {
  191. box-sizing: border-box;
  192. padding: 0 2rpx;
  193. height: 34rpx;
  194. border-radius: 0 5rpx 5rpx 0;
  195. border: 1rpx solid #FB3D03;
  196. text-align: center;
  197. }
  198. }
  199. }
  200. }
  201. </style>