index.wxml 4.06 KB
<!-- component/calendar/calendar.wxml -->
<view class="calendar">
  <view class="header">
    <view class="title">
      <view class="header-wrap">
        <!-- <view class="flex"> -->
        <view class="month" bindtap="openPicker">
          {{showCurrentMonth}}
          <image class="img" src="../../images/icon-arrow.png"></image>
        </view>
        <!-- </view> -->
        <view class="today" bindtap="handleUpOrDown">
          {{isShow ? "收起" : "展开"}}
          <image class="img" src="../../images/{{isShow ? 'down' : 'up'}}.png"></image>
          <!-- <image src="../../images/calendar.png" mode="widthFix" class="img" /> -->
          <!-- <glsx-image src="calendar.png" mode="widthFix" custom-class="img" /> -->
        </view>
      </view>
    </view>
  </view>
  <!-- 日历头部 -->
  <view class="flex-around calendar-week">
    <view class="view">一</view>
    <view class="view">二</view>
    <view class="view">三</view>
    <view class="view">四</view>
    <view class="view">五</view>
    <view class="view">六</view>
    <view class="view">日</view>
  </view>
  <!-- 日历主体 -->
  <!-- <swiper class="swiper" style="height:{{swiperHeight}}rpx" bindchange="swiperChange" circular="{{true}}" current="{{swiperCurrent}}" duration="{{swiperDuration}}">
        <swiper-item wx:for="{{[dateList0, dateList1, dateList2]}}" wx:for-index="listIndex" wx:for-item="listItem" wx:key="listIndex">
            <view class="flex-around flex-wrap calendar-main" style="height:{{listItem.length/7*82}}rpx">
                <view wx:for="{{listItem}}" wx:key="dateList" class="day">
                    <view class="bg {{(item.month === selectDay.month&&spotMap['y'+item.year+'m'+item.month+'d'+item.day])?spotMap['y'+item.year+'m'+item.month+'d'+item.day]:''}} {{(item.year === nowDay.year && item.month === nowDay.month && item.day === nowDay.day) ? 'now' : ''}} {{(item.year === selectDay.year && item.month === selectDay.month) ? (item.day === selectDay.day && oldCurrent === listIndex ?'select':''): 'other-month'}} {{ disabledDateList['disabled' + item.year + 'M' + item.month + 'D' + item.day] ? 'other-month' : '' }}" catchtap="selectChange" data-day="{{item.day}}" data-year="{{item.year}}" data-month="{{item.month}}">
                        {{item.day}}
                    </view>
                </view>
            </view>
        </swiper-item>
    </swiper> -->
  <view wx:if="{{isShow}}" class="flex-around flex-wrap calendar-main" style="height: var(--fontSize{{swiperHeight}})">
    <view wx:for="{{dateList1}}" wx:key="dateList" class="day">
      <view class="bg {{item.full == today?'now':''}}" catchtap="dayOnSelect" data-full="{{item.full}}" data-day="{{item.day}}" data-year="{{item.year}}" data-month="{{item.month}}">
        <view class="{{(item.year == selectDay.year && item.month == selectDay.month) ? (item.day === selectDay.day && oldCurrent === listIndex ?'select':''): 'other-month'}} {{item.full == currentSelect ? 'select' : ''}}">{{item.day}}</view>
        <view wx:if="{{item.full == currentSelect}}" class="cur-txt">约{{item.inviteNum}}余{{item.remainNum}}</view>
        <view wx:if="{{item.full != currentSelect && item.inviteNum > 0}}" class="invite-point">{{item.inviteNum}}</view>
      </view>
      <view class="dot_list" wx:if="{{scheduList[item.full]&&scheduList[item.full].length>0}}">
        <block wx:for="{{scheduList[item.full]}}" wx:for-item="child" wx:for-index="idx" wx:if="{{idx < 4}}" wx:key="idx">
          <view class="dot {{classNameList[child.status]}}"></view>
        </block>
        <!--<view class="dot {{classNameList[child.status]}}" wx:for="{{scheduList[item.full]}}" wx:for-item="child" wx:for-index="idx" wx:key="idx"></view>-->
      </view>
    </view>
  </view>
  <!-- 展开收缩 -->
  <view class="flex list-open">
    <view class="icon"></view>
  </view>

  <!-- 日期弹框 开始 -->
  <van-popup show="{{ showPopup }}" position="bottom" bind:close="onClose">
    <van-datetime-picker type="year-month" value="{{ currentMonth }}" bind:confirm="onConfirm" bind:cancel="onClose" />
  </van-popup>
  <!-- 日期弹框 end -->

</view>