url链接: ***?token=12431243&deviceId=2
import type { Location } from 'react-router' const { search } = location const paramsString = search.substring(1) const searchParams = new URLSearchParams(paramsString) const token = searchParams.get('token') // 12431243
const deviceId = searchParams.get('deviceId') // 2