start project
This commit is contained in:
commit
ca3c00b6a1
42 changed files with 1310 additions and 0 deletions
29
src/api/index.ts
Normal file
29
src/api/index.ts
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/**config api */
|
||||
import { ref } from 'vue'
|
||||
|
||||
const env = ref<string>(process.env.NODE_ENV || 'development')
|
||||
export const apiUrlConfig = import.meta.env.VITE_API_URI_CONFIG
|
||||
// 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',
|
||||
},
|
||||
test: {
|
||||
API_URI: 'http://localhost:5010/api/v1',
|
||||
},
|
||||
production: {
|
||||
API_URI: apiUrlConfig,
|
||||
},
|
||||
})
|
||||
|
||||
const API_URI = ref<string>(config.value[env.value].API_URI)
|
||||
|
||||
export default {
|
||||
env: env.value,
|
||||
config: config.value,
|
||||
API_URI: API_URI.value,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue