index.wxml 2.54 KB
<wxs src="../index.wxs" module="filter" />
<view class="second-hand-car" wx:if="{{usedCarFlag == 1}}">
  <view class="header">
    <view class="title-section">
      <view class="title-container">
        <block wx:for="{{menus}}" wx:key="index">
          <view class="title {{item.index==current?'active':''}}" data-index="{{item.index}}" bind:tap="selectMenu">{{item.title}}</view>
        </block>
      </view>
    </view>
    
    <view class="tab-section">
      <block wx:for="{{dateList}}" wx:key="index">
        <view class="tab {{item.index==dateCurrent?'active':''}}" data-index="{{item.index}}" bind:tap="selectDate">{{item.title}}</view>
      </block>
    </view>
    
    <view class="date-section">
      <view class="arrow left">
        <van-icon wx:if="{{timeType != 'custom' && !leftCurrent}}" class="arrow-left" name="arrow-left" bind:tap="last" />
      </view>
      <view class="date" bind:tap="onDisplayDate">{{date}}</view>
      <view class="arrow right">
        <van-icon wx:if="{{timeType != 'custom' && !rightCurrent}}" class="arrow-right" name="arrow" bind:tap="next" />
      </view>
    </view>
  </view>
  
  <block wx:if="{{current == 0}}">
    <board boardData="{{boardData}}"></board>
  </block>
  <block wx:if="{{current==1}}">
    <vehicleList merchantId="{{merchantId}}" timeType="{{timeType}}" date="{{date}}" currentWeek="{{currentWeek}}"></vehicleList>
  </block>
</view>
 <view class="no-data" wx:else>
  <glsx-image src="store-assistant-assemble/output/no_data_1.png" class="no-data-img"></glsx-image>
  <view class="text">暂未开通~</view>
</view>
  <!-- 年月日 -->
   <popup bind:hidePopup="cancel" bind:confirm="confirm" show="{{dateShow}}" title="{{titleEnum[timeType]}}" height="50vh">
    <block wx:if="{{timeType == 'date' || timeType == 'year-month'}}">
      <van-datetime-picker id="datePicker" show-toolbar="{{false}}" min-date="{{ minDate }}" max-date="{{ maxDate }}" model:value="{{ currentDate }}" type="{{timeType=='date'?'date':'year-month'}}" bind:change="onChange" bind:input="onInput" />
    </block>
    <!-- 周 -->
     <block wx:if="{{timeType == 'week'}}">
      <van-picker id="weekPicker" show-toolbar="{{false}}" model:value="{{ currentDate }}" default-index="{{defaultIndex}}" value-key="label" columns="{{ weekColumns }}" bind:change="onWeekChange" />
     </block>
  </popup>
  <van-calendar
    id="calendar"
    max-range="{{ 31 }}"
    min-date="{{ minDate }}"
    max-date="{{ maxDate }}"
    show="{{ show }}"
    type="range"
    color="#4466F0"
    bind:confirm="onConfirm"
    bind:close="onClose"
    />