标签:location amp get const token code param eid port
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
react-router拿到url传的值(用到URLSearchParams)
标签:location amp get const token code param eid port
原文地址:https://www.cnblogs.com/susu8/p/9154517.html