api
This commit is contained in:
parent
14abaf35e2
commit
da31120a9d
3 changed files with 40 additions and 5 deletions
|
|
@ -4,6 +4,11 @@ import { ref } from "vue";
|
|||
const env = ref<string>(process.env.NODE_ENV || "development");
|
||||
export const apiUrlConfig = import.meta.env.VITE_API_URI_CONFIG;
|
||||
export const apiUrlSsoConfig = import.meta.env.VITE_API_SSO;
|
||||
export const urlAdmin = import.meta.env.VITE_URL_ADMIN;
|
||||
export const urlUser = import.meta.env.VITE_URL_USER;
|
||||
export const urlMgt = import.meta.env.VITE_URL_MGT;
|
||||
export const urlCheckin = import.meta.env.VITE_URL_CHECKIN;
|
||||
|
||||
// if (process.env.VUE_APP_TEST) {
|
||||
// env = "test";
|
||||
// }
|
||||
|
|
@ -13,6 +18,10 @@ const config = ref<any>({
|
|||
// API_URI: "https://localhost:7260/api",
|
||||
API_URI: "https://bma-ehr.frappet.synology.me/api/v1",
|
||||
API_SSO: "https://localhost:3001",
|
||||
VITE_URL_ADMIN: urlAdmin,
|
||||
VITE_URL_USER: urlUser,
|
||||
VITE_URL_MGT: urlMgt,
|
||||
VITE_URL_CHECKIN: urlCheckin,
|
||||
},
|
||||
test: {
|
||||
API_URI: "http://localhost:5010/api/v1",
|
||||
|
|
@ -20,15 +29,28 @@ const config = ref<any>({
|
|||
production: {
|
||||
API_URI: apiUrlConfig,
|
||||
API_SSO: apiUrlSsoConfig,
|
||||
VITE_URL_ADMIN: urlAdmin,
|
||||
VITE_URL_USER: urlUser,
|
||||
VITE_URL_MGT: urlMgt,
|
||||
VITE_URL_CHECKIN: urlCheckin,
|
||||
},
|
||||
});
|
||||
|
||||
const API_URI = ref<string>(config.value[env.value].API_URI);
|
||||
const API_SSO = ref<string>(config.value[env.value].API_SSO);
|
||||
|
||||
const API_URL_ADMIN = ref<string>(config.value[env.value].VITE_URL_ADMIN);
|
||||
const API_URL_USER = ref<string>(config.value[env.value].VITE_URL_USER);
|
||||
const API_URL_MGT = ref<string>(config.value[env.value].VITE_URL_MGT);
|
||||
const API_URL_CHECKIN = ref<string>(config.value[env.value].VITE_URL_CHECKIN);
|
||||
|
||||
export default {
|
||||
env: env.value,
|
||||
config: config.value,
|
||||
API_URI: API_URI.value,
|
||||
API_SSO: API_SSO.value,
|
||||
API_URL_ADMIN: API_URL_ADMIN.value,
|
||||
API_URL_USER: API_URL_USER.value,
|
||||
API_URL_MGT: API_URL_MGT.value,
|
||||
API_URL_CHECKIN: API_URL_CHECKIN.value,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue