select.wxml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <van-search class="search" value="{{ params.content.where.condition }}" shape="round" placeholder="请输入搜索关键词" bind:search='startSearch' bind:clear='onClear' />
  2. <view class="head" style="height: 20rpx;" />
  3. <Yl_ListBox id='ListBox' bind:getlist='getList'>
  4. <navigator class="offer-list" url="#" wx:for="{{list}}" wx:key="index" data-id="{{item[idname]}}" bindtap="changeResult">
  5. <view class="portrait">
  6. {{item[showName][0]}}
  7. </view>
  8. <view class="box">
  9. <view class="title line-1">
  10. {{item[showName]||'--'}}
  11. <van-tag custom-class='tag' wx:for="{{item.tags.systemtag}}" wx:for-item='tag' color='#FA8C16' text-color='#fff' round>{{tag}}</van-tag>
  12. <van-tag custom-class='tag' wx:for="{{item.tags.datatag}}" wx:for-item='tag' color='#FAAB16' text-color='#fff' round>{{tag}}</van-tag>
  13. </view>
  14. <view class="exp">{{item.phonenumber}}</view>
  15. </view>
  16. <van-checkbox wx:if="{{!radio}}" value="{{ handle.isCheck(item[idname],result) }}" shape="square" icon-size='28rpx' />
  17. </navigator>
  18. <view style="height: 230rpx;" />
  19. <My_empty wx:if="{{!list.length}}" />
  20. </Yl_ListBox>
  21. <block wx:if="{{!radio}}">
  22. <view style="height: 130rpx;" />
  23. <view class="footer">
  24. <view class="count">
  25. 已选:{{result.length}}
  26. </view>
  27. <van-button custom-class='but' disabled='{{result.length==0}}' bind:click="submit">添加</van-button>
  28. </view>
  29. </block>
  30. <wxs module="handle">
  31. module.exports = {
  32. isCheck: function (id, list) {
  33. return list.some(function (v) {
  34. return v == id
  35. });
  36. }
  37. }
  38. </wxs>