Browse Source

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

pull/389/head
Ryan Wang 3 years ago committed by GitHub
parent
commit
3f7ffa79f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/utils/api-client.js

4
src/utils/api-client.js

@ -3,7 +3,9 @@ import store from '@/store'
import { message, notification } from 'ant-design-vue'
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({
baseUrl: apiUrl

Loading…
Cancel
Save