|
|
@@ -310,6 +310,7 @@ body{padding-bottom:70px}
|
|
|
|
|
|
<script>
|
|
|
function submitOrder(amount, productName) {
|
|
|
+ function isWechatBrowser() { return navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1; }
|
|
|
var name = document.getElementById('orderName').value.trim();
|
|
|
var phone = document.getElementById('orderPhone').value.trim();
|
|
|
var address = document.getElementById('orderAddress').value.trim();
|
|
|
@@ -377,7 +378,7 @@ function showQrCode(codeUrl, orderNo, productName, amount) {
|
|
|
'<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">' +
|
|
|
'</div>' +
|
|
|
- '<p style="font-size:0.8rem;color:#999">打开微信「扫一扫」完成支付</p>' +
|
|
|
+ '<p style="font-size:0.8rem;color:#999">' + (typeof isWechatBrowser === 'function' && isWechatBrowser() ? '请截图保存二维码 → 打开微信扫一扫 → 从相册选择' : '打开微信「扫一扫」完成支付') + '</p>' +
|
|
|
'<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>';
|
|
|
document.body.appendChild(div);
|