add login keycloak
This commit is contained in:
parent
4b73b98d35
commit
6c3c9384d9
12 changed files with 457 additions and 292 deletions
34
src/api/index.ts
Normal file
34
src/api/index.ts
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
/**config api */
|
||||
import { ref } from "vue"
|
||||
|
||||
const env = ref<string>(process.env.NODE_ENV || "development")
|
||||
// if (process.env.VUE_APP_TEST) {
|
||||
// env = "test";
|
||||
// }
|
||||
|
||||
const config = ref<any>({
|
||||
development: {
|
||||
// API_URI: "https://localhost:7260/api",
|
||||
API_URI: "https://bma-ehr.frappet.synology.me/api/v1",
|
||||
MEET_URI: "meet.frappet.com",
|
||||
},
|
||||
test: {
|
||||
API_URI: "http://localhost:5010/api/v1",
|
||||
MEET_URI: "meet.frappet.com",
|
||||
},
|
||||
production: {
|
||||
API_URI: `${window.location.protocol}//${window.location.host}/api/v1`,
|
||||
API_URI_ORG_TREE: "https://s3cluster.frappet.com/bma-ehr-fpt/organization/strueture/tree_20230707_115124.json",
|
||||
MEET_URI: "meet.frappet.com",
|
||||
},
|
||||
})
|
||||
|
||||
const API_URI = ref<string>(config.value[env.value].API_URI)
|
||||
const MEET_URI = ref<string>(config.value[env.value].MEET_URI)
|
||||
|
||||
export default {
|
||||
env: env.value,
|
||||
config: config.value,
|
||||
API_URI: API_URI.value,
|
||||
MEET_URI: MEET_URI.value,
|
||||
}
|
||||
11
src/api/test/api.test.ts
Normal file
11
src/api/test/api.test.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* API Structure + Org Chart
|
||||
*/
|
||||
import env from "../index"
|
||||
|
||||
const tttt = `${env.API_URI}/test`
|
||||
|
||||
export default {
|
||||
gettttt: `${tttt}`,
|
||||
puttttt: (id: string) => `${tttt}/${id}`,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue