JS判断是安卓还是IOS

 //判断是IOS还是安卓  docPros
    appSource() {
            const u = navigator.userAgent;
            const isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
            if (isiOS) {
        // this.$utils.msgshow('ios')
        this.$refs.docPros.style.bottom='-0.03rem'
            } else {
        // this.$utils.msgshow('安卓')
        this.$refs.docPros.style.bottom='0.03rem'
            }
        },

 

posted @ 2020-06-24 15:46  夏小夏吖  阅读(709)  评论(0编辑  收藏  举报