index.wxml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <!-- 头部视图 -->
  2. <view class="top-view" style="position: sticky; top: 0; z-index: 999;">
  3. <!-- 导航栏 -->
  4. <view class="nav-view" style="padding-top: {{ statusBarHeight }}px; height: {{ navHeight }}px;">
  5. <view class="tab-view">
  6. <!-- tabs -->
  7. <van-tabs custom-class="van-tabs" nav-class="van-tabs__nav" sticky animated bind:change="onTabChange" color="#fff" line-width="20px" title-inactive-color="#CAE5FF" title-active-color="#fff">
  8. <van-tab wx:for="{{ tabs }}" wx:for-item="itm" wx:key="id" id="{{ itm.id }}" title="{{ itm.name }}"/>
  9. </van-tabs>
  10. </view>
  11. </view>
  12. <!-- 列头 -->
  13. <view class="title-view">
  14. <view class="title-view-up">
  15. <text wx:for="{{ titles[0] }}" wx:for-item="itm" wx:for-index="idx" wx:key="idx">{{itm}}</text>
  16. </view>
  17. <view class="title-view-dwn">
  18. <text wx:for="{{ titles[1] }}" wx:for-item="itm" wx:for-index="idx" wx:key="idx">{{itm}}</text>
  19. </view>
  20. </view>
  21. </view>
  22. <!-- 内容滚动视图 -->
  23. <scroll-view class="content-view" style="background-color: #f0f0f0;" wx:if="{{ !isEmpty }}">
  24. <!-- 出售大厅数据 -->
  25. <van-swipe-cell wx:for="{{ values }}" wx:for-item="itm" wx:for-index="idx" wx:key="idx" id="{{ idx }}" right-width="{{ width }}" bind:click="onSelectItem">
  26. <view class="item-view {{ favorites[idx].isChecked ? 'active' : ''}}">
  27. <view class="item-view-up">
  28. <text wx:for="{{ itm.up }}" wx:for-item="data" wx:for-index="idx" wx:key="idx">{{ data }}</text>
  29. </view>
  30. <view class="item-view-mid">
  31. <text wx:for="{{ itm.mid }}" wx:for-item="data" wx:for-index="idx" wx:key="idx">{{ data }}</text>
  32. </view>
  33. <view class="item-view-dwn" wx:if="{{ itm.dwn.length != 0 }}">
  34. <text wx:for="{{ itm.dwn }}" wx:for-item="data" wx:for-index="idx" wx:key="idx">{{ data }}</text>
  35. </view>
  36. </view>
  37. <!-- 取消收藏 -->
  38. <view slot="right" class="van-swipe-cell__right">
  39. <view class="item detail" id="detail {{ idx }}" style="background-color: #407DB8; color: white;" bindtap="goToGoodsDetail">详情</view>
  40. <view class="item cancel" id="detail {{ idx }}" style="background-color: #F7A657; color: white;" bindtap="onCancelFavorite">取消</view>
  41. </view>
  42. </van-swipe-cell>
  43. </scroll-view>
  44. <!-- 无数据 -->
  45. <van-empty wx:if="{{ isEmpty }}" class="custom-image" description="无数据"/>
  46. <!-- 底部视图 -->
  47. <view class="buttom_view" style="padding-bottom: {{ safeBottom+48 }}px;" wx:if="{{ values.length >= 2}}">
  48. <van-button id="new" round color="#407DB8" block style="width: 90%;" bind:click="onButtonPressed">对比</van-button>
  49. </view>