Update sice.js
This commit is contained in:
@@ -7,7 +7,7 @@ module.exports = async (ctx) => {
|
||||
const $ = cheerio.load(response.data);
|
||||
const out = $('.notice p').map((index, item) => {
|
||||
item = $(item);
|
||||
date = new Date(new Date().getFullYear() + '-' + item.find('a.date').text());
|
||||
let date = new Date(new Date().getFullYear() + '-' + item.find('a.date').text());
|
||||
if (new Date() < date) {
|
||||
date = new Date((new Date().getFullYear() - 1) + '-' + item.find('a.date').text());
|
||||
}
|
||||
@@ -26,4 +26,4 @@ module.exports = async (ctx) => {
|
||||
description: '电子科技大学信息与通信工程学院通知公告',
|
||||
item: out
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user