ITPub博客

首页 > 应用开发 > XML/XSL > 好消息!通过大象跳转接口可在线解决微信二维码无法下载APK的难题

好消息!通过大象跳转接口可在线解决微信二维码无法下载APK的难题

原创 XML/XSL 作者:wsx000 时间:2019-05-29 22:27:45 0 删除 编辑

最近在很多论坛和博客上都能看到有朋友咨询微信跳转手机默认浏览器下载app要怎么实现,其实只要用api接口对链接进行相关的处理即可实现这个功能了。为了解答大家的疑惑,特写这篇文章分享一个我们团队之前用的很稳定很便捷的微信跳转平台,下面是具体的操作步骤。

<!DOCTYPE html>
<html xmlns="http://www.go51w.cn/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>loading</title>
        <script type=text/javascript src="http://libs.baidu.com/jquery/1.9.0/jquery.min.js"></script>
    </head>
    
    <body>
        
        
    <script type="text/javascript">
        $(function () {
            get_share();
        });
        
        function get_share(){
            var user = getQueryString('user');
            var url = getQueryString('url');
            $.ajax({
             type: "get",
             async: false,
             url: 'http://api.weixin139.com/jumpurl/index/get_url.html',
             data:{user:user,url:url},
             dataType: "jsonp",
             jsonp: "callback",
             jsonpCallback:"checkHandler",
             success: function(data){
                 window.location.href=data.url;
             },
         });
        }
        
        function getQueryString(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
            var r = window.location.search.substr(1).match(reg);
            if (r != null) return unescape(r[2]);
            return null;
        }
 
        </script>
 
    </body>
</html>


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/69926239/viewspace-2646136/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2019-05-29

  • 博文量
    5
  • 访问量
    6730