Skip to content

Commit

Permalink
Change(web): 📝 更改节日祝福判断
Browse files Browse the repository at this point in the history
  • Loading branch information
a76yyyy committed Feb 8, 2024
1 parent d2db676 commit 6cb59c3
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions web/tpl/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,8 @@
return version
}
var d = Solar.fromDate(new Date())
holiday = HolidayUtil.getHoliday(d.toYmd())
if (holiday) {
if (holiday.isWork()) {
return version
}
return holiday.getName() + '快乐'
} else {
return version
}
festivals = d.getFestivals().length > 0 ? d.getFestivals() : d.getLunar().getFestivals()
return festivals.length > 0 ? festivals[0] + '快乐' : version
}
</script>
{% block body %}{% endblock %}
Expand Down

0 comments on commit 6cb59c3

Please sign in to comment.