import PageContainerBehavior from "../../../../core/behavior/page-container.behavior"; import tickleBehavior, { getTickleContext } from "../../../../core/behavior/tickle.behavior"; import { addPatientOnlineRecord } from "../../request" // module/article/pages/punch-card/punch-card.ts Page({ behaviors: [ PageContainerBehavior, tickleBehavior, ], onLoad(options) { if (options.id) { this.setData({ id: options.id }); wx.setStorageSync('recordId', options.id); } // 获取当前日期 this.getCurrentDate(); }, properties: { }, data: { id: '', currentDate: '', }, onSelect(e: any) { this.setData({ currentDate: e.detail.selectedDate }); }, // 获取当前日期 getCurrentDate() { const date = new Date(); this.setData({ currentDate: `${date.getFullYear().toString()} ${date.getMonth() + 1}.${date.getDate().toString()}` }); }, onCalendarChange(e: any) { // 处理日期切换 // e.detail.date } })