localResizeIMG
localResizeIMG copied to clipboard
修复iOS版本号获取为NaN的问题
当版本号为"13_4_1"时,用+"13_4_1"转换为数字会得到NaN
没有打包到dist
var UA = (function (userAgent) {
var ISOldIOS = /OS (.*) like Mac OS X/g.exec(userAgent),
isOldAndroid = /Android (\d.*?);/g.exec(userAgent) || /Android\/(\d.*?) /g.exec(userAgent);
// 判断设备是否是IOS7以下
// 判断设备是否是android4.5以下
// 判断是否iOS
// 判断是否android
// 判断是否QQ浏览器
var IOS_VERSION = ISOldIOS ? +ISOldIOS.pop().replace(/_/g, '.') : 0
return {
oldIOS : ISOldIOS ? IOS_VERSION < 8 : false,
newIOS : ISOldIOS ? IOS_VERSION >= 13.4 : false,
oldAndroid: isOldAndroid ? +isOldAndroid.pop().substr(0, 3) < 4.5 : false,
iOS : /\(i[^;]+;( U;)? CPU.+Mac OS X/.test(userAgent),
android : /Android/g.test(userAgent),
mQQBrowser: /MQQBrowser/g.test(userAgent)
}
})(navigator.userAgent);
ios 不能正取取到 系统版本号,并且 取到后没有正确 字符串截取,导致 ios 照上传还是导致旋转。