You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

108 lines
3.6 KiB

3 years ago
/**
* 业务配置
* */
const url = location.host;
3 years ago
const isDev = process.env.NODE_ENV === "development"; // 开发环境
const isHh = url.includes("10.196.131.73"); //河海版本
const isCH = url.includes("124.71.12.62"); //巢湖版本
const isPro = url.includes("occupationlab.com"); //职站生产
const isZxy = url.includes("izhixinyun.com"); //智信云
const isTest = url.includes('121.37.12.51'); //中台测试服
1 year ago
const isSq = url.includes('10.20.100.204'); // 商丘
3 years ago
1 year ago
let zcPath = `120.78.139.126:8879` // 众筹
let bankPath = `${location.origin}/banksystem` // 银行系统地址
1 year ago
let sandPath = `${location.origin}/sandbox` // 沙盘地址
let jumpPath = `${location.origin}/judgmentPoint`
2 years ago
let host = `${location.origin}/`
let uploadURL = `${location.origin}/`
2 years ago
let title = (isHh || isCH) ? '教师管理端' : '职站服务端管理系统'
if (isPro) {
bankPath = `https://www.huorantech.cn/banksystem`
// 职站生产
2 years ago
uploadURL = `https://www.huorantech.cn/`
2 years ago
jumpPath = `https://www.huorantech.cn/judgmentPoint/`
} else if (isDev) {
2 years ago
jumpPath = `http://${location.hostname}:8087/`
bankPath = `http://${location.hostname}:8093`
1 year ago
sandPath = `http://${location.hostname}:9520`
uploadURL = `http://121.37.12.51/`
2 years ago
host = "http://121.37.12.51/"; // 中台测试服
2 years ago
// host = 'https://www.occupationlab.com/' // 正式服
host = "http://192.168.31.217:9000/"; // 榕
1 year ago
// host = 'http://192.168.31.51:9000/'; // 赓
1 year ago
} else if (isSq) {
zcPath = `10.20.100.204:8883`
}
3 years ago
const Setting = {
/**
* 基础配置
* */
platformId: 1, // 平台标识,1职站,2数据平台,3中台
3 years ago
platformType: 0, // 平台端区分:0->教师端 1->学生端 2->无端
2 years ago
platformSource: 1, // 平台来源(0中台,1职站)
titleSuffix: title, // 网页标题的后缀
3 years ago
routerMode: "hash", // 路由模式,可选值为 history 或 hash
showProgressBar: true, // 页面切换时,是否显示模拟的进度条
apiBaseURL: host, // 接口请求地址
jumpPath, // 判分点系统前缀
12 months ago
autoLogoutTime: 1000 * 60 * 60 * 3, // 长时间未操作,自动退出登录时间
3 years ago
projectData: "sta_data", // 新增项目跳转判分点数据存储cookie的key
modalDuration: 3, // 接口请求返回错误时,弹窗的持续时间,单位:秒
3 years ago
errorModalType: "Message", // 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice
cookiesExpires: 1, // Cookies 默认保存时间,单位:天
tokenExpires: 1296000000, // token在localStorage的时间(毫秒)
bankPath,
1 year ago
sandPath,
3 years ago
isDev,
isTest,
isPro,
1 year ago
isSq,
zcPath,
2 years ago
/**
* 路由白名单
* */
2 years ago
whiteList: ['/login', '/redirect'],
3 years ago
/**
* localStorage里保存的token的key
3 years ago
*/
3 years ago
tokenKey: "oc_server_token",
3 years ago
/**
* localStorage里保存的vuex的key
3 years ago
*/
3 years ago
storeKey: "oc_server_store",
3 years ago
/**
* 默认密码
*/
initialPassword: "1122aa",
3 years ago
/**
3 years ago
* 多语言配置
* */
3 years ago
i18n: {
// 默认语言
3 years ago
default: "zh",
3 years ago
// 是否根据用户电脑配置自动设置语言(仅第一次有效)
auto: false
},
/**
* 布局配置
* */
3 years ago
layout: {},
3 years ago
/**
* 功能配置
* */
// 相同路由,不同参数间进行切换,是否强力更新
sameRouteForceUpdate: false,
// 是否使用动态路由(即角色权限,开启了的话就会取后端返回的权限树来显示头部导肮和页面按钮)
2 years ago
dynamicRoute: true,
3 years ago
// 文件上传
upload: {
2 years ago
apiURL: uploadURL,
3 years ago
maxSize: 30
}
3 years ago
};
export default Setting;