Skip to content

Commit 6cb59c3

Browse files
committed
Change(web): 📝 更改节日祝福判断
1 parent d2db676 commit 6cb59c3

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

web/tpl/base.html

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,8 @@
9797
return version
9898
}
9999
var d = Solar.fromDate(new Date())
100-
holiday = HolidayUtil.getHoliday(d.toYmd())
101-
if (holiday) {
102-
if (holiday.isWork()) {
103-
return version
104-
}
105-
return holiday.getName() + '快乐'
106-
} else {
107-
return version
108-
}
100+
festivals = d.getFestivals().length > 0 ? d.getFestivals() : d.getLunar().getFestivals()
101+
return festivals.length > 0 ? festivals[0] + '快乐' : version
109102
}
110103
</script>
111104
{% block body %}{% endblock %}

0 commit comments

Comments
 (0)