index.wxml 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <!-- 头部视图 -->
  2. <view class="top-view" style="position: sticky; top: 0; z-index: 999;">
  3. <!-- 导航栏 -->
  4. <nav-bar title="挂牌大厅" left="{{false}}"></nav-bar>
  5. <!-- tabs -->
  6. <view class="tab-view">
  7. <van-tabs custom-class="van-tabs" sticky animated bind:change="onTabChange" color="#2270D9" title-active-color="#2270D9" title-inactive-color="#8F8AA6">
  8. <van-tab wx:for="{{tabs}}" wx:for-item="itm" wx:key="id" id="{{itm.id}}" title="{{itm.name}}"/>
  9. </van-tabs>
  10. <van-icon id="listing-buy" name="plus" size="20" bind:click="onIconClick"/>
  11. <van-icon id="listing-sell" name="minus" size="20" bind:click="onIconClick"/>
  12. <van-icon id="search" name="search" size="20" bind:click="onIconClick"/>
  13. </view>
  14. <!-- 下拉菜单 -->
  15. <van-dropdown-menu custom-class="dropdown-menu" active-color="#1989fa" wx:if="{{active == 0}}">
  16. <van-dropdown-item id="categorys" value="{{ 2 }}" options="{{ categorys }}" bind:change="onDropdownChange" />
  17. <van-dropdown-item id="shapes" value="{{ '1' }}" options="{{ shapes }}" bind:change="onDropdownChange" />
  18. <van-dropdown-item id="claritys" value="{{ 1 }}" options="{{ claritys }}" bind:change="onDropdownChange" />
  19. <van-dropdown-item id="cuts" value="{{ 1 }}" options="{{ cuts }}" bind:change="onDropdownChange" />
  20. <van-dropdown-item id="fluorescences" value="{{ 1 }}" options="{{ fluorescences }}" bind:change="onDropdownChange"/>
  21. </van-dropdown-menu>
  22. <!-- 搜索框 -->
  23. <van-search model:value="{{ zsallproperties }}" use-action-slot="{{true}}" wx:if="{{active != 0}}" shape="round" input-align="center" background="#2270D9" placeholder="请输入商品属性 支持模糊查询">
  24. <view slot="action" style="color: white;" bind:tap="onClick">搜索</view>
  25. </van-search>
  26. <!-- 列头 -->
  27. <view class="title-view">
  28. <view class="title-view-up">
  29. <text wx:for="{{active == 0 ? selltitles[0] : asktitles[0]}}" wx:for-item="itm" wx:for-index="idx" wx:key="idx">{{itm}}</text>
  30. </view>
  31. <view class="title-view-dwn">
  32. <text wx:for="{{active == 0 ? selltitles[1] : asktitles[1]}}" wx:for-item="itm" wx:for-index="idx" wx:key="idx">{{itm}}</text>
  33. </view>
  34. </view>
  35. </view>
  36. <!-- 内容滚动视图 -->
  37. <scroll-view class="content-view" style="padding-bottom: {{safeBottom+48}}px;">
  38. <!-- 数据 -->
  39. <van-swipe-cell wx:if="{{active == 1}}" wx:for="{{values}}" wx:for-item="itm" wx:for-index="idx" wx:key="idx" right-width="{{ width }}">
  40. <view class="item-view">
  41. <view class="item-view-up">
  42. <text wx:for="{{itm.up}}" wx:for-item="data" wx:for-index="idx" wx:key="idx">{{data}}</text>
  43. </view>
  44. <view class="item-view-mid">
  45. <text wx:for="{{itm.mid}}" wx:for-item="data" wx:for-index="idx" wx:key="idx">{{data}}</text>
  46. </view>
  47. <view class="item-view-dwn" wx:if="{{itm.dwn.length != 0}}">
  48. <text wx:for="{{itm.dwn}}" wx:for-item="data" wx:for-index="idx" wx:key="idx">{{data}}</text>
  49. </view>
  50. </view>
  51. <view slot="right" class="van-swipe-cell__right ">
  52. <view class="item detail" id="detail {{idx}}" style="background-color: yellowgreen;" bindtap="onButtonPressed">详情</view>
  53. <view wx:if="{{active == 0}}" class="item favorite" id="favorite {{idx}}" style="background-color: red;" bindtap="onButtonPressed">收藏</view>
  54. <view wx:if="{{active == 1}}" class="item delisting" id="delisting {{idx}}" style="background-color: goldenrod;" bindtap="onButtonPressed">摘牌</view>
  55. </view>
  56. </van-swipe-cell>
  57. </scroll-view>
  58. <!-- 无数据 -->
  59. <van-empty wx:if="{{isEmpty}}" class="custom-image" description="无数据"/>
  60. <!-- toast -->
  61. <van-toast id="van-toast" />