feat: migrate web preview to Next.js
Verify mini program and deploy preview / verify-deploy (push) Successful in 3m30s

This commit is contained in:
2026-09-20 14:22:47 +08:00
parent 36aee09dfa
commit b5ee950142
40 changed files with 6897 additions and 1362 deletions
+27
View File
@@ -0,0 +1,27 @@
'use client';
import Link from 'next/link';
import { usePathname } from 'next/navigation';
const ITEMS = [
{ href: '/', label: '测试', icon: 'home' },
{ href: '/discover', label: '发现', icon: 'discover' },
{ href: '/me', label: '我的', icon: 'me' }
];
export default function BottomNav() {
const pathname = usePathname();
return (
<nav className="bottomNav" aria-label="主导航">
{ITEMS.map(item => {
const active = item.href === '/' ? pathname === '/' : pathname.startsWith(item.href);
return (
<Link key={item.href} href={item.href} className={`navItem ${active ? 'active' : ''}`}>
<i className={`navGlyph ${item.icon}`} />
<span>{item.label}</span>
</Link>
);
})}
</nav>
);
}