document.documentElement.style.fontSize = 100 * (document.documentElement.clientWidth / 375) + "px"; window.onresize = function () { document.documentElement.style.fontSize = 100 * (document.documentElement.clientWidth / 375) + "px"; } // 获取地址栏信息 function getQueryUrl () { let url = window.location.href; let result = {}; if (url.indexOf('?') > -1) { let str = url.split('?')[1]; let temp = str.split('&'); for (let i = 0; i < temp.length; i++) { let temp2 = temp[i].split('='); result[temp2[0]] = temp2[1] } } return result }