feat: 初始化项目配置和样式- 添加项目环境变量配置文件 (.env)
- 创建代码忽略文件列表 (.gitignore) - 设置代码格式化规则 (.prettierrc)- 添加各种样式文件,包括背景、边框、按钮、卡片等组件样式 - 创建暗黑主题样式文件 - 添加表单和代码样式文件
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import packageInfo from '@/package.json';
|
||||
|
||||
const { version } = packageInfo;
|
||||
|
||||
// 开发环境配置
|
||||
export let baseUrl;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
baseUrl = import.meta.env.SHOPRO_DEV_BASE_URL;
|
||||
} else {
|
||||
baseUrl = import.meta.env.SHOPRO_BASE_URL;
|
||||
}
|
||||
if (typeof baseUrl === 'undefined') {
|
||||
console.error('请检查.env配置文件是否存在');
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
export const apiPath = import.meta.env.SHOPRO_API_PATH;
|
||||
export const staticUrl = import.meta.env.SHOPRO_STATIC_URL;
|
||||
export const tenantId = import.meta.env.SHOPRO_TENANT_ID;
|
||||
export const websocketPath = import.meta.env.SHOPRO_WEBSOCKET_PATH;
|
||||
export const h5Url = import.meta.env.SHOPRO_H5_URL;
|
||||
|
||||
export default {
|
||||
baseUrl,
|
||||
apiPath,
|
||||
staticUrl,
|
||||
tenantId,
|
||||
websocketPath,
|
||||
h5Url,
|
||||
};
|
||||
Reference in New Issue
Block a user