factory_web/src/config/index.js

50 lines
1.1 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

const DEFAULT_CONFIG = {
//标题
APP_NAME: "SCUI",
//版本号
APP_VER: "1.1.20",
//接口地址
API_URL: "/api",
//TokenName
TOKEN_NAME: "Authorization",
//Token前缀注意最后有个空格如不需要需设置空字符串
TOKEN_PREFIX: "Bearer ",
//请求是否开启缓存
REQUEST_CACHE: false,
//布局 默认default | 通栏header | 经典menu | 功能坞dock
//dock将关闭标签和面包屑栏
LAYOUT: 'default',
//菜单是否折叠
MENU_IS_COLLAPSE: false,
//是否开启多标签
LAYOUT_TAGS: true,
//控制台首页默认布局
DEFAULT_GRID: {
//默认分栏数量和宽度 例如 [24] [18,6] [8,8,8] [6,12,6]
layout: [18, 6],
//小组件分布com取值:views/home/components 文件名
copmsList: [
[{ title: "实时收入", com: 'C1' },{ title: "周收入对比", com: 'C3' }],
[{ title: "版本更新", com: 'C2' }],
[]
]
}
}
// 如果生产模式就合并动态的APP_CONFIG
// public/config.js
if(process.env.NODE_ENV === 'production'){
Object.assign(DEFAULT_CONFIG, APP_CONFIG)
}
module.exports = DEFAULT_CONFIG