Skip to content

Commit

Permalink
Merge branch 'main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
hakadao committed Apr 17, 2024
2 parents 2542103 + c5c1a16 commit fb275bc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/background/messageListeners/ranking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const API_RANKING: APIMAP = {
afterHandle: AHS.J_D,
},
getRankingPgc: {
url: 'https://api.bilibili.com/pgc/web/rank/list',
url: 'https://api.bilibili.com/pgc/season/rank/web/list',
_fetch: {
method: 'get',
},
Expand Down
2 changes: 1 addition & 1 deletion src/contentScripts/views/Home/components/Ranking.vue
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ function getRankingPgc() {
season_type: activatedRankingType.value.seasonType,
}).then((response: RankingPgcResult) => {
if (response.code === 0)
Object.assign(PgcList, response.result.list)
Object.assign(PgcList, response.data.list)
}).finally(() => isLoading.value = false)
}
Expand Down
14 changes: 6 additions & 8 deletions src/models/video/rankingPgc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@

export interface RankingPgcResult {
code: number
data: Data
message: string
result: Result
}

export interface Result {
export interface Data {
list: List[]
note: string
season_type: number
}

export interface List {
badge: Badge
badge_info: BadgeInfo
badge_type: number
copyright: Copyright
cover: string
desc: string
enable_vt: boolean
icon_font: IconFont
new_ep: NewEp
Expand All @@ -30,9 +31,11 @@ export interface List {
}

export enum Badge {
Empty = '',
会员专享 = '会员专享',
会员抢先 = '会员抢先',
独家 = '独家',
限时免费 = '限时免费',
}

export interface BadgeInfo {
Expand All @@ -51,11 +54,6 @@ export enum BgColorNight {
The0B91Be = '#0B91BE',
}

export enum Copyright {
Bilibili = 'bilibili',
Dujia = 'dujia',
}

export interface IconFont {
name: Name
text: string
Expand Down

0 comments on commit fb275bc

Please sign in to comment.