* 增强从活动详情解析日期的能力,使一些活动日期更加准确

This commit is contained in:
yoimiya-kokomi 2022-05-29 10:54:26 +08:00
parent d0a59ed78a
commit 95ddcb59ff

View File

@ -33,13 +33,16 @@ let Cal = {
if (detailData && detailData.data && detailData.data.list) {
let versionTime = {};
lodash.forEach(detailData.data.list, (ds) => {
let vRet = /(\d\.\d)版本更新时间/.exec(ds.title)
let vRet = /(\d\.\d)版本更新通知/.exec(ds.title)
if (vRet && vRet[1]) {
let tRet = /([0-9\\/\\: ]){9,}/.exec(ds.content);
let content = /(?:更新时间)\s*〓([^〓]+)(?:〓|$)/.exec(ds.content);
if (content && content[1]) {
let tRet = /([0-9\\/\\: ]){9,}/.exec(content[1]);
if (tRet && tRet[0]) {
versionTime[vRet[1]] = tRet[0].replace("06:00", "11:00");
}
}
}
})
lodash.forEach(detailData.data.list, (ds) => {
let { ann_id, content, title } = ds;