search.wxml 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <scroll-view class="container" style="height: 100%;">
  2. <view class="search-header">
  3. <view class="input-box">
  4. <image class="icon" src="http://nos.netease.com/mailpub/hxm/yanxuan-wap/p/20150730/style/img/icon-normal/search2-2fb94833aa.png"></image>
  5. <!-- TODO 输入辅助 -->
  6. <!-- <input name="input" class="keywrod" focus="true" value="{{keyword}}" confirm-type="search" bindinput="inputChange" bindfocus="inputFocus" bindconfirm="onKeywordConfirm" confirm-type="search" placeholder="{{defaultKeyword}}" /> -->
  7. <input name="input" class="keywrod" focus="true" value="{{keyword}}" confirm-type="search" bindinput="inputChange" bindfocus="inputFocus" bindconfirm="onKeywordConfirm" confirm-type="search" placeholder="{{defaultKeyword}}" />
  8. <!-- <input name="input" class="keywrod" focus="true" value="{{keyword}}" bindfocus="inputFocus" bindconfirm="onKeywordConfirm" confirm-type="search" placeholder="{{defaultKeyword}}" /> -->
  9. <image class="del" wx:if="{{keyword}}" bindtap="clearKeyword" src="http://nos.netease.com/mailpub/hxm/yanxuan-wap/p/20150730/style/img/icon-normal/clearIpt-f71b83e3c2.png"></image>
  10. </view>
  11. <view class="right" bindtap="closeSearch">取消</view>
  12. </view>
  13. <view class="no-search" wx:if="{{ !searchStatus}}">
  14. <view class="serach-keywords search-history" wx:if="{{!keyword && historyKeyword.length}}">
  15. <view class="h">
  16. <text class="title">历史记录</text>
  17. <image class="icon" bindtap="clearHistory" src="http://nos.netease.com/mailpub/hxm/yanxuan-wap/p/20150730/style/img/icon-normal/del1-93f0a4add4.png"></image>
  18. </view>
  19. <view class="b">
  20. <view class="item" bindtap="onKeywordTap" data-keyword="{{item}}" wx:for="{{historyKeyword}}" hover-class="navigator-hover">{{item}}</view>
  21. </view>
  22. </view>
  23. <view class="serach-keywords search-hot" wx:if="{{!keyword}}">
  24. <view class="h">
  25. <text class="title">热门搜索</text>
  26. </view>
  27. <view class="b">
  28. <view class="item active" hover-class="navigator-hover" bindtap="onKeywordTap" data-keyword="{{item}}" wx:for="{{hotKeyword}}">{{item}}</view>
  29. </view>
  30. </view>
  31. <view class="shelper-list" wx:if="{{keyword}}">
  32. <view class="item" hover-class="navigator-hover" wx:for="{{helpKeyword}}" bindtap="onKeywordTap" data-keyword="{{item[0]}}">{{item[0]}}</view>
  33. </view>
  34. </view>
  35. <view class="search-result" wx:if="{{ searchStatus && goodsList.length}}">
  36. <!-- <view class="sort">
  37. <view class="sort-box">
  38. <view class="item {{currentSortType == 'default' ? 'active' : ''}}" bindtap="openSortFilter" id="defaultSort">
  39. <text class="txt">综合</text>
  40. </view>
  41. <view class="item by-price {{currentSortType == 'price' ? 'active' : ''}} {{currentSortOrder == 'asc' ? 'asc' : 'desc'}}" bindtap="openSortFilter" id="priceSort">
  42. <text class="txt">价格</text>
  43. </view>
  44. <view class="item {{currentSortType == 'category' ? 'active' : ''}}" bindtap="openSortFilter" id="categoryFilter">
  45. <text class="txt">分类</text>
  46. </view>
  47. </view>
  48. <view class="sort-box-category" wx-if="{{categoryFilter}}">
  49. <view class="item {{item.checked ? 'active' : ''}}" wx:for="{{filterCategory}}" wx:key="cate-{{item.id}}" data-category-index="{{index}}" bindtap="selectCategory">{{item.name}}</view>
  50. </view>
  51. </view> -->
  52. <view class="cate-item">
  53. <view class="b">
  54. <navigator class="item {{(iindex + 1) % 2 == 0 ? 'item-b' : ''}}" url="/pages/goods/goods?id={{iitem.id}}" wx:for="{{goodsList}}" wx:for-item="iitem" wx:for-index="iindex">
  55. <image class="img" src="{{iitem.primaryPicUrl}}" background-size="cover"></image>
  56. <text class="name">{{iitem.name}}</text>
  57. <text class="price">¥{{iitem.price}}</text>
  58. </navigator>
  59. </view>
  60. </view>
  61. </view>
  62. <view class="search-result-empty" wx:if="{{!goodsList.length && searchStatus}}">
  63. <image class="icon" src="http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/icon-normal/noSearchResult-7572a94f32.png"></image>
  64. <text class="text">没有您寻找的商品</text>
  65. </view>
  66. </scroll-view>