update: 跳转

main
fadeaway 6 months ago
parent 76e70584ad
commit df8c5ccd55

@ -7,7 +7,7 @@ import useNav from '@/hooks/useNav';
export default function InviteBanner() {
const nav = useNav();
const handleClick = () => {
nav.push({ path: '/index' });
nav.push({ path: '/' });
};
return (
<div

@ -21,7 +21,7 @@ export default function useNav() {
queryStr += `?${queryArr.join('&')}`;
}
if (process.env.NODE_ENV === 'production') {
window.location.href = `${path}.html${queryStr}`;
window.location.href = `${path === '/' ? '/index' : path}.html${queryStr}`;
} else {
router.push(`${path}${queryStr}`);
}

Loading…
Cancel
Save