chore(designer): 增加环境变量配置
This commit is contained in:
@@ -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直接放在实例配置中
|
||||
});
|
||||
|
||||
// 请求拦截器改为使用实例
|
||||
|
||||
Reference in New Issue
Block a user