calendar.wxml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <view class="modular modular-pad">
  2. <view class="modal-label">
  3. <view class="calendar-view">
  4. <text class="left {{(selectDay.year<today.year ||(selectDay.year==today.year&&selectDay.month<=today.month))?'gray':''}}" bindtap="{{(selectDay.year<today.year ||(selectDay.year==today.year&&selectDay.month<=today.month))?'':'lastMonth'}}">上个月</text>
  5. <view class="center">{{selectDay.month+'月'}}</view>
  6. <text class="right" bindtap="nextMonth">下个月</text>
  7. </view>
  8. <!-- 新版 -->
  9. <view class="calendar">
  10. <!-- 日历头部 -->
  11. <view class="flex-around calendar-week">
  12. <view class="view">日</view>
  13. <view class="view">一</view>
  14. <view class="view">二</view>
  15. <view class="view">三</view>
  16. <view class="view">四</view>
  17. <view class="view">五</view>
  18. <view class="view">六</view>
  19. </view>
  20. <!-- 日历主体 -->
  21. <view class="flex-start flex-wrap calendar-main">
  22. <view wx:for="{{dateList}}" wx:key="dateList" class="day">
  23. <view class="bg {{item.dateString==today.dateStr?'subtitleColor':((item.year === selectDay.year && item.month === selectDay.month && item.day === selectDay.day) ? 'selectDate':(item.dateSecond>=todaySecond?'gray':'other-month'))}}" catchtap="{{(item.dateSecond>=todaySecond&&item.count&&item.count>0)?'selectChange':''}}" data-day="{{item.day}}" data-year="{{item.year}}" data-month="{{item.month}}" data-date-string="{{item.dateString}}">
  24. {{item.dateString==today.dateStr?'今天':item.day}}
  25. <view class="spot" wx:if="{{item.dateSecond>=todaySecond&&item.count&&item.count>0}}">{{item.count}}</view>
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. <!-- 推荐 -->
  33. <view class="current-date" wx:if="{{activeData.length>0}}">
  34. <text>{{selectDay.month+'月'+selectDay.day+'日出发'}}</text>
  35. <view class="line"></view>
  36. </view>
  37. <view class="">
  38. <activity data="{{activeData}}" imgPath="{{imgPath}}" />
  39. <view class='noData' hidden='{{activeData.length > 0 ? true : false}}'><text class="icon icon-info"></text><text>~当前日期暂无活动~</text></view>
  40. </view>