大佬教程收集整理的这篇文章主要介绍了微信扫码下载apk快速解决方案,中间页引导法,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
今天尝试了一下用到了快捷的方法,其它的需要审核什么的太麻烦,感觉这个体验差不到哪里去
中间页引导法
第三方的乱七八糟的别试了基本就是浪费时间。
直奔中间页引导法------------
扫完效果:
浏览器打开后:
源码:
<!DOCTYPE html>
<html lang="en">
<head>
<Meta charset="UTF-8">
<Meta name="viewport" content="width=device-width,initial-scale=1" />
<title>XXXXApp</title>
</head>
<body>
<style type="text/css">
* {
margin: 0;
padding: 0;
}
img {
max-width: 100%;
height: auto;
}
.drawDownAppText {
height: 100vh;
max-width: 100vw;
font-size: 32px;
text-align: center;
padding-top: 20%;
}
.drawDownAppText a {
text-decoration: none;
}
</style>
<div class="drawDownAppText">
<a href="http://xxxxxxxxxxxxxxxxxxx.apk">点击下载xxxxxxxApp</a>
</div>
<div></div>
<script type="text/javascript">
function is_weixin() {
var ua = navigator.userAgent.toLowerCase();
if (ua.match(/MicroMessenger/i) == "micromessenger") {
return true;
} else {
return false;
}
}
var isWeixin = is_weixin();
var winHeight = typeof window.innerHeight != ‘undefined‘ ? window.innerHeight : document.documentElement.clientHeight;
function loadHtml() {
var div = document.createElement(‘div‘);
div.id = ‘weixin-tip‘;
div.innerHTML = ‘<p><img src="live_weixin.png" alt="微信打开"/></p>‘;
document.body.appendChild(div);
}
function loadStyleText(cssText) {
var style = document.createElement(‘style‘);
style.rel = ‘stylesheet‘;
style.type = ‘text/css‘;
try {
style.appendChild(document.createTextNode(cssText));
} catch (E) {
style.styleSheet.cssText = cssText; //ie9以下
}
var head = document.getElementsByTagName("head")[0]; //head标签之间加上style样式
head.appendChild(stylE);
}
var cssText = "#weixin-tip{position: fixed; left:0; top:0; BACkground: rgba(0,0.8); filter:alpha(opacity=80); width: 100%; height:100%; z-index: 100;} #weixin-tip p{text-align: center; margin-top: 10%; padding:0 5%;}";
if (isWeixin) {
loadHtml();
loadStyleText(cssText);
}
</script>
</body>
</html>
将APK路径改一下
还有一张图:live_weixin.png
以上是大佬教程为你收集整理的微信扫码下载apk快速解决方案,中间页引导法全部内容,希望文章能够帮你解决微信扫码下载apk快速解决方案,中间页引导法所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。