APP下载页二维码支持识别微信
时间:2年前 作者:庞顺龙 浏览:464 [站内原创,转载请注明出处]
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> <title>APP下载</title> <script src="download/jquery.min.js" type="text/javascript" charset="utf-8"></script> <script language="javascript"> window.onload = function() { var u = navigator.userAgent; if (u.indexOf('Android') > -1 || u.indexOf('Linux') > -1) { //安卓手机 window.location.href = "https://app.xxx.xxx.cn/download/xxx.6.0.0.0103.68667-scu.apk"; } else if (u.indexOf('iPhone') > -1) { //苹果手机 alert('苹果商店正在审核中,请稍后重试。'); // window.location.href = "https://itunes.apple.com/us/app/xxx?l=zh&ls=1&mt=8"; } else if (u.indexOf('Windows Phone') > -1) { //winphone手机 alert("WindowsPhone暂未推出。"); } else if (u.indexOf('Windows NT') > -1) { //Windows电脑 alert("请用手机浏览器访问。"); } } $(window).on("load", function() { var winHeight = $(window).height(); function is_weixin() { var ua = navigator.userAgent.toLowerCase(); if (ua.match(/MicroMessenger/i) == "micromessenger") { return true; } else { return false; } } var isWeixin = is_weixin(); if (isWeixin) { $(".weixin-tip").css("height", winHeight); $(".weixin-tip").show(); } }) </script> <style type="text/css"> * { margin: 0; padding: 0; } a { text-decoration: none; } img { max-width: 100%; height: auto; } .weixin-tip { display: none; position: fixed; left: 0; top: 0; bottom: 0; background: rgba(0, 0, 0, 0.8); filter: alpha(opacity=80); height: 100%; width: 100%; z-index: 100; } .weixin-tip p { text-align: center; margin-top: 10%; padding: 0 5%; } </style> </head> <body> <div class="weixin-tip"> <p> <img src="download/live_weixin.png" alt="微信打开" /> </p> </div> </body> </html>
微信扫一扫效果:
由庞顺龙最后编辑于:2年前
内容均为作者独立观点,不代表八零IT人立场,如涉及侵权,请及时告知。
本站文章除注明转载外,均为本站原创,欢迎任何形式的转载,但请务必注明出处,尊重他人劳动共创和谐网络社区。
转载请注明:文章转载自-八零IT人 [http://www.80iter.com]
本文标题:APP下载页二维码支持识别微信
本文地址:http://www.80iter.com/blog/1546998478999361
转载请注明:文章转载自-八零IT人 [http://www.80iter.com]
本文标题:APP下载页二维码支持识别微信
本文地址:http://www.80iter.com/blog/1546998478999361

暂无评论
暂无评论
手机扫码阅读
热门相关
