<van-search value="{{ value }}" shape="round" background="#fff" placeholder="搜索姓名、手机号" bind:search='startSearch' bind:clear='onClear' />
<view class="total" style="height: 20rpx;" />
<Yl_ListBox id='ListBox' bind:getlist='getList'>
	<view class="box">
		<navigator url="#" class="item" wx:for="{{list}}" wx:key="index" data-id="{{item[idname]}}" bindtap="changeResult">
			<van-checkbox wx:if="{{!radio}}" value="{{ handle.isCheck(item[idname],result) }}" shape="square" icon-size='28rpx' />
			<view class="user">
				<view class="exp">
					<view class="line-1">
						{{item[showName]}}
					</view>
				</view>
			</view>
		</navigator>
		<My_empty wx:if="{{list.length==0}}" />
	</view>
</Yl_ListBox>
<block wx:if="{{!radio}}">
	<view style="height: 130rpx;" />
	<view class="footer">
		<view class="count">
			已选：{{result.length}}
		</view>
		<van-button custom-class='but' disabled='{{result.length==0}}' bind:click="submit">添加</van-button>
	</view>
</block>

<wxs module="handle">
	module.exports = {
		isCheck: function (id, list) {
			return list.some(function (v) {
				return v == id
			});
		},
	}
</wxs>