feat: support get api url from localstorage (#388)

pull/389/head
Ryan Wang 3 years ago committed by GitHub
parent 5f893aa5c5
commit 3f7ffa79f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -3,7 +3,9 @@ import store from '@/store'
import { message, notification } from 'ant-design-vue' import { message, notification } from 'ant-design-vue'
import { isObject } from './util' import { isObject } from './util'
const apiUrl = process.env.VUE_APP_API_URL ? process.env.VUE_APP_API_URL : 'http://localhost:8080' const storedApiUrl = localStorage.getItem('apiUrl')
const apiUrl = storedApiUrl ? storedApiUrl : process.env.VUE_APP_API_URL
const haloRestApiClient = new HaloRestAPIClient({ const haloRestApiClient = new HaloRestAPIClient({
baseUrl: apiUrl baseUrl: apiUrl

Loading…
Cancel
Save