This commit is contained in:
Zyronon
2025-12-02 02:03:27 +08:00
parent 2f204027f4
commit 28e9df03b1

View File

@@ -232,13 +232,13 @@ onUnmounted(() => {
})
async function handlePayment() {
let win = window.open('about:blank')
let res1 = await testPay()
if (res1.success) {
win.document.write(res1.data as string);
win.document.close();
}
return
// let win = window.open('about:blank')
// let res1 = await testPay()
// if (res1.success) {
// win.document.write(res1.data as string);
// win.document.close();
// }
// return
if (loading || startLoop) return
loading = true
let data = {
@@ -252,10 +252,14 @@ async function handlePayment() {
if (res.success) {
_nextTick(() => {
const iframe = document.getElementById('payFrame');
const doc = iframe.contentWindow.document;
doc.open();
doc.write(res.data.result); // 写入 form
doc.close(); // form 会自动提交
// 强制重置为 about:blankdocument 可写
iframe.src = 'about:blank';
iframe.onload = () => {
const doc = iframe.contentWindow.document;
doc.open();
doc.write(res.data.result); // 写入 form
doc.close(); // form 会自动提交
};
startLoop = true
})
orderNo = res.data.orderNo
@@ -367,7 +371,6 @@ async function getCouponInfo() {
</div>
</div>
<div id="pay" class="mb-50">
<!-- Page Header -->
<div class="text-center mb-6">