chore(designer): 增加环境变量配置

This commit is contained in:
wangxuefeng
2025-03-03 17:07:36 +08:00
parent e758bc3692
commit faa23bec88
10 changed files with 72 additions and 108 deletions

View File

@@ -1,10 +1,11 @@
import axios from 'axios';
const baseApiUrl = 'https://custom-chart-pre-api.shiyue.com/';
const apiBase = import.meta.env.VITE_BASE_API_URL;
console.log('apiBase', apiBase);
// 创建独立实例
const instance = axios.create({
baseURL: baseApiUrl // 基础URL直接放在实例配置中
baseURL: apiBase // 基础URL直接放在实例配置中
});
// 请求拦截器改为使用实例