return keys.reduce((pre, key) => { console.log("-------6---------") console.log(key, "keys") console.log(searchParams.get(key), "keysValue") console.log({ ...pre, [key]: searchParams.get(key) || "" }, "geyao") console.log("-------6---------") return { ...pre, [key]: searchParams.get(key) || "" }; }, {} as { [key in K]: string });