This commit is contained in:
2025-12-21 12:04:57 +08:00
parent 78927afd7a
commit 7c9072c594
3 changed files with 28 additions and 2 deletions

24
src/apps/beian.tsx Normal file
View File

@@ -0,0 +1,24 @@
const beianList = [
{
hostname: 'https://kevisual.xiongxiao.me',
beian: '蜀ICP备16031039号-2'
},
{
hostname: 'https://kevisual.cn',
beian: '浙ICP备2025158778号'
}
]
export const Beian = () => {
const hostname = window.location.hostname;
const beianInfo = beianList.find(item => hostname.includes(item.hostname.replace('https://', '').replace('http://', '')));
if (!beianInfo) return null;
return (
<div className="text-center text-sm text-gray-500 my-2">
<a href="https://beian.miit.gov.cn/" target="_blank" rel="noopener noreferrer" className="hover:underline">
{beianInfo.beian}
</a>
</div>
);
}

View File

@@ -9,6 +9,7 @@ import { ToastContainer } from 'react-toastify';
import 'react-toastify/dist/ReactToastify.css';
import { useHomeStore } from './store';
import { nanoid } from 'nanoid';
import { Beian } from '../beian';
const useFocus = () => {
const inputRef = useRef<HTMLInputElement>(null);
useEffect(() => {
@@ -88,5 +89,6 @@ export const AppProvider = () => {
<Nav />
<App />
<ToastContainer />
<Beian />
</XProvider>;
}