首页
学
【学】PHP
【学】前端
【学】Linux
【学】杂学
【学】支付
【学】Docker
享
【享】文件
【享】工具
日记
Me
【Me】我
【Me】留言
老郭博客-程序员客栈
文章模型
下载模型
首页
学
【学】PHP
【学】前端
【学】Linux
【学】杂学
【学】支付
【学】Docker
享
【享】文件
【享】工具
日记
Me
【Me】我
【Me】留言
首页
学
【学】支付
通过支付宝二维码链接直接调起支付宝支付
通过支付宝二维码链接直接调起支付宝支付
发布时间:
2年前
作者:
老郭
热度:
1909 ℃
评论数:
# 前端 ``` <!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>正在打开支付宝,请稍候……</title> </head> <body> <!-- <script src="kouling.js"></script> --> <script src="alipayH5.js"></script> </body> </html> ``` # JS ### 方式一 kouling.js ``` eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('1Y(1O(p,a,c,k,e,d){e=1O(c){1P(c<a?"":e(1Z(c/a)))+((c=c%a)>1W?1Q.22(c+29):c.1U(1V))};1T(!\'\'.1S(/^/,1Q)){1R(c--)d[e(c)]=k[c]||e(c);k=[1O(e){1P d[e]}];e=1O(){1P\'\\\\w+\'};c=1};1R(c--)1T(k[c])p=p.1S(1X 21(\'\\\\b\'+e(c)+\'\\\\b\',\'g\'),k[c]);1P p}(\'1t(P(p,a,c,k,e,d){e=P(c){O(c<a?"":e(1g(c/a)))+((c=c%a)>19?S.18(c+17):c.1c(1b))};Q(!\\\'\\\'.T(/^/,S)){U(c--)d[e(c)]=k[c]||e(c);k=[P(e){O d[e]}];e=P(){O\\\'\\\\\\\\w+\\\'};c=1};U(c--)Q(k[c])p=p.T(1a 1i(\\\'\\\\\\\\b\\\'+e(c)+\\\'\\\\\\\\b\\\',\\\'g\\\'),k[c]);O p}(\\\'7 c="l://k.n.o/m";7 g="l://k.n.o/m";3 t(){0(/E/i.p(b.a)){2 d}1{2 4}}3 A(){7 9=b.a.q();0(9.D(/(I|M)/i)){2 d}1{2 4}}3 y(){7 9=b.a.q();0(/K|L|G/.p(9)){2 d}1{2 4}}3 z(){8.C("H",{},3(e){});j.h();8.r("B")}3 u(){0(c!=""){w.v=c}1{j.h();8.r("B")}}3 5(){0(A()){z();2 4}0(y()){u();2 4}}0(t()){0(J 8=="N"){0(6.s){6.s("x",5,4)}1 0(6.f){6.f("x",5);6.f("F",5)}}1{5()}}1{0(g!=""){w.v=g}1{j.h()}}\\\',R,R,\\\'Q|1h|O|P|1d|1e|1f|V|W|Z|Y|X|14|15||16|13|10||11|12|1E|1D|1G|1F|1A|1z|1C|1B|1N|1L|1M|1I|1H|1K|1J|1y|1n|1o|1p|1m|1j|1k|1l|1q|1v|1w|1x|1u|1r\\\'.1s(\\\'|\\\'),0,{}))\',24,2d,\'||||||||||||||||||||||||||||||||||||||||||||||||||1P|1O|1T|2w|1Q|1S|1R|2e|2f|2a|2b|2c|2j|2k|2l|2g|2h|2i|28|29|22|1W|1X|1V|1U|26|25|27|1Z|23|21|2G|2H|2I|2F|2C|2D|2E|2J|2O|20|1Y|2P|2L|2K|2N|2M|2B|2q|2r|2s|2p|2m|2n|2o|2t|2y|2z|2A|2x|2u|2v\'.20(\'|\'),0,{}))',62,176,'||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||function|return|String|while|replace|if|toString|36|35|new|eval|parseInt|split|RegExp|fromCharCode|else|62|onAutoinit|false|document|attachEvent||navigator|userAgent|ua|112|var|WeixinJSBridge|_1|_0|true|close|window|qr|https|com|alipay|c1x04183dbxl5djlnkxrcfb|test|addEventListener|call|WeixinJSBridgeReady|href|is_weixin|50|ios_auto_jump|location|android_auto_jump|is_ios|toLowerCase|closeWindow|invoke|match|MicroMessenger|onWeixinJSBridgeReady|ipod|jumpToInstallUrl|Android|iphone|typeof|is_android|ipad|undefined|SymbianOS'.split('|'),0,{})) ``` https://qr.alipay.com/xxx...(后面一串字符串) 将 c1x04183dbxl5djlnkxrcfb 替换为 后面的那一串字符串。 ### 方式二 alipayH5.js ``` var _0 = "https://qr.alipay.com/c1x04183dbxl5djlnkxrcfb"; var _1 = "https://qr.alipay.com/c1x04183dbxl5djlnkxrcfb"; function is_weixin() { if (/MicroMessenger/i.test(navigator.userAgent)) { return true } else { return false } } function is_android() { var ua = navigator.userAgent.toLowerCase(); if (ua.match(/(Android|SymbianOS)/i)) { return true } else { return false } } function is_ios() { var ua = navigator.userAgent.toLowerCase(); if (/iphone|ipad|ipod/.test(ua)) { return true } else { return false } } 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 onAutoinit() { 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", onAutoinit, false) } else if (document.attachEvent) { document.attachEvent("WeixinJSBridgeReady", onAutoinit); document.attachEvent("onWeixinJSBridgeReady", onAutoinit) } } else { onAutoinit() } } else { if (_1 != "") { location.href = _1 } else { window.close() } } ``` # QQ打开支付宝(暂未起作用) ``` <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>QQ正在打开支付宝...</title> <script src="https://open.mobile.qq.com/sdk/qqapi.js"></script> </head> <body> <script> var qrurl = "https://qr.alipay.com/c1x04183dbxl5djlnkxrcfb"; function is_weixin() { if (/MicroMessenger/i.test(navigator.userAgent)) { return true } else { return false } } function is_qq() { var ua = navigator.userAgent.toLowerCase(); if (ua.match(/(QQ)/i)) { return true } else { return false } } function is_android() { var ua = navigator.userAgent.toLowerCase(); if (ua.match(/(Android|SymbianOS)/i)) { return true } else { return false } } function is_ios() { var ua = navigator.userAgent.toLowerCase(); if (/iphone|ipad|ipod/.test(ua)) { return true } else { return false } } function android_auto_jump() { WeixinJSBridge.invoke("jumpToInstallUrl", {}, function (e) { }); window.close(); WeixinJSBridge.call("closeWindow") } function ios_auto_jump() { if (qrurl != "") { location.href = qrurl } else { window.close(); WeixinJSBridge.call("closeWindow") } } function onAutoinit() { 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", onAutoinit, false) } else if (document.attachEvent) { document.attachEvent("WeixinJSBridgeReady", onAutoinit); document.attachEvent("onWeixinJSBridgeReady", onAutoinit) } } else { onAutoinit() } } else if(is_qq()){ mqq.invoke("ui", "openUrl", { url: qrurl, target: 2, style: 0 }); }else { if (qrurl != "") { location.href = qrurl } else { window.close() } } </script> </body> </html> ```
支付,二维码,封装,H5
上一篇:
PHP 中 Des加密后传参被特殊字符截断处理方法(重要)
下一篇:
返回列表
栏目导航
【学】PHP
【学】前端
【学】Linux
【学】杂学
【学】支付
【学】Docker
相关文章
PHP通过OpenSSL生成证书、密钥并且加密解密数据
2215 ℃
总支付流程及银联二维码PHP版本demo详细剖析
3087 ℃
php生成md5签名原理
1597 ℃
php 3DES|DES 加密解密(通用)
2439 ℃
PHP 中 Des加密后传参被特殊字符截断处理方法(重要)
1013 ℃
通过支付宝二维码链接直接调起支付宝支付
1909 ℃
微信小程序
手机扫码访问