diff --git a/src/config/urls.js b/src/config/urls.js new file mode 100644 index 0000000..6244c5f --- /dev/null +++ b/src/config/urls.js @@ -0,0 +1,9 @@ +/** + * 接口地址列表 + */ + +const { APP_DEVELOPMENT_BASE_URL, APP_PRODUCTION_BASE_URL, MODE } = import.meta.env; // 获取环境变量 +export const { [MODE]: BASE_URL = APP_DEVELOPMENT_BASE_URL } = { development: APP_DEVELOPMENT_BASE_URL, production: APP_PRODUCTION_BASE_URL }; // 声明变量 BASE_URL 并赋值 + +// 登录 +export const EXAMPLE_API = `${BASE_URL}xxxxxxxx`;