index.wxml
4.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<!-- 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>