|
@@ -536,23 +536,29 @@ function tryH5Pay(orderNo) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function showQrCode(codeUrl, orderNo) {
|
|
function showQrCode(codeUrl, orderNo) {
|
|
|
|
|
+ var c = window._orderContact || {};
|
|
|
var div = document.createElement('div');
|
|
var div = document.createElement('div');
|
|
|
div.style.cssText = 'position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.5);z-index:1000;display:flex;align-items:center;justify-content:center';
|
|
div.style.cssText = 'position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.5);z-index:1000;display:flex;align-items:center;justify-content:center';
|
|
|
div.onclick = function(e) { if (e.target === this) this.remove(); };
|
|
div.onclick = function(e) { if (e.target === this) this.remove(); };
|
|
|
- div.innerHTML = '<div style="background:#fff;border-radius:16px;padding:2rem;text-align:center;max-width:320px">' +
|
|
|
|
|
- '<h3 style="margin-bottom:0.5rem;font-size:1.1rem;">请使用微信扫码支付</h3>' +
|
|
|
|
|
- '<div style="background:#f0fdfa;border-radius:8px;padding:0.8rem;margin-bottom:1rem;text-align:left">' +
|
|
|
|
|
|
|
+ div.innerHTML = '<div style="background:#fff;border-radius:16px;padding:2rem;text-align:center;max-width:340px">' +
|
|
|
|
|
+ '<h3 style="margin-bottom:0.8rem;font-size:1.1rem;">请使用微信扫码支付</h3>' +
|
|
|
|
|
+ '<div style="background:#f0fdfa;border-radius:8px;padding:0.8rem;margin-bottom:0.8rem;text-align:left">' +
|
|
|
'<div style="font-size:0.85rem;color:var(--text-secondary);margin-bottom:0.3rem">肠道菌群基因检测</div>' +
|
|
'<div style="font-size:0.85rem;color:var(--text-secondary);margin-bottom:0.3rem">肠道菌群基因检测</div>' +
|
|
|
- '<div style="display:flex;justify-content:space-between;align-items:center">' +
|
|
|
|
|
|
|
+ '<div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:0.3rem">' +
|
|
|
'<span style="font-size:0.8rem;color:var(--text-muted)">1份 · 含采样套件</span>' +
|
|
'<span style="font-size:0.8rem;color:var(--text-muted)">1份 · 含采样套件</span>' +
|
|
|
'<span style="font-size:1.1rem;font-weight:700;color:#0d9488">¥1,314</span>' +
|
|
'<span style="font-size:1.1rem;font-weight:700;color:#0d9488">¥1,314</span>' +
|
|
|
'</div>' +
|
|
'</div>' +
|
|
|
|
|
+ '<div style="border-top:1px dashed #e2e8f0;margin:0.5rem 0;padding-top:0.5rem;font-size:0.8rem;color:var(--text-muted)">' +
|
|
|
|
|
+ '<div>联系人: ' + (c.name || '') + '</div>' +
|
|
|
|
|
+ '<div>手机号: ' + (c.phone || '') + '</div>' +
|
|
|
|
|
+ '<div>地址: ' + (c.address || '') + '</div>' +
|
|
|
|
|
+ '</div>' +
|
|
|
'</div>' +
|
|
'</div>' +
|
|
|
- '<div style="width:200px;height:200px;margin:0 auto 1rem;display:flex;align-items:center;justify-content:center;border-radius:8px;overflow:hidden">' +
|
|
|
|
|
|
|
+ '<div style="width:200px;height:200px;margin:0 auto 0.8rem;display:flex;align-items:center;justify-content:center;border-radius:8px;overflow:hidden">' +
|
|
|
'<img src="/api/payment/qrcode?text=' + encodeURIComponent(codeUrl) + '" alt="支付二维码" style="width:200px;height:200px">' +
|
|
'<img src="/api/payment/qrcode?text=' + encodeURIComponent(codeUrl) + '" alt="支付二维码" style="width:200px;height:200px">' +
|
|
|
'</div>' +
|
|
'</div>' +
|
|
|
'<p style="font-size:0.8rem;color:#999">打开微信「扫一扫」完成支付</p>' +
|
|
'<p style="font-size:0.8rem;color:#999">打开微信「扫一扫」完成支付</p>' +
|
|
|
- '<button onclick="this.closest(\'div[style]\').remove()" style="margin-top:1rem;padding:0.5rem 2rem;border:1px solid #e2e8f0;border-radius:8px;background:#fff;cursor:pointer">取消支付</button>' +
|
|
|
|
|
|
|
+ '<button onclick="this.closest(\'div[style]\').remove()" style="margin-top:0.8rem;padding:0.5rem 2rem;border:1px solid #e2e8f0;border-radius:8px;background:#fff;cursor:pointer">取消支付</button>' +
|
|
|
'</div>';
|
|
'</div>';
|
|
|
document.body.appendChild(div);
|
|
document.body.appendChild(div);
|
|
|
|
|
|