feat: support get api url from localstorage (halo-dev/console#388)

pull/3445/head
Ryan Wang 2021-11-30 10:57:26 +08:00 committed by GitHub
parent e5de28e3cd
commit 5f3e866a41
1 changed files with 3 additions and 1 deletions

View File

@ -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