/* ============================================= home.js — 主页 ============================================= */ // 腾讯LOL新闻数据(真实链接,2026-07-28抓取) const NEWS_DATA = [ { title: '自然之力玩法概览', date: '2026-07-27', tag: '新闻', url: 'https://lol.qq.com/news/detail.shtml?docid=2940470082043515446' }, { title: '【云顶之弈】莲华温泉 不朽厄斐琉斯(暂译)局内预览', date: '2026-07-27', tag: '视频', url: 'https://lol.qq.com/v/v2/detail.shtml?docid=6022405071576176903' }, { title: '【云顶之弈】职场精英 小小亚托克斯(暂译)局内预览', date: '2026-07-27', tag: '视频', url: 'https://lol.qq.com/v/v2/detail.shtml?docid=10899500935834176517' }, { title: '《双城之战》音乐秀祖安狂欢主题周上线,双人同行限时8折', date: '2026-07-24', tag: '新闻', url: 'https://lol.qq.com/news/detail.shtml?docid=7166884178362213593' }, { title: '璀璨臻彩召唤活动上新', date: '2026-07-24', tag: '公告', url: 'https://lol.qq.com/news/detail.shtml?docid=7177124231319241414' }, { title: '网鱼海斗挑战赛报名开启,一人到店即可参与,赢每城奖金奖品!', date: '2026-07-21', tag: '新闻', url: 'https://lol.qq.com/news/detail.shtml?docid=18361178770552446235' }, { title: '五问星神全球总冠军——AUR Huanmie!', date: '2026-07-17', tag: '新闻', url: 'https://lol.qq.com/news/detail.shtml?docid=15315623112213019510' }, { title: '海斗大赛宝典已上线', date: '2026-07-17', tag: '公告', url: 'https://lol.qq.com/news/detail.shtml?docid=3648675094364817556' }, { title: '英雄联盟活动及模式上线公告', date: '2026-07-16', tag: '公告', url: 'https://lol.qq.com/news/detail.shtml?docid=7073977129233350758' }, { title: '【英雄联盟】T1:2025全球总决赛冠军 官方皮肤宣传片', date: '2026-07-16', tag: '视频', url: 'https://lol.qq.com/v/v2/detail.shtml?docid=10465297417770123157' }, { title: '2025 T1冠军皮肤即将上线', date: '2026-07-15', tag: '公告', url: 'https://lol.qq.com/news/detail.shtml?docid=2371950277838654440' }, { title: '7月16日凌晨1点停机版本更新公告', date: '2026-07-15', tag: '公告', url: 'https://lol.qq.com/gicp/news/410/37091415.html' }, ]; async function renderHome() { const page = document.getElementById('page-home'); page.innerHTML = '
加载中
'; let summoner = null, gameflow = null, ranked = null, wallet = null; await Promise.allSettled([ API.get('summoner').then(d => summoner = d), API.get('gameflow').then(d => gameflow = d), API.get('ranked' ).then(d => ranked = d), API.get('wallet' ).then(d => wallet = d), ]); const name = summoner?.gameName || summoner?.displayName || summoner?.internalName || '---'; const level = summoner?.summonerLevel ?? '--'; const icon = summoner?.profileIconId ?? 29; const phase = typeof gameflow === 'string' ? gameflow : (gameflow?.phase ?? '未知'); // ranked 结构:queueMap.RANKED_SOLO_5x5 let rankStr = '未定级'; const soloQ = ranked?.queueMap?.['RANKED_SOLO_5x5']; if (soloQ && soloQ.tier && soloQ.tier !== '' && soloQ.tier !== 'NONE') { rankStr = `${soloQ.tier} ${soloQ.division !== 'NA' ? soloQ.division : ''} ${soloQ.leaguePoints} LP`.trim(); } // wallet 字段:RP / lol_blue_essence / lol_orange_essence / lol_mythic_essence const be = wallet?.lol_blue_essence ?? 'N/A'; const rp = wallet?.RP ?? 'N/A'; const oe = wallet?.lol_orange_essence ?? 0; const me = wallet?.lol_mythic_essence ?? 0; const iconUrl = API.img(`/lol-game-data/assets/v1/profile-icons/${icon}.jpg`); page.innerHTML = `
👋 欢迎回来,${esc(name)}
等级 ${level}  |  当前状态:${esc(phase)}
⚡ 快捷功能
使用指南
其他问题 >
1 请确保杀毒软件已关闭(火绒除外) > 如何关闭系统自带杀毒?
2 加入熊猫官方QQ群 > 加入我们QQ群
3 熊猫官方网站 > 打开熊猫网站
本软件未经 Riot Games 认可,也不代表 Riot Games 或任何官方参与制作或管理 Riot Games 产品的人的观点或意见。Riot Games 及其所有相关产物均为 Riot Games,Inc 的商标或注册商标。
新闻资讯
更多新闻 >
${NEWS_DATA.map(n => { const tagColor = n.tag === '视频' ? '#fa8c16' : n.tag === '公告' ? '#52c41a' : '#1677ff'; return `
${n.tag} ${esc(n.title)} ${n.date}
`; }).join('')}
`; } function refreshHome() { renderHome(); showToast('状态已刷新', 'ok'); }