姨妈管家小程序代码

index.wxml 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <template name="calendar">
  2. <view class="calendar box box-tb">
  3. <view class="box title">
  4. <view class="box prev" bindtap="handleCalendar" data-handle="prev">
  5. <icon class="icon icon-gopre"></icon>
  6. </view>
  7. <!-- bindtap="chooseYearAndMonth" -->
  8. <view class="box">{{curYear || "--"}} 年 {{curMonth || "--"}} 月</view>
  9. <view class="box next" bindtap="handleCalendar" data-handle="next">
  10. <icon class="icon icon-gonext"></icon>
  11. </view>
  12. </view>
  13. <view class="box weeks">
  14. <view class="week" wx:for="{{weeksCh}}" wx:key="{{index}}" data-idx="{{index}}">{{item}}</view>
  15. </view>
  16. <view class="loading" hidden="{{hiddenLoading}}"><image src="https://ymgjapi.726p.com/icon/maicon/loding.gif"></image></view>
  17. <view class="box box-wrap days" hidden="{{!hiddenLoading}}">
  18. <!-- 占位空格 -->
  19. <view wx:if="{{hasEmptyGrid}}" class="box grid" wx:for="{{empytGrids}}" wx:key="{{index}}" data-idx="{{index}}"></view>
  20. <!-- days bindtap="tapDayItem"-->
  21. <view class="box box-tb grid" wx:for="{{days}}" wx:key="{{index}}" data-idx="{{index}}">
  22. <view class="box day period-bg-color" wx:if="{{item.status == 3}}">{{item.day}}</view>
  23. <view class="box day safety-bg-color" wx:elif="{{item.status == 9}}">{{item.day}}</view>
  24. <view class="box day ovulation-bg-color" wx:elif="{{item.status == 6}}">{{item.day}}</view>
  25. <view class="box day" wx:else>{{item.day}}</view>
  26. <icon class="icon icon-cicle {{item.status == 1 ? 'period-bg-color' : ''}}" wx:if="{{item.status == 1}}"></icon>
  27. <icon class="icon icon-cicle {{item.status == 2 ? 'period-br-color' : ''}}" wx:elif="{{item.status == 2}}"></icon>
  28. <icon class="icon icon-cicle {{item.status == 4 ? 'ovulation-bg-color' : ''}}" wx:elif="{{item.status == 4}}"></icon>
  29. <icon class="icon icon-cicle {{item.status == 5 ? 'ovulation-br-color' : ''}}" wx:elif="{{item.status == 5}}"></icon>
  30. <icon class="icon icon-cicle {{item.status == 7 ? 'safety-bg-color' : ''}}" wx:elif="{{item.status == 7}}"></icon>
  31. <icon class="icon icon-cicle {{item.status == 8 ? 'safety-br-color' : ''}}" wx:elif="{{item.status == 8}}"></icon>
  32. <text class="ovulation-text" wx-if="{{item.status == 10}}">排卵日</text>
  33. </view>
  34. </view>
  35. </view>
  36. <view wx:if="{{showPicker}}" class="box box-tb date-picker">
  37. <view class="box picker-btns">
  38. <view class="picker-btn picker-cancel" data-type="cancel" bindtap="tapPickerBtn">取消</view>
  39. <view class="picker-btn picker-confirm" data-type="confirm" bindtap="tapPickerBtn">确定</view>
  40. </view>
  41. <picker-view class="flex picker-content" indicator-style="height: 50px;" value="{{pickerValue}}" bindchange="pickerChange">
  42. <picker-view-column>
  43. <view class="picker-view" wx:for="{{pickerYear}}" wx:key="*this" style="line-height: 50px">{{item}}年</view>
  44. </picker-view-column>
  45. <picker-view-column>
  46. <view class="picker-view" wx:for="{{pickerMonth}}" wx:key="*this" style="line-height: 50px">{{item}}月</view>
  47. </picker-view-column>
  48. </picker-view>
  49. </view>
  50. <view class="mask" wx:if="{{showPicker}}"></view>
  51. </template>