<view id="appointment-search">
  <view class="search_box">
    <view class="search">
        <view class="left">
          <i class="iconfont icon-back" bindtap="goBack"></i>
          <text catchtap="showProject">{{status==="1"? appointmentLang.project:appointmentLang.worker}}</text>
          <i catchtap="showProject" class="iconfont icon-member-bottom"></i>
          <view class="search-popup-box" wx:if="{{show2}}">
            <view style="margin: 9.6rpx 16rpx;border-bottom: border-bottom: 1.0016rpx  solid #eeeeee"><view class="p" bindtap="selectType" data-type="1">{{appointmentLang.project}}</view></view>
            <view style="margin: 9.6rpx 16rpx;"><view class="p"  bindtap="selectType" data-type="2">{{appointmentLang.worker}}</view></view>
          </view>
        </view>
        <view class="right">
          <input
            bindinput="bind"
            type="text"
            title="搜索"
            placeholder="{{'搜索'+appointmentLang.project+'/'+appointmentLang.worker}}"
          />
          <i class="iconfont icon-sousuo" bindtap="getData"></i>
        </view>
      </view>
      <view class="box" wx:if="{{status !== '2'}}">
        <view class="box-left" bindtap="showClass"><text>{{category.name || "全部"}}</text><i
          class="iconfont icon-member-bottom"></i></view>
        <view style="flex: 1" bindtap="evaluateBtn">
          <view class="box-right">
            <text class="{{!show1 ? 'activeColour':''}}">评价</text>
            <view class="icon-box"><i class="iconfont icon-member-top {{!show1?(sort == 'asc'?'activeColour':''):''}}"
                                     ></i><i
              class="iconfont icon-member-bottom {{!show1?(sort == 'desc'?'activeColour':''):''}}"></i>
            </view>
          </view>
        </view>
      </view>
  </view>    
       <view style="height:{{status === '2' ? '80rpx':'160rpx'}}"></view>
        <block wx:if="{{status !== '2'}}">
        <view class="list">
          <view class="list-item" wx:for="{{projectList}}" :key="{{item.id}}" bindtap="goProject" data-id="{{item.id}}">
            <view class="item-left">
              <image src="{{item.thumb}}" alt=""></image>
            </view>
            <view class="item-right">
              <view  class="title p" style="-webkit-box-orient: vertical;">{{item.title}}</view>
              <view class="talk"><i class="iconfont icon-liaotian"></i> <text>{{item.comment_num || 0}}</text></view>
            </view>
          </view>
        </view>
      </block>
       <block wx:if="{{status === '2'}}">
      <view class="technician-list" wx:for="{{projectList}}" :key="{{item.id}}" bindtap="toTechnicianDetails" data-id="{{item.id}}">
        <view class="technician-item">
          <view class="pic" style="margin-left: 64rpx;">
            <image src="{{item.thumb}}" alt=""></image>
          </view>
          <view class="technician-right">
            <view class="top">
              <view class="p">{{item.name}}</view>
              <text class="tag" wx:for="{{item.tags}}" wx:for-item="tag">{{tag}}</text>
              <view class="star">
                	<van-rate
                    value="{{ item.score }}"
                    size="{{ 14 }}"
                    color="#ee0a24"
				            void-color="#c8c9cc"
                     readonly 
                    void-icon="star"
                  />
              </view>
            </view>
            <view style="display: flex" wx:if="{{item.has_one_store}}">
              <view class="gray p">{{item.has_one_store.store_name}}</view>
              <view class="address"><i class="iconfont icon-order_locate"></i><text>{{item.has_one_store.distance}}{{item.has_one_store.unit}}</text>
              </view>
            </view>
            <view class="describe1 text-over">
              <!--<span class="blue">项</span>-->
              <text class="gray" wx:for="{{item.worker_projects}}" wx:for-item="title">{{title.title}}<text wx:if="{{i<item.worker_projects.length-1}}">,</text></text>
            </view>
          </view>
        </view>
      </view>
    </block>
</view>
<van-popup
  show="{{ show1 }}"
  position="top"
  closeable
>
<view class="popup-box">
            <view bindtap="close" class="close-icon"><icon  class="close iconfont icon-adsystem_icon_cancle"></icon></view>
            <view style="margin: 9.2rpx 16rpx;" bindtap="selectionBtn" data-item="{}"><view class="p">全部</view></view>
            <view style="margin: 9.2rpx 16rpx;" wx:for="{{className}}" :key="index" bindtap="selectionBtn" data-item="{{item}}"><view class="p">{{item.name}}</view>
            </view>
          </view>
</van-popup>