const url = 'var a = "http://xxx.com/previewPages?share_sn=134634739763557728&uuid=5a6961bd-5742-4e68-af45-fab2d61fe66&previewId=134665605407207044"';
const paramsString = url.split('?')[1]
const paramObj = Object.fromEntries(new URLSearchParams(paramsString ));
// {share_sn: "134634739763557728", uuid: "5a6961bd-5742-4e68-af45-fab2d61fe66", previewId: "134665605407207044""}
网友评论