feat(h5): SGBridge 新增 closePage(返回上一页)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -118,6 +118,12 @@
|
||||
else console.log('[SGBridge mock] launchApp →', json);
|
||||
}
|
||||
|
||||
/** 网页请求返回上一页(原生 popBackStack;无桥时浏览器仅 log)。 */
|
||||
function closePage() {
|
||||
if (hasNative && native.closePage) native.closePage();
|
||||
else console.log('[SGBridge mock] closePage');
|
||||
}
|
||||
|
||||
// ====== 原生 → H5 事件总线 ======
|
||||
|
||||
var listeners = {}; // event → [fn]
|
||||
@@ -155,6 +161,7 @@
|
||||
startCompare: startCompare,
|
||||
startCouponClaim: startCouponClaim,
|
||||
launchApp: launchApp,
|
||||
closePage: closePage,
|
||||
// 事件
|
||||
on: on,
|
||||
_emit: _emit,
|
||||
|
||||
Reference in New Issue
Block a user