123456789101112131415 |
- import qs from 'query-string'
- export const getQuery = () => {
- let search: any = {}
- try {
- search = {
- ...qs.parse(location.search),
- ...qs.parse(location.hash.split('?')[1]),
- }
- } catch (error) {
- console.log("解析query错误:", error)
- }
- return {
- ...search,
- }
- }
|