Skip to content

Commit

Permalink
chore: 更新分类规则
Browse files Browse the repository at this point in the history
  • Loading branch information
orilights committed Apr 2, 2024
1 parent 14364d0 commit eb79232
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
"recommendations": ["Vue.volar"]
}
2 changes: 2 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,8 @@ function getNewsType(title: string, id: number): string {
for (const [type, rule] of Object.entries(Rules)) {
if (rule.include.includes(id))
return type
}
for (const [type, rule] of Object.entries(Rules)) {
if (rule.exclude.includes(id))
continue
for (const keyword of rule.keyword) {
Expand Down
16 changes: 13 additions & 3 deletions src/constants/rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ export const Rules: { [index: string]: Rule } = {
include: [],
exclude: [],
},
OST: {
keyword: [/OST.*上线/],
include: [],
exclude: [],
},
新区域展示页: {
keyword: ['新区域展示页'],
include: [],
Expand All @@ -24,6 +29,11 @@ export const Rules: { [index: string]: Rule } = {
include: [],
exclude: [],
},
集录祈愿: {
keyword: ['集录祈愿'],
include: [],
exclude: [],
},
角色活动祈愿: {
keyword: ['祈愿即将开启', '祈愿现已开启', '活动祈愿'],
include: [],
Expand Down Expand Up @@ -60,7 +70,7 @@ export const Rules: { [index: string]: Rule } = {
exclude: [],
},
版本PV: {
keyword: ['版本PV'],
keyword: [/\d\.\d版本PV/],
include: [],
exclude: [],
},
Expand Down Expand Up @@ -155,8 +165,8 @@ export const Rules: { [index: string]: Rule } = {
exclude: [],
},
角色PV: {
keyword: [/角色.*预告PV/, '角色PV'],
include: [116213],
keyword: ['角色PV'],
include: [116213, 116322],
exclude: [],
},
角色演示: {
Expand Down

0 comments on commit eb79232

Please sign in to comment.