mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 05:07:46 +00:00
优化角色面板提示信息#135
This commit is contained in:
parent
e9d912f118
commit
80b39c9864
4 changed files with 35 additions and 14 deletions
|
|
@ -60,10 +60,23 @@ export async function refreshPanelFromEnka(uid) {
|
|||
logger.warn('Enka更新面板失败:获取面板数据失败')
|
||||
return res.status
|
||||
}
|
||||
if (!panelList.length)
|
||||
console.log('面板列表为空')
|
||||
return {
|
||||
playerInfo: parsePlayerInfo(data.PlayerInfo.SocialDetail),
|
||||
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