mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-23 23:39:47 +08:00
refactor(projects): 细节优化
This commit is contained in:
@ -1,13 +1,5 @@
|
||||
/** 请求环境配置 */
|
||||
type ServiceEnv = Record<
|
||||
EnvType,
|
||||
{
|
||||
/** 请求地址 */
|
||||
url: string;
|
||||
/** 代理地址 */
|
||||
proxy: string;
|
||||
}
|
||||
>;
|
||||
type ServiceEnv = Record<EnvType, EnvConfig>;
|
||||
|
||||
/** 环境配置 */
|
||||
const serviceEnvConfig: ServiceEnv = {
|
||||
@ -31,8 +23,8 @@ const serviceEnvConfig: ServiceEnv = {
|
||||
*/
|
||||
export function getEnvConfig(env: ImportMetaEnv) {
|
||||
const { VITE_ENV_TYPE = 'dev' } = env;
|
||||
const envConfig = {
|
||||
http: serviceEnvConfig[VITE_ENV_TYPE]
|
||||
};
|
||||
|
||||
const envConfig = serviceEnvConfig[VITE_ENV_TYPE];
|
||||
|
||||
return envConfig;
|
||||
}
|
||||
|
Reference in New Issue
Block a user