diff --git a/packages/admin/src/config/host.ts b/packages/admin/src/config/host.ts deleted file mode 100644 index 161fa787..00000000 --- a/packages/admin/src/config/host.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * BaseApi设置 - */ -export function getBaseApi() { - return `http://mars-api.marsview.cc/api`; -} diff --git a/packages/editor/src/pages/home/PageList.tsx b/packages/editor/src/pages/home/PageList.tsx index ddbe7a84..4ef0c168 100644 --- a/packages/editor/src/pages/home/PageList.tsx +++ b/packages/editor/src/pages/home/PageList.tsx @@ -156,7 +156,7 @@ export default function Index() { { - window.open(`http://admin.marsview.cc/page/stg/${item.id}`, '_blank'); + window.open(`${import.meta.env.VITE_ADMIN_URL}/page/stg/${item.id}`, '_blank'); }} /> diff --git a/packages/editor/src/pages/home/Template.tsx b/packages/editor/src/pages/home/Template.tsx index 39c124df..1a3ea472 100644 --- a/packages/editor/src/pages/home/Template.tsx +++ b/packages/editor/src/pages/home/Template.tsx @@ -116,7 +116,7 @@ export default function Index() { { - window.open(`http://admin.marsview.cc/page/stg/${item.id}`, '_blank'); + window.open(`${import.meta.env.VITE_ADMIN_URL}/page/stg/${item.id}`, '_blank'); }} /> diff --git a/packages/materials/api/index.ts b/packages/materials/api/index.ts index e4bce9ce..d00e6170 100644 --- a/packages/materials/api/index.ts +++ b/packages/materials/api/index.ts @@ -2,5 +2,5 @@ import request from './../utils/request'; // 图片上传 export const uploadImg = (params: any) => { - return request.post('http://mars-api.marsview.cc/api/upload/files', params, { 'Content-Type': 'multipart/form-data' }); + return request.post(`${import.meta.env.VITE_BASE_API}/api/upload/files`, params, { 'Content-Type': 'multipart/form-data' }); };