Commit 2ae3f5ff by Liu

fix:传入空字符串也需要存入sessionStorage中

parent 4a6d1a42
......@@ -28,14 +28,14 @@ export function withRouteChangeHandler(WrappedComponent: React.ComponentType) {
// 在重定向前缓存查询参数,供 /tactics 页读取(避免 from 被清理导致丢失)
try {
if (place) {
const userMeta = {
cstId: searchParams.get('cstId') || undefined,
userId: searchParams.get('userId') || undefined,
numberType: searchParams.get('numberType') || undefined,
place,
busiType: '02',
busiId: searchParams.get('userId') || undefined,
}
const userMeta = {
cstId: searchParams.get('cstId') ?? undefined,
userId: searchParams.get('userId') ?? undefined,
numberType: searchParams.get('numberType') ?? undefined,
place,
busiType: '02',
busiId: searchParams.get('userId') ?? undefined,
}
sessionStorage.setItem('userMeta', JSON.stringify(userMeta))
}
else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment