update: 2026-03-28 20:59
This commit is contained in:
67
InfoGenie-frontend/public/60sapi/热门榜单/抖音热搜.html
Normal file
67
InfoGenie-frontend/public/60sapi/热门榜单/抖音热搜.html
Normal file
@@ -0,0 +1,67 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>抖音热搜</title>
|
||||
<style>
|
||||
*{margin:0;padding:0;box-sizing:border-box}
|
||||
body{font-family:'KaiTi','楷体',serif;background:#f9fafb;color:#1f2937;line-height:1.6;min-height:100vh}
|
||||
.header{background:linear-gradient(135deg,#065f46,#059669);color:#fff;padding:16px;display:flex;align-items:center;gap:12px;position:sticky;top:0;z-index:10}
|
||||
.header h1{flex:1;font-size:16px;font-weight:700}.btn{width:36px;height:36px;border:none;border-radius:10px;background:rgba(255,255,255,.15);color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:18px}.btn:hover{background:rgba(255,255,255,.25)}
|
||||
.body{max-width:720px;margin:0 auto;padding:20px 16px 40px}
|
||||
.rank-item{display:flex;align-items:center;gap:12px;padding:12px 14px;margin-bottom:6px;border-radius:12px;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.04);transition:all .15s}
|
||||
.rank-item:hover{box-shadow:0 3px 10px rgba(0,0,0,.08);transform:translateX(2px)}
|
||||
.badge{flex-shrink:0;width:30px;height:30px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:800;color:#9ca3af;background:#f3f4f6}
|
||||
.badge.t1{color:#fff;background:linear-gradient(135deg,#ef4444,#dc2626)}.badge.t2{color:#fff;background:linear-gradient(135deg,#f97316,#ea580c)}.badge.t3{color:#fff;background:linear-gradient(135deg,#eab308,#ca8a04)}
|
||||
.rank-body{flex:1;min-width:0}
|
||||
.rank-title{font-size:14px;font-weight:500;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
||||
.rank-title a{color:inherit;text-decoration:none}.rank-title a:hover{color:#059669}
|
||||
.rank-meta{font-size:11px;color:#b0b0b0;margin-top:2px}
|
||||
.loader{display:flex;flex-direction:column;align-items:center;padding:60px 0;color:#9ca3af;gap:10px;font-size:13px}
|
||||
.spinner{width:24px;height:24px;border:3px solid #e5e7eb;border-top-color:#059669;border-radius:50%;animation:spin 1s linear infinite}
|
||||
@keyframes spin{to{transform:rotate(360deg)}}
|
||||
.err{text-align:center;padding:40px 16px;color:#ef4444;font-size:14px}
|
||||
@media(max-width:640px){.body{padding:16px 12px 32px}.rank-title{font-size:13px}.header h1{font-size:14px}}
|
||||
</style>
|
||||
<script src="/60sapi/ig-embed.js"></script>
|
||||
<script src="/60sapi/sixty-runtime.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<button class="btn" onclick="history.back()">←</button>
|
||||
<h1>🎵 抖音热搜</h1>
|
||||
<button class="btn" onclick="loadData()">↻</button>
|
||||
</div>
|
||||
<div class="body" id="content">
|
||||
<div class="loader"><div class="spinner"></div><span>加载中...</span></div>
|
||||
</div>
|
||||
<script>
|
||||
async function loadData(){
|
||||
const el=document.getElementById('content');
|
||||
el.innerHTML='<div class="loader"><div class="spinner"></div><span>加载中...</span></div>';
|
||||
try{
|
||||
const res=await fetch(window.__SIXTY_API_BASE__+'/v2/douyin?encoding=json',{headers:{Accept:'application/json'}});
|
||||
const json=await res.json();
|
||||
const d=json.data||json;
|
||||
const list=Array.isArray(d)?d:d?.items||d?.list||[];
|
||||
if(!list.length)throw new Error('暂无数据');
|
||||
let html='';
|
||||
list.slice(0,50).forEach((item,i)=>{
|
||||
const title=item.title||item.name||item.content||item.text||item.word||String(item);
|
||||
const link=item.link||item.url||item.mobileUrl||'';
|
||||
const hot=item.hot||item.hotScore||item.heat||item.score||item.box||item.rating||'';
|
||||
const desc=item.desc||item.description||item.subtitle||'';
|
||||
const cls=i===0?'t1':i===1?'t2':i===2?'t3':'';
|
||||
html+=`<div class="rank-item"><div class="badge ${cls}">${i+1}</div><div class="rank-body">`;
|
||||
html+=`<div class="rank-title">${link?`<a href="${link}" target="_blank" rel="noopener">${title} ↗</a>`:title}</div>`;
|
||||
if(desc)html+=`<div class="rank-meta">${desc.length>60?desc.slice(0,60)+'…':desc}</div>`;
|
||||
if(hot)html+=`<div class="rank-meta">🔥 ${typeof hot==='number'?hot.toLocaleString():hot}</div>`;
|
||||
html+='</div></div>';
|
||||
});
|
||||
el.innerHTML=html;
|
||||
}catch(e){el.innerHTML=`<div class="err">加载失败:${e.message}</div>`}
|
||||
}
|
||||
loadData();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user