Merge pull request 'feat: redirect to lilium page not found' (!2731) from hotFix_liliumRedirection into dev
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #2731 Reviewed-by: Carlos Satorres <carlossa@verdnatura.es>
This commit is contained in:
commit
e8d4a72315
|
@ -4,7 +4,17 @@ import getMainRoute from 'core/lib/get-main-route';
|
||||||
config.$inject = ['$stateProvider', '$urlRouterProvider'];
|
config.$inject = ['$stateProvider', '$urlRouterProvider'];
|
||||||
function config($stateProvider, $urlRouterProvider) {
|
function config($stateProvider, $urlRouterProvider) {
|
||||||
$urlRouterProvider
|
$urlRouterProvider
|
||||||
.otherwise('/');
|
.otherwise(async($injector, {$location}) => {
|
||||||
|
const prefix = '#!';
|
||||||
|
if (!$location.$$path) return window.location.href = `/${prefix}/`;
|
||||||
|
|
||||||
|
const url = $location.$$absUrl
|
||||||
|
.replace('5000', '9000')
|
||||||
|
.replace('salix', 'lilium')
|
||||||
|
.replace(prefix, '#')
|
||||||
|
.replace('client', 'customer');
|
||||||
|
window.location.href = url;
|
||||||
|
});
|
||||||
|
|
||||||
$stateProvider
|
$stateProvider
|
||||||
.state('layout', {
|
.state('layout', {
|
||||||
|
|
Loading…
Reference in New Issue