Files
quyun/backend/app/http/buy.html.tpl
2025-04-15 21:34:39 +08:00

33 lines
1.2 KiB
Smarty
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
function onBridgeReady() {
WeixinJSBridge.invoke('getBrandWCPayRequest', {{- .signature -}}, function (res) {
if (res.err_msg == "get_brand_wcpay_request:ok") {
// 使,
//res.err_msg将在用户支付成功后返回ok
}
});
}
if (typeof WeixinJSBridge == "undefined") {
if (document.addEventListener) {
document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
} else if (document.attachEvent) {
document.attachEvent('WeixinJSBridgeReady', onBridgeReady);
document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
}
} else {
onBridgeReady();
}
</script>
</body>
</html>