8 changed files with 295 additions and 192 deletions
@ -1,67 +1,71 @@ |
|||||
<!--components/xx-calendar/xx-calendar.wxml--> |
<!--components/xx-calendar/xx-calendar.wxml--> |
||||
<!-- 头部 --> |
<view class="{{currentViewType === 'month' ? 'bigBg' : 'smallBg'}}"> |
||||
<view class="title-wrap"> |
<!-- 头部 --> |
||||
<view class="change-date"> |
<view class="title-wrap"> |
||||
<view class="prev" bindtap="changeMonthFun" data-type="prev"> |
<view class="change-date"> |
||||
<image lazy-load style="margin-right: 10rpx;" src="https://static.ticket.sz-trip.com/uploads/20240327/283ac46c0fab03c04dad40f765854514.png" mode="" /> |
<view class="year-mouth"> |
||||
<text wx:if="{{currentViewType==='month'}}">上一月</text> |
{{year}}年 {{month}}月 |
||||
<text wx:else>上一周</text> |
</view> |
||||
</view> |
<view> |
||||
<view class="year-mouth"> |
<view class="prev" bindtap="changeMonthFun" data-type="prev"> |
||||
{{year}}年 {{month}}月 |
<!-- <image lazy-load style="margin-right: 10rpx;" src="https://static.ticket.sz-trip.com/uploads/20240327/283ac46c0fab03c04dad40f765854514.png" mode="" /> --> |
||||
</view> |
<text wx:if="{{currentViewType==='month'}}">上一月</text> |
||||
<view class="next" bindtap="changeMonthFun" data-type="next" > |
<text wx:else>上一周</text> |
||||
<text wx:if="{{currentViewType==='month'}}">下一月</text> |
</view> |
||||
<text wx:else>下一周 </text> |
<view class="next" bindtap="changeMonthFun" data-type="next" > |
||||
<image lazy-load style="margin-left: 10rpx;" src="https://static.ticket.sz-trip.com/uploads/20240327/ab2097432f5c34915665cb376e72c4aa.png" mode="" /> |
<text wx:if="{{currentViewType==='month'}}">下一月</text> |
||||
</view> |
<text wx:else>下一周 </text> |
||||
</view> |
<!-- <image lazy-load style="margin-left: 10rpx;" src="https://static.ticket.sz-trip.com/uploads/20240327/ab2097432f5c34915665cb376e72c4aa.png" mode="" /> --> |
||||
</view> |
</view> |
||||
<!-- 日期 --> |
</view> |
||||
<view class="date-wrap"> |
</view> |
||||
<image lazy-load wx:if="{{currentViewType === 'month'}}" class="bottom-image" src="https://static.ticket.sz-trip.com/uploads/20250421/a0b731399b5c348ae4dc5199c9034ab5.png"></image> |
</view> |
||||
|
<!-- 日期 --> |
||||
|
<view class="date-wrap"> |
||||
|
<image lazy-load wx:if="{{currentViewType === 'month'}}" class="bottom-image" src="https://static.ticket.sz-trip.com/uploads/20250421/a0b731399b5c348ae4dc5199c9034ab5.png"></image> |
||||
|
|
||||
<view class="week"> |
<view class="week"> |
||||
<text wx:for="{{weeksArr}}" wx:key="*this">{{item}}</text> |
<text wx:for="{{weeksArr}}" wx:key="*this">{{item}}</text> |
||||
</view> |
</view> |
||||
<!-- 上个月日期 --> |
<!-- 上个月日期 --> |
||||
<view wx:if="{{currentViewType === 'month'}}" wx:for="{{lastMonthDays}}" wx:key="*this" class="mouth-date last-mouth"> |
<view wx:if="{{currentViewType === 'month'}}" wx:for="{{lastMonthDays}}" wx:key="*this" class="mouth-date last-mouth"> |
||||
<text class="day-text">{{item.date}}</text> |
<text class="day-text">{{item.date}}</text> |
||||
</view> |
</view> |
||||
|
|
||||
|
|
||||
<!-- 当月日期 --> |
<!-- 当月日期 --> |
||||
<view class="mouth-date current-mouth " wx:for="{{currentViewType === 'month' ? nowMonthDays : weekDay}}" wx:key="*this" bindtap="selectDate" |
<view class="mouth-date current-mouth " wx:for="{{currentViewType === 'month' ? nowMonthDays : weekDay}}" wx:key="*this" bindtap="selectDate" |
||||
data-item="{{item}}" data-type="nowMonthDays" data-index="{{index}}" |
data-item="{{item}}" data-type="nowMonthDays" data-index="{{index}}" |
||||
> |
> |
||||
<view class="day-box {{item.isNowMonthDay?'active':''}} {{item.isHoliday ? 'holiday' : ''}}{{item.isHoliday&&item.isNowMonthDay ? 'active' : ''}}" |
<view class="day-box {{item.isNowMonthDay?'active':''}} {{item.isHoliday ? 'holiday' : ''}}{{item.isHoliday&&item.isNowMonthDay ? 'active' : ''}}" |
||||
style="background: {{ item.isHoliday.background }};color: {{ item.isHoliday.color }};border-bottom: {{item.isHoliday.borderBottom||'none'}};"> |
style="background: {{ item.isHoliday ? '#FAE3E3' : 'none' }} ;color: {{ item.isHoliday ? '#D10000' : '#888888' }};border-bottom: 'none';"> |
||||
<text class="day-text"> |
<text class="day-text"> |
||||
<!-- <text class="day-text {{item.isHoliday?'color':''}} "> --> |
<!-- <text class="day-text {{item.isHoliday?'color':''}} "> --> |
||||
<text>{{item.date}}</text> |
<text>{{item.date}}</text> |
||||
<text wx:if="{{item.isHoliday}}" class="xiu" >休</text> |
<text wx:if="{{item.isHoliday}}" class="xiu" >休</text> |
||||
</text> |
</text> |
||||
<!-- day 后面会换成农历展示 --> |
<!-- day 后面会换成农历展示 --> |
||||
<text class="day-nongli" wx:if="{{item.isHoliday && item.holidayList2}}" style="color: {{ item.isHoliday.color }}">{{ item.isHoliday.name}} </text> |
<text class="day-nongli" wx:if="{{item.isHoliday && item.holidayList2}}" style="color: {{ item.isHoliday.color }}">{{ item.isHoliday.name}} </text> |
||||
<text class="day-nongli" wx:else="" style="color: {{ item.isHoliday ? item.isHoliday.color : '#888888' }}">{{ item.day}}</text> |
<text class="day-nongli" wx:else="" style="color: {{ item.isHoliday ? '#D10000' : '#888888' }}">{{ item.day}}</text> |
||||
<text class=" {{item.color?'day-dot':'not-dot'}}"></text> |
<text class=" {{item.color?'day-dot':'not-dot'}}"></text> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
|
|
||||
|
|
||||
<!-- 下个月日期 --> |
<!-- 下个月日期 --> |
||||
<view wx:if="{{currentViewType === 'month'}}" class="mouth-date next-mouth" wx:for="{{nextMonthDays}}" wx:key="*this"> |
<view wx:if="{{currentViewType === 'month'}}" class="mouth-date next-mouth" wx:for="{{nextMonthDays}}" wx:key="*this"> |
||||
<text class="day-text">{{item.date}}</text> |
<text class="day-text">{{item.date}}</text> |
||||
</view> |
</view> |
||||
|
|
||||
<view class="footer" bindtap="toggleMode"> |
<view class="footer" bindtap="toggleMode"> |
||||
<!-- <view class="arrow {{currentViewType==='month'?'arrow-up':'arrow-down'}}">></view> |
<!-- <view class="arrow {{currentViewType==='month'?'arrow-up':'arrow-down'}}">></view> |
||||
<view> {{currentViewType==="month"?"收起":"更多"}} </view> --> |
<view> {{currentViewType==="month"?"收起":"更多"}} </view> --> |
||||
<image lazy-load wx:if="{{currentViewType==='week'}}" src="https://static.ticket.sz-trip.com/uploads/20240327/8b5f8a284de3831392560c367f8c59ca.png" mode=""/> |
<image lazy-load wx:if="{{currentViewType==='week'}}" src="https://static.ticket.sz-trip.com/jundaosuzhou/images/calendar2026/bot.png" mode=""/> |
||||
<image lazy-load wx:else src="https://static.ticket.sz-trip.com/uploads/20240327/d23c7a3d743e4fb9623c534adf10760b.png" mode=""/> |
<image lazy-load wx:else src="https://static.ticket.sz-trip.com/jundaosuzhou/images/calendar2026/top.png" mode=""/> |
||||
</view> |
</view> |
||||
<!-- 节假日花样 --> |
<!-- 节假日花样 --> |
||||
<!-- <image lazy-load wx:if="{{currentViewType==='month'}}" style="width: 250rpx;height: 144.67rpx;position: absolute;right: 0;bottom: 30.67rpx;" src="https://static.ticket.sz-trip.com/uploads/20240605/1dda9e2e0fbc5d64aef702b5e692b2e5.png" mode=""/> --> |
<!-- <image lazy-load wx:if="{{currentViewType==='month'}}" style="width: 250rpx;height: 144.67rpx;position: absolute;right: 0;bottom: 30.67rpx;" src="https://static.ticket.sz-trip.com/uploads/20240605/1dda9e2e0fbc5d64aef702b5e692b2e5.png" mode=""/> --> |
||||
|
</view> |
||||
</view> |
</view> |
||||
|
|
||||
|
|
||||
Loading…
Reference in new issue