This commit is contained in:
2018-11-14 23:13:22 +00:00
parent 105c8c9a78
commit 84e776f66e
6 changed files with 34 additions and 6 deletions

View File

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

View File

@@ -1,4 +1,4 @@
/* xeslint-disable */
/* eslint-disable */
import apiUtil from "./apiutil";
import { processLogin, processLogout } from "../utils/authutil";