|
@@ -43,7 +43,7 @@
|
|
|
<view class="c_title">打卡记录</view>
|
|
|
<view class="punch_calendar">
|
|
|
<view class="card_box">
|
|
|
- {{ curMonth + '月'}}
|
|
|
+ {{ curYear + '年' + curMonth + '月'}}
|
|
|
</view>
|
|
|
<!-- <u-line color="#EEEEEE" /> -->
|
|
|
<view class="weeks">
|
|
@@ -68,6 +68,7 @@ export default {
|
|
|
return {
|
|
|
weekLists: ['日','一','二','三','四','五','六'],
|
|
|
date_num: [],
|
|
|
+ curYear: 0, // 当前年份
|
|
|
curMonth: 0, // 当前月份
|
|
|
goodsId: '',
|
|
|
orderGoodsId: '',
|
|
@@ -87,9 +88,9 @@ export default {
|
|
|
// 初始化当月日历
|
|
|
initCalendar() {
|
|
|
let date = new Date()
|
|
|
- let year = date.getFullYear() //获取当前年份
|
|
|
+ this.curYear = date.getFullYear() //获取当前年份
|
|
|
this.curMonth = date.getMonth() + 1 //获取当前月份
|
|
|
- let dd = new Date(year, this.curMonth, 0) //获取当月总天数
|
|
|
+ let dd = new Date(this.curYear, this.curMonth, 0) //获取当月总天数
|
|
|
let current_month = []
|
|
|
// let weekList = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"]
|
|
|
for (let i = 1; i <= dd.getDate(); i++) {
|