fix: 解决重定向路径 params 参数丢失问题 (#2753)
Co-authored-by: kelvin <kyun.wang@jodoinc.com>
| | |
| | | return; |
| | | } |
| | | if (name && Object.keys(params).length > 0) { |
| | | params['_origin_params'] = JSON.stringify(params ?? {}); |
| | | params['_redirect_type'] = 'name'; |
| | | params['path'] = String(name); |
| | | } else { |
| | |
| | | }, |
| | | children: [ |
| | | { |
| | | path: '/redirect/:path(.*)', |
| | | path: '/redirect/:path(.*)/:_redirect_type(.*)/:_origin_params(.*)', |
| | | name: REDIRECT_NAME, |
| | | component: () => import('/@/views/sys/redirect/index.vue'), |
| | | meta: { |
| | |
| | | replace({ |
| | | name: _path, |
| | | query, |
| | | params, |
| | | params: JSON.parse((params._origin_params as string) ?? '{}'), |
| | | }); |
| | | } else { |
| | | replace({ |