页面导航
openPage(url, options)
Section titled “openPage(url, options)”在新的全屏 WebView 页面中打开 URL。
// 打开新页面SuperSDK.openPage('https://example.com');
// 带配置(当前 config 暂不配置任何功能)SuperSDK.openPage('https://example.com', {});参数说明:
| 参数 | 类型 | 说明 |
|---|---|---|
| url | string | 要打开的 URL |
| options | object | 配置对象(当前暂无可用配置,预留扩展) |
说明: 打开的新页面是完整的全屏 WebView,无原生标题栏遮挡。页面可通过
closePage()关闭。
closePage()
Section titled “closePage()”关闭当前页面。
SuperSDK.closePage();注意:在 TAB 页面中调用此方法无效果。
openExternal(url)
Section titled “openExternal(url)”使用系统方式打开 URL(跳转到外部应用)。
// 打开应用商店SuperSDK.openExternal('market://details?id=com.example.app');
// 拨打电话SuperSDK.openExternal('tel:10086');
// 发送邮件openWithBrowser(url)
Section titled “openWithBrowser(url)”使用系统浏览器打开 URL。
SuperSDK.openWithBrowser('https://www.google.com');