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.
103 lines
3.8 KiB
103 lines
3.8 KiB
/** |
|
* 业务配置 |
|
* */ |
|
const url = location.host; |
|
const isDev = process.env.NODE_ENV === "development"; // 开发环境 |
|
const isHh = url.includes("10.196.131.73"); //是否河海版本 |
|
const isCH = url.includes("120.78.127.12"); //是否巢湖版本 |
|
const isBeta = url.includes("120.78.198.231"); //是否职站测试 |
|
const isPro = url.includes("occupationlab.com"); //是否职站生产 |
|
const isTest = url.includes('39.108.250.202'); //是否中台测试服 |
|
|
|
let defaultSubSystem = ""; |
|
let host = ""; |
|
let title = ""; |
|
let schoolId = null; |
|
let systemList = []; |
|
|
|
if (isHh) { |
|
// 河海 |
|
host = "http://10.196.131.73/"; |
|
defaultSubSystem = "http://10.196.131.73/pyTrials/#/"; |
|
title = "学生端"; |
|
schoolId = 729; |
|
} else if (isCH) { |
|
// 巢湖 |
|
host = "http://120.78.127.12/"; |
|
defaultSubSystem = "http://120.78.127.12/pyTrials/#/"; |
|
title = "学生端"; |
|
schoolId = 1006; |
|
} else if (isBeta) { |
|
// 职站测试 |
|
host = "http://120.78.198.231/"; |
|
defaultSubSystem = "http://120.78.198.231/pyTrials/#/"; |
|
title = "职站"; |
|
schoolId = 2105; |
|
} else if (isPro) { |
|
// 职站生产 |
|
host = "http://www.occupationlab.com/"; |
|
defaultSubSystem = "http://www.occupationlab.com/pyTrials/#/"; |
|
title = "职站"; |
|
schoolId = 2105; |
|
} else if (isTest){ |
|
// 中台测试 |
|
host = "http://39.108.250.202:9000/"; |
|
defaultSubSystem = "http://39.108.250.202/pyTrials/#/"; |
|
title = "职站"; |
|
schoolId = 2105; |
|
} else if (isDev) { |
|
// 本地 |
|
host = "http://39.108.250.202:9000/"; // 中台测试服 |
|
// host = "http://192.168.31.137:9000/"; // 赓 |
|
// host = "http://192.168.31.151:9000/"; // 榕 |
|
// host = "http://192.168.31.125:9000/"; // 坤 |
|
defaultSubSystem = "http://39.108.250.202/pyTrials/#/"; |
|
title = "职站"; |
|
schoolId = 2105; |
|
} else { |
|
console.log("其它版本"); |
|
} |
|
|
|
const Setting = { |
|
/** |
|
* 基础配置 |
|
* */ |
|
platformId: 1, // 平台标识,1职站,2数据平台,3中台 |
|
titleSuffix: title, // 网页标题的后缀 |
|
routerMode: "hash", // 路由模式,可选值为 history 或 hash |
|
showProgressBar: true, // 页面切换时,是否显示模拟的进度条 |
|
apiBaseURL: host, // 接口请求地址 |
|
isHh, // 是否是河海版本 |
|
isCH, // 是否是巢湖版本 |
|
isBeta, // 是否职站测试服 |
|
schoolId,// 学校id |
|
defaultSubSystem, // 测评做完后跳转的默认子系统 |
|
|
|
// 子系统列表.改的时候留意要改的是哪个环境,别影响到了其他环境 |
|
// 以后如果卖给了其他学校,要给该学校单独开放子系统的话,就在下面这个数组里加判断就行,然后把需要开放的子系统放出来。不要复制这个职站项目另起一个项目,这样学校一多就很难维护了 |
|
systemList, |
|
systemId: systemList.length && systemList[0].id, // 默认系统id |
|
autoLogoutTime: 3600000, // 长时间未操作,自动退出登录时间 |
|
modalDuration: 3, // 接口请求返回错误时,弹窗的持续时间,单位:秒 |
|
errorModalType: "Message", // 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice |
|
cookiesExpires: 1, // Cookies 默认保存时间,单位:天 |
|
tokenExpires: 1296000000, // token在localStorage的时间(毫秒) |
|
tokenKey: "oc_client_token", // localStorage里保存的token的key |
|
storeKey: "oc_client_store", // localStorage里保存的vuex的key |
|
initialPassword: "111aaa", // 默认密码 |
|
/** |
|
* 多语言配置 |
|
* */ |
|
i18n: { |
|
default: "zh", // 默认语言 |
|
auto: false // 是否根据用户电脑配置自动设置语言(仅第一次有效) |
|
}, |
|
layout: {}, // 布局配置 |
|
/** |
|
* 功能配置 |
|
* */ |
|
sameRouteForceUpdate: false, // 相同路由,不同参数间进行切换,是否强力更新 |
|
dynamicRoute: false // 是否使用动态路由 |
|
}; |
|
|
|
export default Setting;
|
|
|