export const getPathSearchParamObj = () => { let url = location.search; let index = url.indexOf("?"); url = url.substring(index + 1); let arr = url.split("&"); let obj = {} for (let i = 0; i < arr.length; i++) { let arr1 = arr[i].split("="); obj[arr1[0]] = arr1[1]; } return obj; }
没有评论:
发表评论