未验证 提交 afacf688 编写于 作者: K Kyun Wong 提交者: GitHub

fix: 解决重定向路径 params 参数丢失问题 (#2753)

Co-authored-by: Nkelvin <kyun.wang@jodoinc.com>
上级 60a3b6a9
......@@ -40,6 +40,7 @@ export const useRedo = (_router?: Router) => {
return;
}
if (name && Object.keys(params).length > 0) {
params['_origin_params'] = JSON.stringify(params ?? {});
params['_redirect_type'] = 'name';
params['path'] = String(name);
} else {
......
......@@ -42,7 +42,7 @@ export const REDIRECT_ROUTE: AppRouteRecordRaw = {
},
children: [
{
path: '/redirect/:path(.*)',
path: '/redirect/:path(.*)/:_redirect_type(.*)/:_origin_params(.*)',
name: REDIRECT_NAME,
component: () => import('/@/views/sys/redirect/index.vue'),
meta: {
......
......@@ -19,7 +19,7 @@
replace({
name: _path,
query,
params,
params: JSON.parse((params._origin_params as string) ?? '{}'),
});
} else {
replace({
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册