shopSearchResult.wxml 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <!--pages/search-prod-show/search-prod-show.wxml-->
  2. <view class='container'>
  3. <!-- 搜索框 -->
  4. <view class='fixed-box'>
  5. <view class='search-bar'>
  6. <view class='search-box'>
  7. <input class='sear-input' value="{{prodName}}" bindinput='getSearchContent' confirm-type='search' bindconfirm='toSearchConfirm'></input>
  8. <image src='../../images/icon/search.png' class='search-img'></image>
  9. </view>
  10. <view class='search-list-img' bindtap='changeShowType'>
  11. <image wx:if="{{showType==1}}" src='../../images/icon/search-col.png'></image>
  12. <image wx:if="{{showType==2}}" src='../../images/icon/search-col2.png'></image>
  13. </view>
  14. </view>
  15. <view class='tabs'>
  16. <text class="tab-item complete {{sts==0?'on':''}}" bindtap='onStsTap' data-sts="0">综合</text>
  17. <text class="tab-item {{sts==1?'on':''}}" bindtap='onStsTap' data-sts="1">销量</text>
  18. <text class="tab-item {{sts==2?'on':''}}" bindtap='onStsTap' data-sts="2">价格</text>
  19. </view>
  20. </view>
  21. <!-- 商品列表 -->
  22. <view class='prod-list'>
  23. <!-- 纵向列表 -->
  24. <view class='prod-show' wx:if="{{showType==1}}">
  25. <view class='hotsale-item-cont'>
  26. <block wx:for="{{searchProdList}}" wx:key="index">
  27. <prod item="{{item}}" sts="6"></prod>
  28. </block>
  29. </view>
  30. </view>
  31. <!-- 横向列表 -->
  32. <view class='cont-item' wx:if="{{showType==2}}">
  33. <block wx:for='{{searchProdList}}' wx:key="index">
  34. <view class='show-item' bindtap='toProdPage' data-prodid="{{item.prodId}}">
  35. <view class='more-prod-pic'>
  36. <image src='{{item.pic}}' class='more-pic'></image>
  37. </view>
  38. <view class='prod-text-right'>
  39. <view class='prod-text more'>{{item.prodName}}</view>
  40. <view class='cate-prod-info'>{{item.praiseNumber}}评价 {{item.positiveRating}}%好评</view>
  41. <view class='prod-price more'>
  42. <text class='symbol'>¥</text>
  43. <text class='big-num'>{{wxs.parsePrice(item.price)[0]}}</text>
  44. <text class='small-num'>.{{wxs.parsePrice(item.price)[1]}}</text>
  45. </view>
  46. </view>
  47. </view>
  48. </block>
  49. </view>
  50. </view>
  51. <!-- <view class="empty-tips" wx:if="{{searchProdList.length==0}}"> 暂无商品 </view> -->
  52. <!-- 空 -->
  53. <view class="empty" wx:if="{{searchProdList.length==0}}">
  54. <view class="empty-icon">
  55. <image src="../../images/icon/empty.png"></image>
  56. </view>
  57. <view class="empty-text">暂无商品</view>
  58. </view>
  59. </view>
  60. <wxs module="wxs" src="../../wxs/number.wxs" />