更新 front/templates/payPage.html
This commit is contained in:
parent
401bcc93e1
commit
1fe90a5ccf
|
@ -215,7 +215,6 @@
|
||||||
|
|
||||||
// 获取支付方式列表
|
// 获取支付方式列表
|
||||||
function fetchPaymentMethods() {
|
function fetchPaymentMethods() {
|
||||||
alert(`id:${id}`);
|
|
||||||
const id = getQueryParam('no');
|
const id = getQueryParam('no');
|
||||||
if (id) {
|
if (id) {
|
||||||
fetch(`/pay/front/api/v1/payPage/list?id=${id}`, {
|
fetch(`/pay/front/api/v1/payPage/list?id=${id}`, {
|
||||||
|
@ -346,11 +345,9 @@
|
||||||
|
|
||||||
// 页面加载时执行
|
// 页面加载时执行
|
||||||
window.onload = function() {
|
window.onload = function() {
|
||||||
if (localStorage.getItem('auto-redirect') == 2) {
|
if (localStorage.getItem('auto-redirect') && localStorage.getItem('auto-redirect') == 2) {
|
||||||
alert("二次加载");
|
|
||||||
handlePaymentCallback(); // 如果是支付回调且不是自动跳转,处理支付结果
|
handlePaymentCallback(); // 如果是支付回调且不是自动跳转,处理支付结果
|
||||||
} else {
|
} else {
|
||||||
alert("首次加载");
|
|
||||||
localStorage.setItem('auto-redirect', 1); // 设置自动跳转标记
|
localStorage.setItem('auto-redirect', 1); // 设置自动跳转标记
|
||||||
fetchPaymentMethods(); // 获取支付方式
|
fetchPaymentMethods(); // 获取支付方式
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue