fix(salix): redirect with params
gitea/salix/pipeline/pr-master This commit looks good Details

This commit is contained in:
Javier Segarra 2024-08-28 09:22:31 +02:00
parent 5b49e7cf45
commit 27e30c0051
1 changed files with 3 additions and 1 deletions

View File

@ -56,6 +56,8 @@ export default class App {
} }
getUrl(route, appName = 'lilium') { getUrl(route, appName = 'lilium') {
const index = window.location.hash.indexOf(route.toLowerCase());
const newRoute = index < 0 ? route : window.location.hash.substring(index);
const env = process.env.NODE_ENV; const env = process.env.NODE_ENV;
const filter = { const filter = {
where: {and: [ where: {and: [
@ -67,7 +69,7 @@ export default class App {
return this.logger.$http.get('Urls/findOne', {filter}) return this.logger.$http.get('Urls/findOne', {filter})
.then(res => { .then(res => {
if (res && res.data) if (res && res.data)
return res.data.url + route; return res.data.url + newRoute;
}) })
.catch(() => { .catch(() => {
this.showError('Direction not found'); this.showError('Direction not found');