-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
master1lan
committed
Apr 9, 2023
1 parent
76011c8
commit a76c02a
Showing
3 changed files
with
65 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,58 @@ | ||
| import { Pick } from ".."; | ||
| import { RFetchEUWhatLookIngRes } from "./eu6type"; | ||
|
|
||
| export const Host_Url = isdev ? "/v1" : `https://api.vtb.link/eoefans-api/v1`; | ||
| `https://api.eoe.best/eoefans-api/v1`; | ||
|
|
||
| //eu都在溜什么的url | ||
| export const EUWhatLookIng_Url = isdev | ||
| ? "/eoefans-video-rank/v1" | ||
| : `https://api.eoefans.com/eoefans-video-rank/v1`; | ||
| ? "/vtb-rank/v1" | ||
| : `https://gateway.vtb.link/vtb-rank/v1`; | ||
|
|
||
| // 新eu都在溜什么的接口类型 | ||
| type RNewEUWhatLookIng = { | ||
| code: 0; | ||
| msg: "success"; | ||
| data: { | ||
| ctime: number; | ||
| list: { | ||
| aid: number; | ||
| bvid: string; | ||
| pic: string; | ||
| title: string; | ||
| pubdate: 1680273934; | ||
| state: 0; | ||
| duration: string; | ||
| mid: number; | ||
| name: string; | ||
| face: string; | ||
| view: number; | ||
| danmaku: number; | ||
| reply: number; | ||
| favorite: number; | ||
| coin: number; | ||
| share: number; | ||
| like: number; | ||
| total_number: string; | ||
| }[]; | ||
| }; | ||
| }; | ||
| //eu都在溜什么 接口模式修改 | ||
| export function transForEUWhatLookIngResData( | ||
| newTypeData: RNewEUWhatLookIng | ||
| ): RFetchEUWhatLookIngRes { | ||
| const list = newTypeData.data.list.map((item) => ({ | ||
| ...Pick(item, "bvid", "pic", "title", "duration"), | ||
| owner: Pick(item, "name", "face", "mid"), | ||
| stat: Pick(item, "view", "danmaku", "favorite", "coin", "share", "like"), | ||
| total_number_text: item.total_number, | ||
| })); | ||
| const Res: RFetchEUWhatLookIngRes = { | ||
| code: newTypeData.code, | ||
| data: { | ||
| ctime: newTypeData.data.ctime, | ||
| list: list, | ||
| }, | ||
| }; | ||
| return Res; | ||
| } |