Skip to content
On this page

ek.redirectTo

支持 Promise

关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabBar 页面。

参数

参数类型默认值必填说明
urlstring需要跳转的应用内非 tabBar 的页面的路径 (代码包路径), 路径后可以带参数
successfunction接口调用成功的回调函数
failfunction接口调用失败的回调函数
completefunction接口调用结束的回调函数(调用成功、失败都会执行)

Example

ts
ek.redirectTo({ url: 'profile?id=1' })