微信扫码下载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: 80vh;
        max-width: 100vw;
        font-size: 32px;
        text-align: center;
        padding-top: 35vh;
    }

    .drawDownAppText a {
        text-decoration: none;
    }


    /*button样式start*/

    body{
        background:url(http://subtlepatterns.subtlepatterns.netdna-cdn.com/patterns/wild_oliva.png);
    }
    .centered {
        margin:50px auto;
        text-align:center;
    }

    .button::-moz-focus-inner{
        border: 0;
        padding: 0;
    }

    .button{
        display: inline-block;
        *display: inline;
        zoom: 1;
        padding: 6px 20px;
        margin: 0;
        cursor: pointer;
        border: 1px solid #bbb;
        overflow: visible;
        font: bold 13px arial, helvetica, sans-serif;
        text-decoration: none;
        white-space: nowrap;
        color: #555;

        background-color: #ddd;
        background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(255,255,255,1)), to(rgba(255,255,255,0)));
        background-image: -webkit-linear-gradient(top, rgba(255,255,255,1), rgba(255,255,255,0));
        background-image: -moz-linear-gradient(top, rgba(255,255,255,1), rgba(255,255,255,0));
        background-image: -ms-linear-gradient(top, rgba(255,255,255,1), rgba(255,255,255,0));
        background-image: -o-linear-gradient(top, rgba(255,255,255,1), rgba(255,255,255,0));
        background-image: linear-gradient(top, rgba(255,255,255,1), rgba(255,255,255,0));

        -webkit-transition: background-color .2s ease-out;
        -moz-transition: background-color .2s ease-out;
        -ms-transition: background-color .2s ease-out;
        -o-transition: background-color .2s ease-out;
        transition: background-color .2s ease-out;
        background-clip: padding-box; /* Fix bleeding */
        -moz-border-radius: 3px;
        -webkit-border-radius: 3px;
        border-radius: 3px;
        -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 2px 2px -1px rgba(0, 0, 0, .5), 0 1px 0 rgba(255, 255, 255, .3) inset;
        -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 2px 2px -1px rgba(0, 0, 0, .5), 0 1px 0 rgba(255, 255, 255, .3) inset;
        box-shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 2px 2px -1px rgba(0, 0, 0, .5), 0 1px 0 rgba(255, 255, 255, .3) inset;
        text-shadow: 0 1px 0 rgba(255,255,255, .9);

        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }

    .button:hover{
        background-color: #eee;
        color: #555;
    }

    .button:active{
        background: #e9e9e9;
        position: relative;
        top: 1px;
        text-shadow: none;
        -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, .3) inset;
        -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .3) inset;
        box-shadow: 0 1px 1px rgba(0, 0, 0, .3) inset;
    }

    .button[disabled], .button[disabled]:hover, .button[disabled]:active{
        border-color: #eaeaea;
        background: #fafafa;
        cursor: default;
        position: static;
        color: #999;
        /* Usually, !important should be avoided but here it's really needed :) */
        -moz-box-shadow: none !important;
        -webkit-box-shadow: none !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    /* Smaller buttons styles */

    .button.small{
        padding: 4px 12px;
    }

    /* Larger buttons styles */

    .button.large{
        padding: 12px 30px;
        text-transform: uppercase;
    }

    .button.large:active{
        top: 2px;
    }

    /* Colored buttons styles */

    .button.green, .button.red, .button.blue {
        color: #fff;
        text-shadow: 0 1px 0 rgba(0,0,0,.2);

        background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(255,255,255,.3)), to(rgba(255,255,255,0)));
        background-image: -webkit-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0));
        background-image: -moz-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0));
        background-image: -ms-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0));
        background-image: -o-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0));
        background-image: linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0));
    }

    /* */

    .button.green{
        background-color: #57a957;
        border-color: #57a957;
    }

    .button.green:hover{
        background-color: #62c462;
    }

    .button.green:active{
        background: #57a957;
    }

    /* */

    .button.red{
        background-color: #ca3535;
        border-color: #c43c35;
    }

    .button.red:hover{
        background-color: #ee5f5b;
    }

    .button.red:active{
        background: #c43c35;
    }

    /* */

    .button.blue{
        background-color: #269CE9;
        border-color: #269CE9;
    }

    .button.blue:hover{
        background-color: #70B9E8;
    }

    .button.blue:active{
        background: #269CE9;
    }

    /* */

    .green[disabled], .green[disabled]:hover, .green[disabled]:active{
        border-color: #57A957;
        background: #57A957;
        color: #D2FFD2;
    }

    .red[disabled], .red[disabled]:hover, .red[disabled]:active{
        border-color: #C43C35;
        background: #C43C35;
        color: #FFD3D3;
    }

    .blue[disabled], .blue[disabled]:hover, .blue[disabled]:active{
        border-color: #269CE9;
        background: #269CE9;
        color: #93D5FF;
    }

    /* Group buttons */

    .button-group,
    .button-group li{
        display: inline-block;
        *display: inline;
        zoom: 1;
    }

    .button-group{
        font-size: 0; /* Inline block elements gap - fix */
        margin: 0;
        padding: 0;
        background: rgba(0, 0, 0, .1);
        border-bottom: 1px solid rgba(0, 0, 0, .1);
        padding: 7px;
        -moz-border-radius: 7px;
        -webkit-border-radius: 7px;
        border-radius: 7px;
    }

    .button-group li{
        margin-right: -1px; /* Overlap each right button border */
    }

    .button-group .button{
        font-size: 13px; /* Set the font size, different from inherited 0 */
        -moz-border-radius: 0;
        -webkit-border-radius: 0;
        border-radius: 0;
    }

    .button-group .button:active{
        -moz-box-shadow: 0 0 1px rgba(0, 0, 0, .2) inset, 5px 0 5px -3px rgba(0, 0, 0, .2) inset, -5px 0 5px -3px rgba(0, 0, 0, .2) inset;
        -webkit-box-shadow: 0 0 1px rgba(0, 0, 0, .2) inset, 5px 0 5px -3px rgba(0, 0, 0, .2) inset, -5px 0 5px -3px rgba(0, 0, 0, .2) inset;
        box-shadow: 0 0 1px rgba(0, 0, 0, .2) inset, 5px 0 5px -3px rgba(0, 0, 0, .2) inset, -5px 0 5px -3px rgba(0, 0, 0, .2) inset;
    }

    .button-group li:first-child .button{
        -moz-border-radius: 3px 0 0 3px;
        -webkit-border-radius: 3px 0 0 3px;
        border-radius: 3px 0 0 3px;
    }

    .button-group li:first-child .button:active{
        -moz-box-shadow: 0 0 1px rgba(0, 0, 0, .2) inset, -5px 0 5px -3px rgba(0, 0, 0, .2) inset;
        -webkit-box-shadow: 0 0 1px rgba(0, 0, 0, .2) inset, -5px 0 5px -3px rgba(0, 0, 0, .2) inset;
        box-shadow: 0 0 1px rgba(0, 0, 0, .2) inset, -5px 0 5px -3px rgba(0, 0, 0, .2) inset;
    }

    .button-group li:last-child .button{
        -moz-border-radius: 0 3px 3px 0;
        -webkit-border-radius: 0 3px 3px 0;
        border-radius: 0 3px 3px 0;
    }

    .button-group li:last-child .button:active{
        -moz-box-shadow: 0 0 1px rgba(0, 0, 0, .2) inset, 5px 0 5px -3px rgba(0, 0, 0, .2) inset;
        -webkit-box-shadow: 0 0 1px rgba(0, 0, 0, .2) inset, 5px 0 5px -3px rgba(0, 0, 0, .2) inset;
        box-shadow: 0 0 1px rgba(0, 0, 0, .2) inset, 5px 0 5px -3px rgba(0, 0, 0, .2) inset;
    }


    /*button样式end*/



</style>
<div class="drawDownAppText">
    <a style="width: 80vw;height: 10vh;line-height: 10vh;font-size: 2.5vh" class="small blue button" href="xxx.apk
">点击下载xxxApp</span></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,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

最后就是将这个静态页面放入服务器中,然后将此地址用草料等工具转换成网址二维码即可

注意:这个静态页面需要通过带域名的网址进行访问。

转自:https://www.cnblogs.com/liglacier/p/11358828.html

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值