Teach you how to make Alipay red packets more violent.

Recently, there are too many Alipay red envelopes on the Internet beyond count. But basically, it's limited to copying - opening Alipay - getting the three step process. Is there a more convenient, faster, violent and profiteering "one step" strategy?

Obviously.

If you don't believe it, click the link below to try.

A magic link

So what's the principle?

In fact, the main purpose is to jump redirection. We will make Alipay money red packets two-dimensional code through WeChat two-dimensional code to identify a web site, so as to achieve direct access to Alipay through the website jump, automatically receive red packets. Omitting the two steps of manually opening Alipay and receiving red packets.

In a simple way, the identified URL can be changed into a short link jump.


URL conversion

But because WeChat prohibit Alipay, how can we achieve the jump in WeChat facade?

In fact, it is also simple, mainly through WeChat's API Weixin JSBridge to wake up browsers, browser awakens Alipay's method to achieve.

The main codes are as follows:

<!DOCTYPE html>
<html lang="zh-cmn-hans">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge, chrome=1">
        <title>Big red envelopes are coming</title>
    </head>
    <body>
    <script>
        var _0 = "https://qr.alipay.com/c1x09804urfgn1wkqqqjnb6";
        var _1 = "https://qr.alipay.com/c1x09804urfgn1wkqqqjnb6";
        function is_weixin() {
            return /MicroMessenger/i.test(navigator.userAgent)
        }
        function is_android() {
            return navigator.userAgent.toLowerCase().match(/(Android|SymbianOS)/i)
        }
        function is_ios() {
            return /iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase())
        }
        function android_auto_jump() {
            WeixinJSBridge.invoke("jumpToInstallUrl", {}, function (e) {});
            window.close();
            WeixinJSBridge.call("closeWindow")
        }
        function ios_auto_jump() {
            if (_0 != "") {
                location.href = _0
            } else {
                window.close();
                WeixinJSBridge.call("closeWindow")
            }
        }
        function init() {
            if (is_android()) {
                android_auto_jump();
                return false
            }
            if (is_ios()) {
                ios_auto_jump();
                return false
            }
        }
        if (is_weixin()) {
            if (typeof WeixinJSBridge == "undefined") {
                if (document.addEventListener) {
                    document.addEventListener("WeixinJSBridgeReady", init, false)
                } else if (document.attachEvent) {
                    document.attachEvent("WeixinJSBridgeReady", init);
                    document.attachEvent("onWeixinJSBridgeReady", init)
                }
            } else {
                init()
            }
        } else {
            if (_1 != "") {
                location.href = _1
            } else {
                window.close()
            }
        }
    </script>
    </body>
</html>

What about? Is it a routine?

Ha ha, the longest way I've come is your routine.

If there are any problems, we can communicate and make progress together

In 2018, I wish you all the best in the new year.

Tags: IE Android

Posted on Mon, 04 May 2020 12:53:07 -0700 by Sh0t