mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 05:07:46 +00:00
fix:#134
This commit is contained in:
parent
9eb7c6799f
commit
76f23141f8
1 changed files with 2 additions and 17 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { Enka2Mys } from './formater.js'
|
||||
import fetch from 'node-fetch'
|
||||
import request from '../../utils/request.js'
|
||||
|
||||
const EnkaApi = 'https://enka.network/api/zzz/uid/'
|
||||
|
||||
|
|
@ -23,7 +23,7 @@ export function parsePlayerInfo(SocialDetail = {}) {
|
|||
* @param {string|number} uid
|
||||
*/
|
||||
export async function refreshPanelFromEnka(uid) {
|
||||
const res = await fetch(`${EnkaApi}${uid}`, {
|
||||
const res = await request(`${EnkaApi}${uid}`, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'User-Agent': 'ZZZ-Plugin/UCPr',
|
||||
|
|
@ -47,18 +47,3 @@ export async function refreshPanelFromEnka(uid) {
|
|||
panelList: Enka2Mys(panelList)
|
||||
}
|
||||
}
|
||||
|
||||
// import fs from 'fs'
|
||||
// const uid = 11070609
|
||||
// const res = await fetch(`${EnkaApi}${uid}`, {
|
||||
// method: 'GET',
|
||||
// headers: {
|
||||
// 'User-Agent': 'ZZZ-Plugin/UCPr',
|
||||
// }
|
||||
// })
|
||||
// if (!res.ok) {
|
||||
// console.log(`Enka更新面板失败:${res.status} ${res.statusText}`)
|
||||
// }
|
||||
// const data = await res.json()
|
||||
// console.log(data)
|
||||
// fs.writeFileSync('enkaPanel1.json', JSON.stringify(data, null, 2))
|
||||
Loading…
Add table
Add a link
Reference in a new issue