2026-09-28 17:50:46 +08:00
|
|
|
// 登录回跳只接受固定页面和白名单参数,不接受外部 URL;页面仍需重新鉴权。
|
2026-09-30 19:11:44 +08:00
|
|
|
export function nextStepRoute(assessmentId: string, productId: string = '', section: string = 'actions', revisionId: string = ''): string {
|
2026-09-28 17:50:46 +08:00
|
|
|
const valid = (id: string): boolean => /^[1-9][0-9]{0,9}$/.test(id)
|
|
|
|
|
if (!valid(assessmentId) || (productId.length > 0 && !valid(productId)) || !['actions', 'prepare'].includes(section)) return ''
|
2026-09-30 19:11:44 +08:00
|
|
|
if (revisionId.length > 0 && !/^[1-9][0-9]{0,9}$/.test(revisionId)) return ''
|
|
|
|
|
return '/packages/finance/next-step/next-step?assessmentId=' + assessmentId + (productId.length > 0 ? '&productId=' + productId : '') + '§ion=' + section + (revisionId.length > 0 ? '&revisionId=' + revisionId : '')
|
2026-09-28 17:50:46 +08:00
|
|
|
}
|