versione 1.2.14 :
- aggiornati i file di configurazione, ENV e script non funzionanti., package. - corretto custom-service-worker.js con CORS - ottimizzato il server, la chiamata Load iniziale (senza promise, con async/await).
This commit is contained in:
@@ -117,12 +117,14 @@ async function Request(type: string, path: string, payload: any, responsedata?:
|
||||
const userStore = useUserStore()
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
const baseURL = globalStore.getServerHost()
|
||||
|
||||
|
||||
try {
|
||||
if (tools.isDebug()) console.log('Axios Request', path, type, tools.notshowPwd(payload))
|
||||
let response: AxiosResponse
|
||||
const config: AxiosRequestConfig = {
|
||||
baseURL: globalStore.getServerHost(),
|
||||
baseURL,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'x-auth': userStore.x_auth_token,
|
||||
@@ -216,7 +218,7 @@ async function Request(type: string, path: string, payload: any, responsedata?:
|
||||
} else if (type === 'get' || type === 'delete') {
|
||||
// @ts-ignore
|
||||
response = await axiosInstance[type](path, {
|
||||
baseURL: globalStore.getServerHost(),
|
||||
baseURL,
|
||||
params: payload,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
@@ -230,7 +232,7 @@ async function Request(type: string, path: string, payload: any, responsedata?:
|
||||
} else if (type === 'postFormData') {
|
||||
console.log('postFormData', payload)
|
||||
response = await axiosInstance.post(path, payload, {
|
||||
baseURL: globalStore.getServerHost(),
|
||||
baseURL,
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
'x-auth': userStore.x_auth_token,
|
||||
|
||||
Reference in New Issue
Block a user