初始化模版工程

This commit is contained in:
Cloud Bot
2026-03-20 07:33:46 +00:00
commit 23717e0ecd
386 changed files with 51675 additions and 0 deletions

22
http/request.ts Normal file
View File

@@ -0,0 +1,22 @@
import { HTTPClient } from '@/http'
const CLIENT_API_BASE_URL = process.env.NEXT_PUBLIC_API_BASE_URL || '/api'
export const request = new HTTPClient(
{
baseURL: CLIENT_API_BASE_URL,
headers: {
'Content-Type': 'application/json',
},
},
{
onRequest: async config => config,
onError: (error, config) => {
console.error('request error', {
method: config.method,
url: config.url,
error,
})
},
},
)