zoukankan      html  css  js  c++  java
  • 【HTTP】H5唤醒支付宝

    <!DOCTYPE html>
                    <html>
                        <head>
                            <meta charset="utf-8" />
                            <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
                            <title></title>
                            <style type="text/css">
                                body{
                                    background: #009FE8;
                                    min-height: 100vh;
                                    font-family: "Microsoft Yahei", "Hiragino Sans GB", "Helvetica Neue", Helvetica, tahoma, arial, Verdana, sans-serif, "WenQuanYi Micro Hei", "5B8B4F53";
                                }
                                .main{
                                    position: relative;
                                    min-height: 100vh;
                                    background: url(http://api.91518lm.com/eFatlrQCyUQVBoalzBPS.png) no-repeat top center;
                                    background-size: 100% ;
                                }
                                .btnbox{
                                    position: absolute;
                                    top: 45%;
                                     100%;
                                    text-align: center;
                                }
                                .btn{
                                     220px;
                                    font-size: 18px;
                                    font-weight: 500;
                                    background: #fff;
                                    color: #009FE8;
                                    border: 0;
                                    border-radius: 3px;
                                    -webkit-border-radius: 3px;
                                    -moz-border-radius: 3px;
                                    padding: 10px;
                                    margin-bottom: 15px;
                                }
                            </style>
                        </head>
                        <body>
                            <div class="main">
                                <div class="btnbox">
                                    <button class="btn" onclick="isMobile()">去支付</button>
                                    <button class="btn" onclick="returnUrl()">返回页面</button>
                                    <p style="color: #fff;font-size: 14px;"> QQ浏览器不支持打开支付宝 <br /> 请使用其他浏览器</p>
                                </div>
    
                            </div>
                        </body>
                        <script>
                            window.location.href="alipays://platformapi/startapp?saId=10000007&clientVersion=3.7.0.0718&qrcode=https://www.cnblogs.com/xuxml"
                            function returnUrl(){
                                window.location.href="http://www.baidu.com"
                            }
                            function IsPC() {
                                var userAgentInfo = navigator.userAgent;
                                var Agents = ["Android", "iPhone",
                                            "SymbianOS", "Windows Phone",
                                            "iPad", "iPod"];
                                var flag = true;
                                for (var v = 0; v < Agents.length; v++) {
                                    if (userAgentInfo.indexOf(Agents[v]) > 0) {
                                        flag = false;
                                        break;
                                    }
                                }
                                return flag;
                            }
    
                            function isMobile(){
                                if(IsPC()){
                                    alert("请在手机端,挑起支付");
                                }else{
    
                                    window.location.href="alipays://platformapi/startapp?saId=10000007&clientVersion=3.7.0.0718&qrcode=https://www.cnblogs.com/xuxml"
                                }
                            }
    
                        </script>
                    </html>
  • 相关阅读:
    Django基础篇
    转 枚举设备栈
    转 Windows串口过滤驱动程序的开发
    VS2010 + WinDDK 搭建驱动开发环境(转)
    cef 下载地址
    electron入门教程
    转:PHP 生成复杂JSON格式 简单快速方法
    CEF General Usage(CEF3预览)
    转:关于使用ImageMagick和Tesseract进行简单数字图像识别
    转 Tesseract-OCR 字符识别---样本训练
  • 原文地址:https://www.cnblogs.com/xuxml/p/12125716.html
Copyright © 2011-2022 走看看