|
|
@@ -264,12 +264,14 @@ class PunchClocks extends Component {
|
|
|
Taro.showToast({ title: '定位错误,请联系管理员', icon: 'none' })
|
|
|
return;
|
|
|
}
|
|
|
+ console.log([5, 6].includes(dtails.type))
|
|
|
|
|
|
if ([5, 6].includes(dtails.type)) {
|
|
|
let nowTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
|
|
|
let startTime = dayjs(dtails.releaseStarts).format('YYYY-MM-DD 00:00:00')
|
|
|
let endTime = dayjs(dtails.releaseEnds).format('YYYY-MM-DD 23:59:59')
|
|
|
- if (dayjs(nowTime).isAfter(dayjs(startTime)) && dayjs(nowTime).isBefore(dayjs(endTime)) ) {
|
|
|
+ console.log(dayjs(nowTime).isAfter(dayjs(startTime)), dayjs(nowTime).isBefore(dayjs(endTime)))
|
|
|
+ if (!(dayjs(nowTime).isAfter(dayjs(startTime)) && dayjs(nowTime).isBefore(dayjs(endTime)))) {
|
|
|
Taro.hideLoading()
|
|
|
Taro.showToast({ title: '当前时间不在打卡时间范围内,无法打卡', icon: 'none' })
|
|
|
return
|