判断 手机型号

        const  u = navigator.userAgent

        const isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1

        const  isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)

        if (isAndroid) {

          window.location.href = 'https://a.app.qq.com/o/simple.jsp?pkgname=com.cxytribe.nobuglist'

        } else if (isiOS) {

          window.location.href = 'https://itunes.apple.com/cn/app/id1459786475?mt=8'

        }

猜你喜欢

转载自blog.csdn.net/Cris_are/article/details/103993731