search.wxml 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <view class="content">
  2. <view class="vheight"></view>
  3. <view class="input-box flex">
  4. <view class=" input-content flex">
  5. <view class="iconfont iconsearch"></view>
  6. <view class="input">
  7. <input bindinput="__e" data-event-opts="{{[ [ 'input',[ [ '__set_model',[ '','keyword','$event',[] ] ] ] ] ]}}" placeholder="请输入搜索内容" type="text" value="{{keyword}}"></input>
  8. </view>
  9. </view>
  10. <view bindtap="__e" class="input-button flex" data-event-opts="{{[ [ 'tap',[ [ 'navTo',['$event'] ] ] ] ]}}">
  11. <text>搜索</text>
  12. </view>
  13. </view>
  14. <swiper class="swiper-box " current="{{tabCurrentIndex}}" duration="300">
  15. <swiper-item class="search-hot">
  16. <view class="title">
  17. <text>热门搜索</text>
  18. </view>
  19. <view class="hot-list">
  20. <view bindtap="__e" class="list-item" data-event-opts="{{[ [ 'tap',[ [ 'clickHotText',['$0'],[ [ ['list','',ind] ] ] ] ] ] ]}}" wx:for="{{list}}" wx:for-index="ind" wx:for-item="ls" wx:key="ind">
  21. <text>{{ls}}</text>
  22. </view>
  23. </view>
  24. </swiper-item>
  25. <swiper-item class="search-hot position-relative">
  26. <view class="navbar">
  27. <view bindtap="__e" class="nav-item" data-event-opts="{{[ [ 'tap',[ ['defaultSearch'] ] ] ]}}">默认</view>
  28. <view bindtap="__e" class="{{['nav-item',searchType===1?'current':'']}}" data-event-opts="{{[ [ 'tap',[ [ 'sortTab',[1] ] ] ] ]}}">
  29. <text>销量优先</text>
  30. <view class="p-box">
  31. <text class="{{['iconfont iconfold',searchType===1&&numberOrder===1?'active':'']}}"></text>
  32. <text class="{{['iconfont iconfold xia',searchType===1&&numberOrder===2?'active':'']}}"></text>
  33. </view>
  34. </view>
  35. <view bindtap="__e" class="{{['nav-item',searchType===2?'current':'']}}" data-event-opts="{{[ [ 'tap',[ [ 'sortTab',[2] ] ] ] ]}}">
  36. <text>价格</text>
  37. <view class="p-box">
  38. <text class="{{['iconfont iconfold',searchType===2&&priceOrder===1?'active':'']}}"></text>
  39. <text class="{{['iconfont iconfold xia',searchType===2&&priceOrder===2?'active':'']}}"></text>
  40. </view>
  41. </view>
  42. <view bindtap="__e" class="{{['nav-item',newOrder==1?'current':'']}}" data-event-opts="{{[ [ 'tap',[ ['newGoodsTab'] ] ] ]}}">新品</view>
  43. </view>
  44. <scroll-view bindscrolltolower="__e" class="cate-list" data-event-opts="{{[ [ 'scrolltolower',[ [ 'getProducts',['$event'] ] ] ] ]}}" scrollY="{{true}}">
  45. <view class="guess-section">
  46. <view bindtap="__e" class="guess-item" data-event-opts="{{[ [ 'tap',[ [ 'navToDetailPage',['$0'],[ [ ['goodsList','',index] ] ] ] ] ] ]}}" wx:for="{{goodsList}}" wx:key="index">
  47. <view class="image-wrapper">
  48. <image mode="aspectFill" src="{{item.image}}"></image>
  49. </view>
  50. <text class="title clamp margin-c-20">{{item.store_name}}</text>
  51. <view class="cmy-hr"></view>
  52. <view class="price margin-c-20 flex">
  53. <view>
  54. <text class="font-size-sm ">¥</text>{{''+item.price+''}}</view>
  55. <view class="font-size-sm">
  56. <text class="font-color-gray">{{item.sales+'人购买'}}</text>
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. <uni-load-more bind:__l="__l" status="{{loadingType}}" vueId="1e45b5a5-1"></uni-load-more>
  62. </scroll-view>
  63. </swiper-item>
  64. </swiper>
  65. </view>