获取屏幕缩放比例getDeviceRatio(){varisAndroid=window.navigator.appVersion.match(/android/gi);varisIPhone=window.navigator.appVersion.match(/iphone/gi);vardevicePixelRatio=window.devicePixelRatio;变量dpr;if(isIPhone){//iOS下,2屏和3屏,使用2倍方案,其余使用1倍方案if(devicePixelRatio>=3){dpr=3;}elseif(devicePixelRatio>=2){dpr=2;}否则{dpr=1;}}else{//在其他设备下,仍然使用1-fold方案dpr=1;}returndpr}获取URL参数并返回一个对象getRequest(){consturl=location.search;//获取“?”后面的字符串url中的字符lettheRequest=newObject();如果(url.indexOf("?")!=-1){让str=url.substr(1);让strs=str.split("&");for(leti=0;i
