优化角色面板提示信息#135

This commit is contained in:
UCPr 2025-07-02 02:17:21 +08:00
parent e9d912f118
commit 80b39c9864
4 changed files with 35 additions and 14 deletions

View file

@ -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))