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.

89 lines
2.1 KiB

const baseUrl = ref(import.meta.env.VITE_BASE_URL)
const uploadUrl = ref(import.meta.env.VITE_UPLOAD_URL)
const interfaceUrl = ref(import.meta.env.VITE_INTERFACE_URL)
const jmreportBaseUrl = ref(import.meta.env.VITE_JMREPORT_BASE_URL)
const reportUrl = ref(import.meta.env.VITE_REPORT_URL)
5 months ago
const tenant = ref(import.meta.env.VITE_TENANT)
4 months ago
const systermUpdateAlert = ref(import.meta.env.VITE_SYSTERM_UPDATE_ALERT)
const systermUpdateUrl = ref(import.meta.env.VITE_SYSTERM_UPDATE_URL)
const needCode = ref(import.meta.env.VITE_NEED_CODE)
4 months ago
const mode = ref(import.meta.env.MODE)
// 获取baseUrl
export const getBaseUrl = () => {
5 months ago
if(mode.value === 'prod') {
return systemConfig.baseUrl
} else {
return baseUrl.value
}
}
// 获取uploadUrl
export const getUploadUrl = () => {
5 months ago
if(mode.value === 'prod') {
return systemConfig.uploadUrl
} else {
return uploadUrl.value
}
}
// 获取interfaceUrl
export const getInterfaceUrl = () => {
5 months ago
if(mode.value === 'prod') {
return systemConfig.interfaceUrl
} else {
return interfaceUrl.value
}
}
// 获取jmreportBaseUrl
export const getJmreportBaseUrl = () => {
5 months ago
if(mode.value === 'prod') {
return systemConfig.jmreportBaseUrl
} else {
return jmreportBaseUrl.value
}
}
// 获取reportUrl
export const getReportUrl = () => {
5 months ago
if(mode.value === 'prod') {
return systemConfig.reportUrl
} else {
return reportUrl.value
}
}
5 months ago
// 获取tenant
export const getTenant = () => {
if(mode.value === 'prod') {
return systemConfig.tenant
} else {
return tenant.value
}
}
4 months ago
// 获取系统升级是否弹出alert
export const getSystermUpdateAlert = () => {
if(mode.value === 'prod') {
return systemConfig.systermUpdateAlert
} else {
return systermUpdateAlert.value
}
}
// 获取系统升级是否弹出alert地址
export const getSystermUpdateUrl = () => {
if(mode.value === 'prod') {
return systemConfig.systermUpdateUrl
} else {
return systermUpdateUrl.value
}
}
//是否需要验证码
export const getNeedCode = () => {
if(mode.value === 'prod') {
return systemConfig.needCode
} else {
return needCode.value
}
}
4 months ago