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) const tenant = ref(import.meta.env.VITE_TENANT) 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) const mode = ref(import.meta.env.MODE) // 获取baseUrl export const getBaseUrl = () => { if(mode.value === 'prod') { return systemConfig.baseUrl } else { return baseUrl.value } } // 获取uploadUrl export const getUploadUrl = () => { if(mode.value === 'prod') { return systemConfig.uploadUrl } else { return uploadUrl.value } } // 获取interfaceUrl export const getInterfaceUrl = () => { if(mode.value === 'prod') { return systemConfig.interfaceUrl } else { return interfaceUrl.value } } // 获取jmreportBaseUrl export const getJmreportBaseUrl = () => { if(mode.value === 'prod') { return systemConfig.jmreportBaseUrl } else { return jmreportBaseUrl.value } } // 获取reportUrl export const getReportUrl = () => { if(mode.value === 'prod') { return systemConfig.reportUrl } else { return reportUrl.value } } // 获取tenant export const getTenant = () => { if(mode.value === 'prod') { return systemConfig.tenant } else { return tenant.value } } // 获取系统升级是否弹出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 } }