Skip to content
This repository was archived by the owner on May 8, 2021. It is now read-only.

Conversation

@doscriptsite
Copy link

当版本号为"13_4_1"时,用+"13_4_1"转换为数字会得到NaN

没有打包到dist

Huang-An pushed a commit to Huang-An/localResizeIMG that referenced this pull request Nov 23, 2020
@huchanghao
Copy link

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 照上传还是导致旋转。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants