/** * 路由错误码 * - 4: 框架内部异常 */ export type RouteErrorCode = 4 /** * * @tutorial http://uniapp.dcloud.io/api/router.html#event-channel */ export type EventChannel = {} export type NavigateToSuccess = AsyncApiSuccessResult type NavigateToSuccessCallback = (result: NavigateToSuccess) => void export interface NavigateToFail extends IUniError { errCode: RouteErrorCode } type NavigateToFailCallback = (result: NavigateToFail) => void export type NavigateToComplete = AsyncApiResult type NavigateToCompleteCallback = (result: NavigateToComplete) => void export type NavigateToOptions = { /** * 需要跳转的应用内非 tabBar 的页面的路径 , 路径后可以带参数 * @uniPlatform { * "app": { * "android": { * "osVer": "5.0", * "uniVer": "√", * "unixVer": "√" * }, * "ios": { * "osVer": "12.0", * "uniVer": "√", * "unixVer": "4.11" * } * }, * "mp": { * "weixin": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "alipay": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "baidu": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "toutiao": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "lark": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "qq": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "kuaishou": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "jd": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * } * }, * "web": { * "uniVer": "√", * "unixVer": "4.0" * } * } */ url: string | string.PageURIString /** * 窗口显示的动画类型 * - auto: 自动选择动画效果 * - none: 无动画效果 * - slide-in-right: 从右侧横向滑动效果 * - slide-in-left: 左侧横向滑动效果 * - slide-in-top: 从上侧竖向滑动效果 * - slide-in-bottom: 从下侧竖向滑动效果 * - fade-in: 从透明到不透明逐渐显示效果 * - zoom-out: 从小到大逐渐放大显示效果 * - zoom-fade-out: 从小到大逐渐放大并且从透明到不透明逐渐显示效果 * - pop-in: 从右侧平移入栈动画效果 * - UnionType => 'auto' | 'none' | 'slide-in-right' | 'slide-in-left' | 'slide-in-top' | 'slide-in-bottom' | 'fade-in' | 'zoom-out' | 'zoom-fade-out' | 'pop-in' * @uniPlatform { * "app": { * "android": { * "osVer": "5.0", * "uniVer": "√", * "unixVer": "x" * }, * "ios": { * "osVer": "12.0", * "uniVer": "√", * "unixVer": "x" * } * }, * "mp": { * "weixin": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "alipay": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "baidu": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "toutiao": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "lark": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "qq": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "kuaishou": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "jd": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * } * }, * "web": { * "uniVer": "√", * "unixVer": "4.0" * } * } */ animationType?: string | null /** * 窗口显示动画的持续时间,单位为 ms * @uniPlatform { * "app": { * "android": { * "osVer": "5.0", * "uniVer": "√", * "unixVer": "x" * }, * "ios": { * "osVer": "12.0", * "uniVer": "√", * "unixVer": "x" * } * }, * "mp": { * "weixin": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "alipay": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "baidu": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "toutiao": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "lark": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "qq": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "kuaishou": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "jd": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * } * }, * "web": { * "uniVer": "√", * "unixVer": "4.0" * } * } */ animationDuration?: number | null /** * 页面间通信接口,用于监听被打开页面发送到当前页面的数据 * @uniPlatform { * "app": { * "android": { * "osVer": "5.0", * "uniVer": "√", * "unixVer": "x" * }, * "ios": { * "osVer": "12.0", * "uniVer": "√", * "unixVer": "x" * } * }, * "mp": { * "weixin": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "alipay": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "baidu": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "toutiao": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "lark": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "qq": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "kuaishou": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "jd": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * } * }, * "web": { * "uniVer": "√", * "unixVer": "4.0" * } * } */ events?: any | null /** * 接口调用成功的回调函数 * @uniPlatform { * "app": { * "android": { * "osVer": "5.0", * "uniVer": "√", * "unixVer": "√" * }, * "ios": { * "osVer": "12.0", * "uniVer": "√", * "unixVer": "4.11" * } * }, * "mp": { * "weixin": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "alipay": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "baidu": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "toutiao": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "lark": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "qq": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "kuaishou": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "jd": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * } * }, * "web": { * "uniVer": "√", * "unixVer": "4.0" * } * } */ success?: NavigateToSuccessCallback | null /** * 接口调用失败的回调函数 * @uniPlatform { * "app": { * "android": { * "osVer": "5.0", * "uniVer": "√", * "unixVer": "√" * }, * "ios": { * "osVer": "12.0", * "uniVer": "√", * "unixVer": "4.11" * } * }, * "mp": { * "weixin": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "alipay": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "baidu": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "toutiao": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "lark": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "qq": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "kuaishou": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "jd": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * } * }, * "web": { * "uniVer": "√", * "unixVer": "4.0" * } * } */ fail?: NavigateToFailCallback | null /** * 接口调用结束的回调函数(调用成功、失败都会执行) * @uniPlatform { * "app": { * "android": { * "osVer": "5.0", * "uniVer": "√", * "unixVer": "√" * }, * "ios": { * "osVer": "12.0", * "uniVer": "√", * "unixVer": "4.11" * } * }, * "mp": { * "weixin": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "alipay": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "baidu": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "toutiao": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "lark": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "qq": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "kuaishou": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "jd": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * } * }, * "web": { * "uniVer": "√", * "unixVer": "4.0" * } * } */ complete?: NavigateToCompleteCallback | null } export type RedirectToSuccess = AsyncApiSuccessResult type RedirectToSuccessCallback = (result: AsyncApiSuccessResult) => void export interface RedirectToFail extends IUniError { errCode: RouteErrorCode } type RedirectToFailCallback = (result: RedirectToFail) => void export type RedirectToComplete = AsyncApiResult type RedirectToCompleteCallback = (result: RedirectToComplete) => void export type RedirectToOptions = { /** * 需要跳转的应用内非 tabBar 的页面的路径 , 路径后可以带参数 * @uniPlatform { * "app": { * "android": { * "osVer": "5.0", * "uniVer": "√", * "unixVer": "√" * }, * "ios": { * "osVer": "12.0", * "uniVer": "√", * "unixVer": "4.11" * } * }, * "mp": { * "weixin": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "alipay": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "baidu": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "toutiao": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "lark": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "qq": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "kuaishou": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "jd": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * } * }, * "web": { * "uniVer": "√", * "unixVer": "4.0" * } * } */ url: string | string.PageURIString /** * 接口调用成功的回调函数 * @uniPlatform { * "app": { * "android": { * "osVer": "5.0", * "uniVer": "√", * "unixVer": "√" * }, * "ios": { * "osVer": "12.0", * "uniVer": "√", * "unixVer": "4.11" * } * }, * "mp": { * "weixin": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "alipay": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "baidu": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "toutiao": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "lark": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "qq": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "kuaishou": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "jd": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * } * }, * "web": { * "uniVer": "√", * "unixVer": "4.0" * } * } */ success?: RedirectToSuccessCallback | null /** * 接口调用失败的回调函数 * @uniPlatform { * "app": { * "android": { * "osVer": "5.0", * "uniVer": "√", * "unixVer": "√" * }, * "ios": { * "osVer": "12.0", * "uniVer": "√", * "unixVer": "4.11" * } * }, * "mp": { * "weixin": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "alipay": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "baidu": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "toutiao": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "lark": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "qq": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "kuaishou": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "jd": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * } * }, * "web": { * "uniVer": "√", * "unixVer": "4.0" * } * } */ fail?: RedirectToFailCallback | null /** * 接口调用结束的回调函数(调用成功、失败都会执行) * @uniPlatform { * "app": { * "android": { * "osVer": "5.0", * "uniVer": "√", * "unixVer": "√" * }, * "ios": { * "osVer": "12.0", * "uniVer": "√", * "unixVer": "4.11" * } * }, * "mp": { * "weixin": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "alipay": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "baidu": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "toutiao": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "lark": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "qq": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "kuaishou": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "jd": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * } * }, * "web": { * "uniVer": "√", * "unixVer": "4.0" * } * } */ complete?: RedirectToCompleteCallback | null } export type ReLaunchSuccess = AsyncApiSuccessResult type ReLaunchSuccessCallback = (result: ReLaunchSuccess) => void export interface ReLaunchFail extends IUniError { errCode: RouteErrorCode } type ReLaunchFailCallback = (result: ReLaunchFail) => void export type ReLaunchComplete = AsyncApiResult type ReLaunchCompleteCallback = (result: ReLaunchComplete) => void export type ReLaunchOptions = { /** * 需要跳转的应用内页面路径 , 路径后可以带参数。参数与路径之间使用?分隔,参数键与参数值用=相连,不同参数用&分隔;如 'path?key=value&key2=value2',如果跳转的页面路径是 tabBar 页面则不能带参数 * @uniPlatform { * "app": { * "android": { * "osVer": "5.0", * "uniVer": "√", * "unixVer": "√" * }, * "ios": { * "osVer": "12.0", * "uniVer": "√", * "unixVer": "4.11" * } * }, * "mp": { * "weixin": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "alipay": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "baidu": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "toutiao": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "lark": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "qq": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "kuaishou": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "jd": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * } * }, * "web": { * "uniVer": "√", * "unixVer": "4.0" * } * } */ url: string | string.PageURIString /** * 接口调用成功的回调函数 * @uniPlatform { * "app": { * "android": { * "osVer": "5.0", * "uniVer": "√", * "unixVer": "√" * }, * "ios": { * "osVer": "12.0", * "uniVer": "√", * "unixVer": "4.11" * } * }, * "mp": { * "weixin": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "alipay": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "baidu": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "toutiao": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "lark": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "qq": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "kuaishou": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "jd": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * } * }, * "web": { * "uniVer": "√", * "unixVer": "4.0" * } * } */ success?: ReLaunchSuccessCallback | null /** * 接口调用失败的回调函数 * @uniPlatform { * "app": { * "android": { * "osVer": "5.0", * "uniVer": "√", * "unixVer": "√" * }, * "ios": { * "osVer": "12.0", * "uniVer": "√", * "unixVer": "4.11" * } * }, * "mp": { * "weixin": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "alipay": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "baidu": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "toutiao": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "lark": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "qq": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "kuaishou": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "jd": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * } * }, * "web": { * "uniVer": "√", * "unixVer": "4.0" * } * } */ fail?: ReLaunchFailCallback | null /** * 接口调用结束的回调函数(调用成功、失败都会执行) * @uniPlatform { * "app": { * "android": { * "osVer": "5.0", * "uniVer": "√", * "unixVer": "√" * }, * "ios": { * "osVer": "12.0", * "uniVer": "√", * "unixVer": "4.11" * } * }, * "mp": { * "weixin": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "alipay": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "baidu": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "toutiao": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "lark": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "qq": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "kuaishou": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "jd": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * } * }, * "web": { * "uniVer": "√", * "unixVer": "4.0" * } * } */ complete?: ReLaunchCompleteCallback | null } export type SwitchTabSuccess = AsyncApiSuccessResult export type SwitchTabSuccessCallback = (result: SwitchTabSuccess) => void export interface SwitchTabFail extends IUniError { errCode: RouteErrorCode } export type SwitchTabFailCallback = (result: SwitchTabFail) => void export type SwitchTabComplete = AsyncApiResult export type SwitchTabCompleteCallback = (result: SwitchTabComplete) => void export type SwitchTabOptions = { /** * 需要跳转的 tabBar 页面的路径,路径后不能带参数 * @uniPlatform { * "app": { * "android": { * "osVer": "5.0", * "uniVer": "√", * "unixVer": "√" * }, * "ios": { * "osVer": "12.0", * "uniVer": "√", * "unixVer": "4.11" * } * }, * "mp": { * "weixin": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "alipay": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "baidu": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "toutiao": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "lark": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "qq": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "kuaishou": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "jd": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * } * }, * "web": { * "uniVer": "√", * "unixVer": "4.0" * } * } */ url: string | string.PageURIString /** * 接口调用成功的回调函数 * @uniPlatform { * "app": { * "android": { * "osVer": "5.0", * "uniVer": "√", * "unixVer": "√" * }, * "ios": { * "osVer": "12.0", * "uniVer": "√", * "unixVer": "4.11" * } * }, * "mp": { * "weixin": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "alipay": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "baidu": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "toutiao": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "lark": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "qq": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "kuaishou": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "jd": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * } * }, * "web": { * "uniVer": "√", * "unixVer": "4.0" * } * } */ success?: SwitchTabSuccessCallback | null /** * 接口调用失败的回调函数 * @uniPlatform { * "app": { * "android": { * "osVer": "5.0", * "uniVer": "√", * "unixVer": "√" * }, * "ios": { * "osVer": "12.0", * "uniVer": "√", * "unixVer": "4.11" * } * }, * "mp": { * "weixin": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "alipay": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "baidu": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "toutiao": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "lark": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "qq": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "kuaishou": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "jd": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * } * }, * "web": { * "uniVer": "√", * "unixVer": "4.0" * } * } */ fail?: SwitchTabFailCallback | null /** * 接口调用结束的回调函数(调用成功、失败都会执行) * @uniPlatform { * "app": { * "android": { * "osVer": "5.0", * "uniVer": "√", * "unixVer": "√" * }, * "ios": { * "osVer": "12.0", * "uniVer": "√", * "unixVer": "4.11" * } * }, * "mp": { * "weixin": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "alipay": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "baidu": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "toutiao": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "lark": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "qq": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "kuaishou": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "jd": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * } * }, * "web": { * "uniVer": "√", * "unixVer": "4.0" * } * } */ complete?: SwitchTabCompleteCallback | null } export type NavigateBackSuccess = AsyncApiSuccessResult type NavigateBackSuccessCallback = (result: NavigateBackSuccess) => void export interface NavigateBackFail extends IUniError { errCode: RouteErrorCode } type NavigateBackFailCallback = (result: NavigateBackFail) => void export type NavigateBackComplete = AsyncApiResult type NavigateBackCompleteCallback = (result: NavigateBackComplete) => void export type NavigateBackOptions = { /** * 返回的页面数,如果 delta 大于现有页面数,则返回到首页 * @uniPlatform { * "app": { * "android": { * "osVer": "5.0", * "uniVer": "√", * "unixVer": "√" * }, * "ios": { * "osVer": "12.0", * "uniVer": "√", * "unixVer": "4.11" * } * }, * "mp": { * "weixin": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "alipay": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "baidu": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "toutiao": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "lark": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "qq": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "kuaishou": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "jd": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * } * }, * "web": { * "uniVer": "√", * "unixVer": "4.0" * } * } */ delta?: number | null /** * 窗口关闭的动画类型 * - auto: 自动选择动画效果 * - none: 无动画效果 * - slide-out-right: 横向向右侧滑出屏幕动画 * - slide-out-left: 横向向左侧滑出屏幕动画 * - slide-out-top: 竖向向上侧滑出屏幕动画 * - slide-out-bottom: 竖向向下侧滑出屏幕动画 * - fade-out: 从不透明到透明逐渐隐藏动画 * - zoom-in: 从大逐渐缩小关闭动画 * - zoom-fade-in: 从大逐渐缩小并且从不透明到透明逐渐隐藏关闭动画 * - pop-out: 从右侧平移出栈动画效果 * - UnionType => 'auto' | 'none' | 'slide-out-right' | 'slide-out-left' | 'slide-out-top' | 'slide-out-bottom' | 'fade-out' | 'zoom-in' | 'zoom-fade-in' | 'pop-out' * @uniPlatform { * "app": { * "android": { * "osVer": "5.0", * "uniVer": "√", * "unixVer": "x" * }, * "ios": { * "osVer": "12.0", * "uniVer": "√", * "unixVer": "x" * } * }, * "mp": { * "weixin": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "alipay": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "baidu": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "toutiao": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "lark": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "qq": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "kuaishou": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "jd": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * } * }, * "web": { * "uniVer": "√", * "unixVer": "4.0" * } * } */ animationType?: string | null /** * 窗口关闭动画的持续时间,单位为 ms * @uniPlatform { * "app": { * "android": { * "osVer": "5.0", * "uniVer": "√", * "unixVer": "x" * }, * "ios": { * "osVer": "12.0", * "uniVer": "√", * "unixVer": "x" * } * }, * "mp": { * "weixin": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "alipay": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "baidu": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "toutiao": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "lark": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "qq": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "kuaishou": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "jd": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * } * }, * "web": { * "uniVer": "√", * "unixVer": "4.0" * } * } */ animationDuration?: number | null /** * 接口调用成功的回调函数 * @uniPlatform { * "app": { * "android": { * "osVer": "5.0", * "uniVer": "√", * "unixVer": "√" * }, * "ios": { * "osVer": "12.0", * "uniVer": "√", * "unixVer": "x" * } * }, * "mp": { * "weixin": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "alipay": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "baidu": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "toutiao": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "lark": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "qq": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "kuaishou": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "jd": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * } * }, * "web": { * "uniVer": "√", * "unixVer": "4.0" * } * } */ success?: NavigateBackSuccessCallback | null /** * 接口调用失败的回调函数 * @uniPlatform { * "app": { * "android": { * "osVer": "5.0", * "uniVer": "√", * "unixVer": "√" * }, * "ios": { * "osVer": "12.0", * "uniVer": "√", * "unixVer": "4.11" * } * }, * "mp": { * "weixin": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "alipay": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "baidu": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "toutiao": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "lark": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "qq": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "kuaishou": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "jd": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * } * }, * "web": { * "uniVer": "√", * "unixVer": "4.0" * } * } */ fail?: NavigateBackFailCallback | null /** * 接口调用结束的回调函数(调用成功、失败都会执行) * @uniPlatform { * "app": { * "android": { * "osVer": "5.0", * "uniVer": "√", * "unixVer": "√" * }, * "ios": { * "osVer": "12.0", * "uniVer": "√", * "unixVer": "4.11" * } * }, * "mp": { * "weixin": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "alipay": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "baidu": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "toutiao": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "lark": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "qq": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "kuaishou": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "jd": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * } * }, * "web": { * "uniVer": "√", * "unixVer": "4.0" * } * } */ complete?: NavigateBackCompleteCallback | null } export interface Uni { /** * 保留当前页面,跳转到应用内的某个页面 * * @tutorial http://uniapp.dcloud.io/api/router?id=navigateto * @uniPlatform { * "app": { * "android": { * "osVer": "5.0", * "uniVer": "√", * "unixVer": "√" * }, * "ios": { * "osVer": "12.0", * "uniVer": "√", * "unixVer": "4.11" * } * }, * "mp": { * "weixin": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "alipay": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "baidu": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "toutiao": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "lark": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "qq": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "kuaishou": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "jd": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * } * }, * "web": { * "uniVer": "√", * "unixVer": "4.0" * } * } */ navigateTo(options: NavigateToOptions): Promise | null /** * 关闭当前页面,跳转到应用内的某个页面 * * @tutorial http://uniapp.dcloud.io/api/router?id=redirectto * @uniPlatform { * "app": { * "android": { * "osVer": "5.0", * "uniVer": "√", * "unixVer": "√" * }, * "ios": { * "osVer": "12.0", * "uniVer": "√", * "unixVer": "4.11" * } * }, * "mp": { * "weixin": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "alipay": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "baidu": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "toutiao": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "lark": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "qq": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "kuaishou": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "jd": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * } * }, * "web": { * "uniVer": "√", * "unixVer": "4.0" * } * } */ redirectTo(options: RedirectToOptions): Promise | null /** * 关闭所有页面,打开到应用内的某个页面 * * @tutorial http://uniapp.dcloud.io/api/router?id=relaunch * @uniPlatform { * "app": { * "android": { * "osVer": "5.0", * "uniVer": "√", * "unixVer": "√" * }, * "ios": { * "osVer": "12.0", * "uniVer": "√", * "unixVer": "4.11" * } * }, * "mp": { * "weixin": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "alipay": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "baidu": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "toutiao": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "lark": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "qq": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "kuaishou": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "jd": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * } * }, * "web": { * "uniVer": "√", * "unixVer": "4.0" * } * } */ reLaunch(options: ReLaunchOptions): Promise | null /** * 跳转到 tabBar 页面,并关闭其他所有非 tabBar 页面 * * @tutorial http://uniapp.dcloud.io/api/router?id=switchtab * @uniPlatform { * "app": { * "android": { * "osVer": "5.0", * "uniVer": "√", * "unixVer": "√" * }, * "ios": { * "osVer": "12.0", * "uniVer": "√", * "unixVer": "4.11" * } * }, * "mp": { * "weixin": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "alipay": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "baidu": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "toutiao": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "lark": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "qq": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "kuaishou": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "jd": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * } * }, * "web": { * "uniVer": "√", * "unixVer": "4.0" * } * } */ switchTab(options: SwitchTabOptions): Promise | null /** * 关闭当前页面,返回上一页面或多级页面 * * @tutorial http://uniapp.dcloud.io/api/router?id=navigateback * @uniPlatform { * "app": { * "android": { * "osVer": "5.0", * "uniVer": "√", * "unixVer": "√" * }, * "ios": { * "osVer": "12.0", * "uniVer": "√", * "unixVer": "4.11" * } * }, * "mp": { * "weixin": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "alipay": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "baidu": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "toutiao": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "lark": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "qq": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "kuaishou": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * }, * "jd": { * "hostVer": "√", * "uniVer": "√", * "unixVer": "x" * } * }, * "web": { * "uniVer": "√", * "unixVer": "4.0" * } * } */ navigateBack( options?: NavigateBackOptions | null, ): Promise | null }