feat: typo in docs, radar rule, use id as title (#4038)

This commit is contained in:
NeverBehave
2020-02-25 10:24:43 +08:00
committed by GitHub
parent a5165a72c8
commit b66684c018
4 changed files with 36 additions and 5 deletions
+2 -2
View File
@@ -38,9 +38,9 @@ module.exports = async (ctx) => {
// Maybe we can look into isCheck, condition, and state :)
// But I just want to make it work for now.
ctx.state.data = {
title: `快递 ${company.name}-${number}`,
title: `快递 ${company.name}-${id}`,
link: 'https://www.kuaidi100.com',
description: `快递 ${company.name}-${number}`,
description: `快递 ${company.name}-${id}`,
item: data.map((item) => ({
title: item.context,
description: item.context,
+6 -1
View File
@@ -205,7 +205,12 @@ module.exports = {
// Not yet complete, don't cache for now.
// Per owner suggestion
} else {
ctx.cache.set(query_key, query); // Finished, or error id
if (query.data[0].context === '查无结果') {
// 查无结果 appears when cookie is invaild, force update cookie.
clearCookie(ctx);
} else {
ctx.cache.set(query_key, query); // Finished, or error id
}
}
} else {
query = JSON.parse(query);