码支付更新

This commit is contained in:
技术老胡
2024-11-20 16:23:09 +08:00
parent a1707612dc
commit b19e0039f2
12 changed files with 88 additions and 21 deletions

View File

@@ -152,6 +152,7 @@
<script src="/static/js/awesome-qr.min.js"></script>
<script>
const payCode = '<?php echo htmlentities($payUrl); ?>';
const codeType = '<?php echo htmlentities($code_type); ?>';
const payType = '<?php echo htmlentities($type); ?>';
const order = '<?php echo htmlentities($order_id); ?>';
const QR = AwesomeQR.AwesomeQR;
@@ -167,7 +168,11 @@
payTypeText.innerText = '请使用支付宝扫码支付'
}
// 生成二维码
document.getElementById('qrcode').src = await getQrcode(payCode, QR);
if (codeType == 0) {
document.getElementById('qrcode').src = await getQrcode(payCode, QR);
} else {
document.getElementById('qrcode').src = payCode;
}
// 订单过期时间
let passtime = 0;
// 订单状态查询