search.wxml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <!--pages/search/search.wxml-->
  2. <!-- tabs -->
  3. <view class="tab-view">
  4. <van-tabs swipeable bind:change="onTabChange">
  5. <van-tab wx:for="{{tabs}}" wx:for-item="itm" wx:key="id" id="{{itm.id}}" title="{{itm.name}}"/>
  6. </van-tabs>
  7. </view>
  8. <view class="container" style="position: relative; padding-bottom: {{safeBottom}}px;">
  9. <!-- 形状 -->
  10. <view class="cell-view shape" wx:if="{{active !== 2}}">
  11. <text>形状</text>
  12. <view class="content shape">
  13. <button wx:for="{{shapes}}" wx:for-item="itm" wx:for-index="idx" class="{{itm.isCheck ? 'active' : ''}}" id="shape {{itm.id}}" wx:key="id" bindtap="onButtonPressed">{{itm.name}}</button>
  14. </view>
  15. </view>
  16. <!-- 晶型 -->
  17. <view class="cell-view jingxing" wx:if="{{active === 2}}">
  18. <text>晶型</text>
  19. <view class="content jingxing">
  20. <button wx:for="{{jingxings}}" wx:for-item="itm" wx:for-index="idx" wx:key="id" class="{{itm.isCheck ? 'active' : ''}}" id="jingxing {{itm.id}}" bindtap="onButtonPressed">{{itm.name}}</button>
  21. </view>
  22. </view>
  23. <!-- 款式 -->
  24. <view class="cell-view style" wx:if="{{active === 3}}">
  25. <text>款式</text>
  26. <view class="content style">
  27. <button wx:for="{{styles}}" wx:for-item="itm" wx:for-index="idx" wx:key="id" class="{{itm.isCheck ? 'active' : ''}}" id="style {{itm.id}}" bindtap="onButtonPressed">{{itm.name}}</button>
  28. </view>
  29. </view>
  30. <!-- 颜色 -->
  31. <view class="cell-view color">
  32. <text>颜色</text>
  33. <view class="content color">
  34. <button wx:for="{{colors}}" wx:for-item="itm" wx:for-index="idx" wx:key="id" class="{{itm.isCheck ? 'active' : ''}}" id="color {{itm.id}}" bindtap="onButtonPressed">{{itm.name}}</button>
  35. </view>
  36. </view>
  37. <!-- 净度 -->
  38. <view class="cell-view neatness">
  39. <text>净度</text>
  40. <view class="content neatness">
  41. <button wx:for="{{neatness}}" wx:for-item="itm" wx:for-index="idx" wx:key="id" class="{{itm.isCheck ? 'active' : ''}}" id="neatness {{itm.id}}" bindtap="onButtonPressed">{{itm.name}}</button>
  42. </view>
  43. </view>
  44. <!-- 切工 -->
  45. <view class="cell-view qiegong" wx:if="{{(active === 0 || active === 1 || active === 3)}}">
  46. <text>切工</text>
  47. <view class="content qiegong">
  48. <button wx:for="{{qiegongs}}" wx:for-item="itm" wx:for-index="idx" wx:key="id" class="{{itm.isCheck ? 'active' : ''}}" id="qiegong {{itm.id}}" bindtap="onButtonPressed">{{itm.name}}</button>
  49. </view>
  50. </view>
  51. <!-- 对称 -->
  52. <view class="cell-view duicheng" wx:if="{{active !== 2}}">
  53. <text>对称</text>
  54. <view class="content duicheng">
  55. <button wx:for="{{duichengs}}" wx:for-item="itm" wx:for-index="idx" wx:key="id" class="{{itm.isCheck ? 'active' : ''}}" id="duicheng {{itm.id}}" bindtap="onButtonPressed">{{itm.name}}</button>
  56. </view>
  57. </view>
  58. <!-- 抛光 -->
  59. <view class="cell-view polishing" wx:if="{{active !== 2}}">
  60. <text>抛光</text>
  61. <view class="content polishing">
  62. <button wx:for="{{paoguangs}}" wx:for-item="itm" wx:for-index="idx" wx:key="id" class="{{itm.isCheck ? 'active' : ''}}" id="polishing {{itm.id}}" bindtap="onButtonPressed">{{itm.name}}</button>
  63. </view>
  64. </view>
  65. <!-- 荧光 -->
  66. <view class="cell-view yingguang">
  67. <text>荧光</text>
  68. <view class="content yingguang">
  69. <button wx:for="{{yingguangs}}" wx:for-item="itm" wx:for-index="idx" wx:key="id" class="{{itm.isCheck ? 'active' : ''}}" id="yingguang {{itm.id}}" bindtap="onButtonPressed">{{itm.name}}</button>
  70. </view>
  71. </view>
  72. <!-- 仓库 -->
  73. <view class="cell-view warehouse">
  74. <text>仓库</text>
  75. <view class="content warehouse">
  76. <button style="width: 95%;">---全部---</button>
  77. </view>
  78. </view>
  79. <!-- 货币 -->
  80. <view class="cell-view currency">
  81. <text>货币</text>
  82. <view class="currency-radio">
  83. <van-radio-group value="{{currency}}" direction="horizontal" bind:change="onChange">
  84. <van-radio name="RMB">人民币</van-radio>
  85. <van-radio name="DOLLAR">美元</van-radio>
  86. </van-radio-group>
  87. </view>
  88. </view>
  89. <!-- 证书 -->
  90. <view class="cell-view certificate" wx:if="{{(active === 1 || active === 3 || active === 4)}}">
  91. <text>证书</text>
  92. <view class="content certificate">
  93. <button wx:for="{{certificates}}" wx:for-item="itm" wx:for-index="idx" wx:key="id" class="{{itm.isCheck ? 'active' : ''}}" id="certificate {{itm.id}}">{{itm.name}}</button>
  94. </view>
  95. </view>
  96. <!-- 总重量 -->
  97. <view class="cell-view totalweight" wx:if="{{(active === 0) || (active === 2)}}">
  98. <text>总重量</text>
  99. <num-range></num-range>
  100. </view>
  101. <!-- 单颗重量 -->
  102. <view class="cell-view weight" wx:if="{{(active === 0) || (active === 2)}}">
  103. <text>单颗重量</text>
  104. <num-range></num-range>
  105. </view>
  106. <!-- 克拉重量 -->
  107. <view class="cell-view ctweight" wx:if="{{(active === 1) || (active === 4)}}">
  108. <text>克拉重量</text>
  109. <num-range></num-range>
  110. </view>
  111. <!-- 原产地 -->
  112. <view class="cell-view product" wx:if="{{active === 2}}">
  113. <text>原产地</text>
  114. <van-field placeholder="请输入原产地"></van-field>
  115. </view>
  116. <!-- 重量 -->
  117. <view class="cell-view weight" wx:if="{{active === 3}}">
  118. <text>重量</text>
  119. <num-range></num-range>
  120. </view>
  121. <!-- 底部视图 -->
  122. <view class="buttom_view">
  123. <button bindtap="onButtonPressed" id="clear">清空</button>
  124. <button bindtap="onButtonPressed" id="search">搜索</button>
  125. </view>
  126. </view>