Browse Source

修复日期格式问题

master
1191151619 4 years ago
parent
commit
a28f19c688
  1. 8
      components/ui-calendar/ui-calendar.wxss
  2. 4
      pages/calendar/calendar.js

8
components/ui-calendar/ui-calendar.wxss

@ -14,16 +14,16 @@
align-items: center;
justify-content: center;
margin: 12rpx;
width: 76rpx;
height: 76rpx;
width: 74rpx;
height: 74rpx;
box-sizing: border-box;
}
.item .item_view {
display: flex !important;
align-items: center !important;
justify-content: center !important;
width: 76rpx !important;
height: 76rpx !important;
width: 74rpx !important;
height: 74rpx !important;
box-sizing: border-box !important;
}

4
pages/calendar/calendar.js

@ -125,8 +125,10 @@ Page({
onShow: function () {
let demo = wx.getStorageSync("date");
let timer = this.data.timer;
let getDate = new Date().getDate();
if (!timer) {
timer = this.data.calendarDisplayTime + '-' + new Date().getDate();
getDate = getDate>9?getDate:'0'+getDate
timer = this.data.calendarDisplayTime + '-' + getDate;
}
if (demo) {
timer = demo.time

Loading…
Cancel
Save