123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <template name="calendar">
- <view class="calendar box box-tb">
- <view class="box title">
- <view class="box prev" bindtap="handleCalendar" data-handle="prev">
- <icon class="icon icon-gopre"></icon>
- </view>
- <!-- bindtap="chooseYearAndMonth" -->
- <view class="box">{{curYear || "--"}} 年 {{curMonth || "--"}} 月</view>
- <view class="box next" bindtap="handleCalendar" data-handle="next">
- <icon class="icon icon-gonext"></icon>
- </view>
- </view>
- <view class="box weeks">
- <view class="week" wx:for="{{weeksCh}}" wx:key="{{index}}" data-idx="{{index}}">{{item}}</view>
- </view>
- <view class="loading" hidden="{{hiddenLoading}}"><image src="https://ymgjapi.726p.com/icon/maicon/loding.gif"></image></view>
- <view class="box box-wrap days" hidden="{{!hiddenLoading}}">
- <!-- 占位空格 -->
- <view wx:if="{{hasEmptyGrid}}" class="box grid" wx:for="{{empytGrids}}" wx:key="{{index}}" data-idx="{{index}}"></view>
- <!-- days bindtap="tapDayItem"-->
- <view class="box box-tb grid" wx:for="{{days}}" wx:key="{{index}}" data-idx="{{index}}">
- <view class="box day period-bg-color" wx:if="{{item.status == 3}}">{{item.day}}</view>
- <view class="box day safety-bg-color" wx:elif="{{item.status == 9}}">{{item.day}}</view>
- <view class="box day ovulation-bg-color" wx:elif="{{item.status == 6}}">{{item.day}}</view>
- <view class="box day" wx:else>{{item.day}}</view>
- <icon class="icon icon-cicle {{item.status == 1 ? 'period-bg-color' : ''}}" wx:if="{{item.status == 1}}"></icon>
- <icon class="icon icon-cicle {{item.status == 2 ? 'period-br-color' : ''}}" wx:elif="{{item.status == 2}}"></icon>
- <icon class="icon icon-cicle {{item.status == 4 ? 'ovulation-bg-color' : ''}}" wx:elif="{{item.status == 4}}"></icon>
- <icon class="icon icon-cicle {{item.status == 5 ? 'ovulation-br-color' : ''}}" wx:elif="{{item.status == 5}}"></icon>
- <icon class="icon icon-cicle {{item.status == 7 ? 'safety-bg-color' : ''}}" wx:elif="{{item.status == 7}}"></icon>
- <icon class="icon icon-cicle {{item.status == 8 ? 'safety-br-color' : ''}}" wx:elif="{{item.status == 8}}"></icon>
- <text class="ovulation-text" wx-if="{{item.status == 10}}">排卵日</text>
- </view>
- </view>
- </view>
- <view wx:if="{{showPicker}}" class="box box-tb date-picker">
- <view class="box picker-btns">
- <view class="picker-btn picker-cancel" data-type="cancel" bindtap="tapPickerBtn">取消</view>
- <view class="picker-btn picker-confirm" data-type="confirm" bindtap="tapPickerBtn">确定</view>
- </view>
- <picker-view class="flex picker-content" indicator-style="height: 50px;" value="{{pickerValue}}" bindchange="pickerChange">
- <picker-view-column>
- <view class="picker-view" wx:for="{{pickerYear}}" wx:key="*this" style="line-height: 50px">{{item}}年</view>
- </picker-view-column>
- <picker-view-column>
- <view class="picker-view" wx:for="{{pickerMonth}}" wx:key="*this" style="line-height: 50px">{{item}}月</view>
- </picker-view-column>
- </picker-view>
- </view>
- <view class="mask" wx:if="{{showPicker}}"></view>
- </template>
|