In the project, you need to scan the QR code and automatically determine whether it is an Android or an iOS system, and make different downloads for different systems.
<script type="text/javascript">/** Smart browser version information:**/var browser = {versions: function() {var u = navigator.userAgent, app = navigator.appVersion;return {//Mobile terminal browser version information trident: u.indexOf('Trident') > -1, //IE kernel presto: u.indexOf('Presto') > -1, //opera kernel webKit: u.indexOf('AppleWebKit') > -1, //Apple and Google kernel gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //Firefox kernel mobile: !!u.match(/AppleWebKit.*Mobile.*/) || !!u.match(/AppleWebKit/), //Is it a mobile terminal ios: !!u.match(//(i[^;]+;( U;)? CPU.+Mac OS X/), //ios terminal android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //Android terminal or uc browser iPhone: u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1, //Is it an iPhone or QQHD browser iPad: u.indexOf('iPad') > -1, //Is iPadwebApp: u.indexOf('Safari') == -1 //Is the web should be a program, no header and bottom};}(),language: (navigator.browserLanguage || navigator.language).toLowerCase()}if (browser.versions.ios || browser.versions.iPhone || browser.versions.iPad) {window.location="https://itunes.apple.com/xxx";}else if (browser.versions.android) {window.location="http://xxx/xxx.apk";}// document.writeln("Language: " + browser.language);// document.writeln(" Is it a mobile terminal: " + browser.versions.mobile);// document.writeln(" Is it an iPhone: " + browser.versions.ios);// document.writeln(" Is it an iPhone: " + browser.versions.iPhone);// document.writeln(" whether iPad: " + browser.versions.iPad);// document.writeln(navigator.userAgent);</script>