|
|
|
@ -11,7 +11,7 @@ interface RequestOptions extends RequestInit {
|
|
|
|
|
// 发送数据请求
|
|
|
|
|
const request = async (url: string, config?: RequestOptions) => {
|
|
|
|
|
const method = config?.method || 'GET';
|
|
|
|
|
const finalUrl = method === 'POST' ? `/queyueapi${url}` : `http://api.indie.cn:9012/${url}`;
|
|
|
|
|
const finalUrl = method === 'POST' ? `/queyueapi${url}` : `${process.env.NEXT_PUBLIC_HOST}/${url}`;
|
|
|
|
|
|
|
|
|
|
const inital: RequestOptions = {
|
|
|
|
|
method: method,
|
|
|
|
|