This commit is contained in:
2020-07-23 18:10:35 +00:00
parent 506ab7de11
commit 8a713c2b1f
4 changed files with 46 additions and 16 deletions

View File

@@ -324,23 +324,23 @@ export default {
//this smells bad but it works
vm.$root.$gz = window.$gz;
//Capture open object type and id if present
//localhost:8080/login?type=2&id=22
// //Capture open object type and id if present
// //localhost:8080/login?type=2&id=22
if (window.location.search) {
//https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams
var searchParams = new URLSearchParams(window.location.search);
var openObject = {};
//data should be format for open-object-handler
// { type: [AYATYPE], id: [RECORDID] }
if (searchParams.has("type")) {
openObject.type = Number(searchParams.get("type"));
if (searchParams.has("id")) {
openObject.id = Number(searchParams.get("id"));
}
window.$gz.store.commit("setOpenObject", openObject);
}
}
// if (window.location.search) {
// //https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams
// var searchParams = new URLSearchParams(window.location.search);
// var openObject = {};
// //data should be format for open-object-handler
// // { type: [AYATYPE], id: [RECORDID] }
// if (searchParams.has("type")) {
// openObject.type = Number(searchParams.get("type"));
// if (searchParams.has("id")) {
// openObject.id = Number(searchParams.get("id"));
// }
// window.$gz.store.commit("setOpenObject", openObject);
// }
// }
//redirect to login if not authenticated
if (!vm.$store.state.authenticated) {