|
@@ -3427,11 +3427,22 @@
|
|
this.choseDay = day-1;
|
|
this.choseDay = day-1;
|
|
}
|
|
}
|
|
if(sessionStorage.from != 1){
|
|
if(sessionStorage.from != 1){
|
|
- console.log('非消息跳转');
|
|
|
|
- this.choseDay = 0;
|
|
|
|
- sessionStorage.msg = this.date + '-01'
|
|
|
|
- let monthdate = new Date(this.date + '-01')
|
|
|
|
- this.curDate = (monthdate.getMonth() + 1) + '月' + monthdate.getDate() + '日'
|
|
|
|
|
|
+
|
|
|
|
+ let nowmonth = new Date().getMonth() + 1
|
|
|
|
+ let nowd = new Date().getFullYear() + '-' + (nowmonth < 10 ? '0' + nowmonth : nowmonth)
|
|
|
|
+ if(nowd == this.date){
|
|
|
|
+ let nowday = new Date().getDate()
|
|
|
|
+ this.choseDay = nowday - 1
|
|
|
|
+ sessionStorage.msg = this.date + '-' + (nowday < 10 ? '0' + nowday : nowday)
|
|
|
|
+ let monthdate = new Date(sessionStorage.msg)
|
|
|
|
+ this.curDate = (monthdate.getMonth() + 1) + '月' + monthdate.getDate() + '日'
|
|
|
|
+ console.log('choseday',sessionStorage.msg,this.choseDay,monthdate.getDate());
|
|
|
|
+ }else{
|
|
|
|
+ this.choseDay = 0;
|
|
|
|
+ sessionStorage.msg = this.date + '-01'
|
|
|
|
+ let monthdate = new Date(this.date + '-01')
|
|
|
|
+ this.curDate = (monthdate.getMonth() + 1) + '月' + monthdate.getDate() + '日'
|
|
|
|
+ }
|
|
}else{
|
|
}else{
|
|
this.choseDay = parseInt(sessionStorage.msg.split('-')[2]) - 1
|
|
this.choseDay = parseInt(sessionStorage.msg.split('-')[2]) - 1
|
|
}
|
|
}
|
|
@@ -3442,9 +3453,11 @@
|
|
sessionStorage.from = 0;
|
|
sessionStorage.from = 0;
|
|
} else {
|
|
} else {
|
|
if (curMonthDay != null) {
|
|
if (curMonthDay != null) {
|
|
- this.curDate = curMonthDay;
|
|
|
|
|
|
+ // this.curDate = curMonthDay;
|
|
|
|
+ let d = new Date(sessionStorage.msg)
|
|
|
|
+ this.curDate = (d.getMonth()+1)+'月'+d.getDate()+'日';
|
|
} else {
|
|
} else {
|
|
- var d = new Date(this.date.replace(/-/g, "/")+'/01')
|
|
|
|
|
|
+ let d = new Date(this.date.replace(/-/g, "/")+'/01')
|
|
this.curDate = (d.getMonth()+1)+'月'+d.getDate()+'日';
|
|
this.curDate = (d.getMonth()+1)+'月'+d.getDate()+'日';
|
|
}
|
|
}
|
|
}
|
|
}
|