This commit is contained in:
@@ -52,6 +52,27 @@ export default {
|
||||
};
|
||||
},
|
||||
APIUrl(apiPath) {
|
||||
if ("" == store.state.apiUrl) {
|
||||
//construct the api url and store it
|
||||
//development location?
|
||||
if (
|
||||
window.location.host == "localhost" &&
|
||||
window.location.port == "8080"
|
||||
) {
|
||||
store.commit("setAPIURL", "http://localhost:7575/api/v8.0/");
|
||||
} else {
|
||||
//production location <protocol>//<hostname>:<port>/
|
||||
store.commit(
|
||||
"setAPIURL",
|
||||
window.location.protocol +
|
||||
"//" +
|
||||
window.location.hostname +
|
||||
":" +
|
||||
window.location.port +
|
||||
"/api/v8.0/"
|
||||
);
|
||||
}
|
||||
}
|
||||
return store.state.apiUrl + apiPath;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* xeslint-disable */
|
||||
/* eslint-disable */
|
||||
import apiUtil from "./apiutil";
|
||||
import { processLogin, processLogout } from "../utils/authutil";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user