fix: 移除抖音支付额外弹窗并统一成功页跳转

This commit is contained in:
Codex
2026-09-09 17:30:00 +08:00
parent 2e9a732f9d
commit b5b6359d8e
5 changed files with 197 additions and 66 deletions
+12
View File
@@ -0,0 +1,12 @@
// Shared result pages for WeChat, Alipay and Douyin. Keep the existing page design.
export function jumpToPaymentSuccess() {
const url = '/pages/order_package/order_submit_ok/order_submit_ok';
const pages = typeof getCurrentPages === 'function' ? getCurrentPages() : [];
if (pages[pages.length - 1]?.route === url.slice(1)) return Promise.resolve(true);
return new Promise(resolve => {
uni.navigateTo({ url, success: () => resolve(true), fail: () => {
// A full page stack must not leave a confirmed payment on the checkout screen.
uni.redirectTo({ url, success: () => resolve(true), fail: () => resolve(false) });
} });
});
}