Kyun Wong
2023-05-10 afacf688250ed11466d809e3f5d43d71ef81306b
fix: 解决重定向路径 params 参数丢失问题 (#2753)

Co-authored-by: kelvin <kyun.wang@jodoinc.com>
3个文件已修改
5 ■■■■■ 已修改文件
src/hooks/web/usePage.ts 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/routes/basic.ts 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sys/redirect/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/hooks/web/usePage.ts
@@ -40,6 +40,7 @@
        return;
      }
      if (name && Object.keys(params).length > 0) {
        params['_origin_params'] = JSON.stringify(params ?? {});
        params['_redirect_type'] = 'name';
        params['path'] = String(name);
      } else {
src/router/routes/basic.ts
@@ -42,7 +42,7 @@
  },
  children: [
    {
      path: '/redirect/:path(.*)',
      path: '/redirect/:path(.*)/:_redirect_type(.*)/:_origin_params(.*)',
      name: REDIRECT_NAME,
      component: () => import('/@/views/sys/redirect/index.vue'),
      meta: {
src/views/sys/redirect/index.vue
@@ -19,7 +19,7 @@
    replace({
      name: _path,
      query,
      params,
      params: JSON.parse((params._origin_params as string) ?? '{}'),
    });
  } else {
    replace({