diff --git a/src/hooks/web/usePage.ts b/src/hooks/web/usePage.ts index d6df000..c9fb0d0 100644 --- a/src/hooks/web/usePage.ts +++ b/src/hooks/web/usePage.ts @@ -60,7 +60,7 @@ export const useRedo = (_router?: Router) => { params['_redirect_type'] = 'path'; params['path'] = fullPath; } - push({ name: REDIRECT_NAME, params, query }).then(() => resolve(true)); + push({ name: REDIRECT_NAME, state: { params }, query }).then(() => resolve(true)); }); } return redo; diff --git a/src/views/sys/redirect/index.vue b/src/views/sys/redirect/index.vue index 7aa5463..9632d6c 100644 --- a/src/views/sys/redirect/index.vue +++ b/src/views/sys/redirect/index.vue @@ -5,9 +5,10 @@ import { unref } from 'vue'; import { useRouter } from 'vue-router'; - const { currentRoute, replace } = useRouter(); + const { currentRoute, replace, options } = useRouter(); - const { params, query } = unref(currentRoute); + const { query } = unref(currentRoute); + const { params } = options.history.state as Recordable; const { path, _redirect_type = 'path' } = params; Reflect.deleteProperty(params, '_redirect_type');