search-list.vue 5.0 KB

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