超管后台 - 将所有http请求硬编码改为环境变量配置

This commit is contained in:
柳清爽
2025-04-23 10:35:33 +08:00
parent 4b5b3a7156
commit ede31de6b9
5 changed files with 11 additions and 12 deletions

View File

@@ -32,7 +32,7 @@ export default function DashboardPage() {
setIsLoading(true)
try {
// 获取统计信息
const response = await fetch("http://yishi.com/dashboard/base")
const response = await fetch(`${process.env.NEXT_PUBLIC_API_BASE_URL}/dashboard/base`)
const data = await response.json()
if (data.code === 200) {
setStats(data.data)