获取url?前后的内容
2019-01-28 本文已影响0人
Sasoli
// ?后
import querystring from 'querystring';
location.query = querystring.parse(location.search.replace('?', ''));
const { query } = location;
// ?前
url[0].split('?')[0]
// ?后
import querystring from 'querystring';
location.query = querystring.parse(location.search.replace('?', ''));
const { query } = location;
// ?前
url[0].split('?')[0]