index.wxml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <view class="container" style="position: relative; padding-bottom: {{safeBottom}}px;">
  2. <!-- TopView -->
  3. <view class="top-view">
  4. <!-- 导航栏 -->
  5. <van-nav-bar custom-style="background-color: #fff">
  6. <van-icon slot="left" name="arrow-left" size="25px" color="#333" bind:click="backToParent"/>
  7. <text slot="title" style="color: #333;">钻石搜索</text>
  8. </van-nav-bar>
  9. <!-- tabs -->
  10. <view class="tab-view">
  11. <van-tabs swipeable bind:change="onTabChange" color="#2270D9" title-active-color="#2270D9" title-inactive-color="#8F8AA6">
  12. <van-tab wx:for="{{tabs}}" wx:for-item="itm" wx:key="id" id="{{itm.id}}" title="{{itm.name}}"/>
  13. </van-tabs>
  14. </view>
  15. </view>
  16. <!-- 形状 -->
  17. <view class="cell-view shape">
  18. <text>形状</text>
  19. <view class="content shape">
  20. <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>
  21. </view>
  22. </view>
  23. <!-- 颜色 -->
  24. <view class="cell-view color">
  25. <text>颜色</text>
  26. <view class="content color">
  27. <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>
  28. </view>
  29. </view>
  30. <!-- 净度 -->
  31. <view class="cell-view neatness">
  32. <text>净度</text>
  33. <view class="content neatness">
  34. <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>
  35. </view>
  36. </view>
  37. <!-- 切工 -->
  38. <view class="cell-view qiegong">
  39. <text>切工</text>
  40. <view class="content qiegong">
  41. <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>
  42. </view>
  43. </view>
  44. <!-- 对称 -->
  45. <view class="cell-view duicheng">
  46. <text>对称</text>
  47. <view class="content duicheng">
  48. <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>
  49. </view>
  50. </view>
  51. <!-- 抛光 -->
  52. <view class="cell-view polishing">
  53. <text>抛光</text>
  54. <view class="content polishing">
  55. <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>
  56. </view>
  57. </view>
  58. <!-- 荧光 -->
  59. <view class="cell-view yingguang">
  60. <text>荧光</text>
  61. <view class="content yingguang">
  62. <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>
  63. </view>
  64. </view>
  65. <!-- 货币 -->
  66. <view class="cell-view currency">
  67. <text>货币</text>
  68. <view class="content currency">
  69. <button wx:for="{{currencys}}" wx:for-item="itm" wx:for-index="idx" wx:key="id" class="{{itm.isCheck ? 'active' : ''}}" id="currency {{itm.id}}" bindtap="onButtonPressed">{{itm.name}}</button>
  70. </view>
  71. </view>
  72. <!-- 证书 -->
  73. <view class="cell-view certificate">
  74. <text>证书</text>
  75. <view class="content certificate">
  76. <button wx:for="{{certificates}}" wx:for-item="itm" wx:for-index="idx" wx:key="id" class="{{itm.isCheck ? 'active' : ''}}" id="certificate {{itm.id}}" bindtap="onButtonPressed">{{itm.name}}</button>
  77. </view>
  78. </view>
  79. <!-- 克拉重量 -->
  80. <view class="cell-view ctweight">
  81. <text class="label">克拉重量</text>
  82. <num-range min="{{minweight}}" max="{{maxweight}}" bind:sync="syncNumRange"></num-range>
  83. </view>
  84. <!-- 底部视图 -->
  85. <view class="buttom_view">
  86. <button bindtap="onButtonPressed" id="clear">清空</button>
  87. <button bindtap="onButtonPressed" id="search">搜索</button>
  88. </view>
  89. </view>