index.wxml 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <!-- 头部视图 -->
  2. <view class="top-view" style="position: sticky; top: 0; z-index: 999;">
  3. <!-- 导航视图 -->
  4. <view class="nav-view" style="height: {{ statusBarHeight + navHeight + 10}}px;">
  5. <!-- tabs -->
  6. <view class="tab-view" style="padding-top: {{ statusBarHeight }}px; height: {{ navHeight }}px;">
  7. <van-tabs active="{{ active }}" custom-class="van-tabs" nav-class="van-tabs__nav" sticky animated bind:change="onTabChange" color="#fff" line-width="20px" title-active-color="#fff" title-inactive-color="#CAE5FF">
  8. <van-tab wx:for="{{ tabs }}" wx:for-item="itm" wx:key="id" id="{{ itm.id }}" title="{{ itm.name }}"/>
  9. </van-tabs>
  10. <!-- 功能区 -->
  11. <view class="gird-view">
  12. <view class="gird-view__item" wx:for="{{ menus }}" wx:for-index="idx" wx:for-item="itm" wx:key="id" id="{{ itm.id }}" bindtap="onIconClick">
  13. <image src="{{ itm.icon }}.png" mode="heightFix" />
  14. <text style="color: #CAE5FF; font-size: 12px;">{{ itm.title }}</text>
  15. </view>
  16. </view>
  17. </view>
  18. </view>
  19. <!-- 下拉菜单 -->
  20. <van-dropdown-menu custom-class="dropdown-menu" active-color="#1989fa" wx:if="{{ active === 0 }}">
  21. <van-dropdown-item id="categorys" model:value="{{ category }}" options="{{ categorys }}" bind:change="onDropdownChange" />
  22. <van-dropdown-item id="shapes" model:value="{{ shape }}" options="{{ shapes }}" bind:change="onDropdownChange" />
  23. <van-dropdown-item id="claritys" model:value="{{ clarity }}" options="{{ claritys }}" bind:change="onDropdownChange" />
  24. <van-dropdown-item id="cuts" model:value="{{ cut }}" options="{{ cuts }}" bind:change="onDropdownChange" />
  25. <van-dropdown-item id="fluorescences" model:value="{{ fluorescence }}" options="{{ fluorescences }}" bind:change="onDropdownChange"/>
  26. </van-dropdown-menu>
  27. <!-- 搜索框 -->
  28. <van-search model:value="{{ zsallproperties }}" use-action-slot="{{ true }}" wx:if="{{ active != 0 }}" shape="round" input-align="center" background="#407DB8" placeholder="请输入商品属性 支持模糊查询">
  29. <view slot="action" style="color: #fff;" bind:tap="onClick">搜索</view>
  30. </van-search>
  31. </view>
  32. <!-- 内容滚动视图 -->
  33. <scroll-view wx:if="{{ !isEmpty }}" class="content-view" style="padding-bottom: {{ sellOrders.length > 3 ? safeBottom+navHeight+15 : 15 }}px;">
  34. <!-- 数据 -->
  35. <van-swipe-cell wx:for="{{ active === 0 ? sellOrders : askOrders }}" wx:for-item="itm" wx:for-index="idx" wx:key="wrtradeorderid" id="detail {{ idx }}" right-width="50" >
  36. <view class="vanSwipeCell-item">
  37. <view class="vanSwipeCell-item__top">
  38. <text>{{ itm.zsshapetypedisplay }}</text>
  39. <tetx>{{ active === 0 ? itm.remainqty+"ct"+"|"+itm.zscolortype1display+"|"+itm.zsclaritytype1display : '' }}</tetx>
  40. <text>{{ active === 0 ? itm.zscurrencytypedisplayunit+itm.price : '' }}</text>
  41. </view>
  42. <view class="vanSwipeCell-item__mid">
  43. <view class="vanSwipeCell-item__mid__left">
  44. <text wx:if="{{ active === 1 }}">颜色:{{ itm.zscolortypedisplay }}</text>
  45. <text>切工:{{ active === 0 ? itm.zscuttype1display : itm.zscuttypedisplay }}</text>
  46. <text>抛光:{{ active === 0 ? itm.zspolishtype1display : itm.zspolishtypedisplay }}</text>
  47. <text>尺寸:{{ active === 0 ? itm.sizedisplay : itm.zssize }}</text>
  48. </view>
  49. <view class="vanSwipeCell-item__mid__mid">
  50. <text wx:if="{{ active === 1 }}">净度:{{ itm.zsclaritytypedisplay }}</text>
  51. <text>对称:{{ active === 0 ? itm.zssymmetrytype1display : itm.zssymmetrytypedisplay }}</text>
  52. <text>荧光:{{ active === 0 ? itm.zsfluorescencetype1display : itm.zsfluorescencetypedisplay }}</text>
  53. <text wx:if="{{ active === 0 }}">证书:{{ itm.zscerttypedisplay }}</text>
  54. </view>
  55. <view class="vanSwipeCell-item__mid__right" id="favorite {{ idx }}" wx:if="{{ active === 0 }}" bindtap="onButtonPressed">
  56. <van-icon name="star" id="favorite {{ idx }}" color="#407DB8" bind:click="onButtonPressed" />
  57. <text id="favorite {{ idx }}" bindtap="onButtonPressed">{{ itm.favorite ? '已收藏' : '去收藏' }}</text>
  58. </view>
  59. <view class="vanSwipeCell-item__mid__right" id="delisting {{ idx }}" wx:if="{{ active === 1 }}" bindtap="onButtonPressed">
  60. <van-icon id="delisting {{ idx }}" name="fire-o" color="#407DB8" bind:click="onButtonPressed" />
  61. <text id="delisting {{ idx }}" bindtap="onButtonPressed">去摘牌</text>
  62. </view>
  63. </view>
  64. <view class="vanSwipeCell-item__dwn">
  65. <text>{{ active === 0 ? itm.sellusername : itm.buyusername }}</text>
  66. <text>{{ itm.ordertime }}</text>
  67. </view>
  68. </view>
  69. <!-- 左滑按钮 -->
  70. <view slot="right" class="vanSwipeCell-right ">
  71. <view class="item detail" id="detail {{ idx }}" style="background-color: #407DB8;" bindtap="onButtonPressed">详情</view>
  72. </view>
  73. </van-swipe-cell>
  74. <!-- 求购大厅 -->
  75. </scroll-view>
  76. <!-- 无数据 -->
  77. <van-empty wx:if="{{ isEmpty }}" class="custom-image" description="无数据"/>
  78. <!-- toast -->
  79. <van-toast id="van-toast" />