index.wxml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <!-- 打卡日历页面 -->
  2. <nav title="签到中心" type="back" background-color="#2681ff"></nav>
  3. <view class="continuouspunching_style">
  4. <!-- 累计打卡次数 -->
  5. <view class="clockfrequency_view_style">
  6. <view class="daka_info">
  7. <view class="daka_tiansu">
  8. <text class="daka_number_style">{{count}}</text>
  9. </view>
  10. <view class="daka_jiesao">累计打卡</view>
  11. </view>
  12. <view class="daka_info">
  13. <view class="daka_tiansu">
  14. <text class="daka_number_style">{{continuous_daka_count}}</text>
  15. </view>
  16. <view class="daka_jiesao">连续打卡</view>
  17. </view>
  18. </view>
  19. <!-- 累计打卡次数end -->
  20. <!-- 日历 -->
  21. <view class='all'>
  22. <view class="bar">
  23. <!-- 显示年月 -->
  24. <view class="date">
  25. <view class="sanjiao" bindtap="handleCalendar" data-handle="prev"></view>
  26. {{cur_year || "--"}} 年 {{cur_month || "--"}} 月
  27. <view class="you_sanjiao" bindtap="handleCalendar" data-handle="next"></view>
  28. </view>
  29. </view>
  30. <!-- 显示星期 -->
  31. <view class="week">
  32. <view wx:for="{{weeks_ch}}" wx:key="index" data-idx="{{index}}">{{item}}</view>
  33. </view>
  34. <view class='days'>
  35. <!-- 列 -->
  36. <view class="columns" wx:for="{{days.length/7}}" wx:for-index="i" wx:key="i">
  37. <view wx:for="{{days}}" wx:for-index="j" wx:key="j">
  38. <!-- 行 -->
  39. <view class="rows" wx:if="{{j/7 == i}}">
  40. <view class="rows" wx:for="{{7}}" wx:for-index="k" wx:key="k">
  41. <!-- 每个月份的空的单元格 -->
  42. <view class='cell' wx:if="{{days[j+k].date == null}}">
  43. <text decode="{{true}}">&nbsp;&nbsp;</text>
  44. </view>
  45. <!-- 每个月份的有数字的单元格 -->
  46. <view class='cell' wx:else>
  47. <!-- 当前日期已签到 -->
  48. <view wx:if="{{days[j+k].isSign == true}}" style='background-color:#2681FF; color: white;' class='cell'>
  49. <text>{{days[j+k].date}}</text>
  50. </view>
  51. <!-- 当前日期未签到 -->
  52. <view wx:else>
  53. <text>{{days[j+k].date}}</text>
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. </view>
  62. <view class="credit">{{task.desc}}</view>
  63. <van-button custom-class="mxc2-1" color="#2681ff" round type="primary" size="large" bind:click="check">每日签到</van-button>
  64. </view>