callNative方法实现&调用方法&跳转类型
/**
* callNative 重载
*/
/** 显示 webview 的页面的标题 */
export function callNative(
jumpMethod: JumpMethod.SHOWTITLE,
jumpConfig: { title: string }
): Promise<any>;
/** 使用客户端打开一个网页,在当前网页,不重新打开一个 webview 窗口 */
export function callNative(
jumpMethod: JumpMethod.OPENH5URL,
jumpConfig: { url: string }
): Promise<any>;
/** 委托客户端使用加密方式请求服务端,并把结果返回给 H5 */
export function callNative(
jumpMethod: JumpMethod.ENCODECALLURLSYNC,
jumpConfig: { appMethod: "get" | "post"; url: string }
): Promise<any>;
/** 使用客户端输出网页 log */
export function callNative(
jumpMethod: JumpMethod.SHOWH5LOG,
jumpConfig: { url: string }
): Promise<any>;
/** 获取当前网络状态,传入的参数如下,返回网络状态字符串:NONE, WIFI, 2G, 3G, 4G, 5G */
export function callNative(jumpMethod: JumpMethod.GETNETSTATUS): Promise<any>;
/** 显示网络错误页面 */
export function callNative(jumpMethod: JumpMethod.SHOWNETERRORUI): Promise<any>;
/** 显示 webview 的页面的小标题 */
export function callNative(
jumpMethod: JumpMethod.SHOWSUBTITLE,
jumpConfig: { title: string }
): Promise<any>;
/** 通过客户端跳转一个页面,可以跳转到客户端指定的页面,如:坦克详情页、普通 webview 页面、战斗周报页面 */
export function callNative(
jumpMethod: JumpMethod.JUMPTOUI,
jumpConfig: { jump_type: JumpType; jump_data: string }
): Promise<any>;
/** 通过客户端跳转分享 */
export function callNative(
jumpMethod: JumpMethod.JUMPTOSHARE,
jumpConfig: IJumpToShareScreenShotConfig | IJumpToShareImageConfig | IJumpToShareLinkConfig
): Promise<any>;
/** 通过客户端修改排行榜筛选页面顶部状态栏以及title栏的背景色值 */
export function callNative(
jumpMethod: JumpMethod.JUMPTORANKFILTER,
jumpConfig: { startColor: string; endColor: string }
): Promise<any>;
/** 获取当前登录用户登录平台 */
export function callNative(jumpMethod: JumpMethod.GETCURUSERPLAT): Promise<any>;
/** 调起当前登录页面 */
export function callNative(jumpMethod: JumpMethod.JUMPTOLOGIN): Promise<any>;
/** 获取当前 app 版本信息 */
export function callNative(jumpMethod: JumpMethod.GETCURVERSION): Promise<any>;
/** 修改 webview 的顶部 title 栏相关的 style */
export function callNative(
jumpMethod: JumpMethod.TITLEBARSTYLEMOTIFY,
jumpConfig: ITitleBarStyle
): Promise<any>;
/** 预览大图 */
export function callNative(
jumpMethod: JumpMethod.JUMPIMAGEBROWSEPAGE,
jumpConfig: { imageUrls: string; position: string }
): Promise<any>;
/** 图片保存到本地 */
export function callNative(
jumpMethod: JumpMethod.SAVEIMAGETOGALLERY,
jumpConfig: { imagesUrl: string }
): Promise<any>;
/** 关闭页面 */
export function callNative(jumpMethod: JumpMethod.FINISHWEB): Promise<any>;
/** 调起 APP 输入框(资讯类) */
export function callNative(
jumpMethod: JumpMethod.OPENINPUTVIEW,
jumpConfig: { placeholder: string; min: number; max: number }
): Promise<any>;
/** 调起 APP 输入框(论坛) */
export function callNative(
jumpMethod: JumpMethod.OPENINPUTVIEWFORUM,
jumpConfig: { placeholder: string; min: number; max: number; permission: "threadReply" }
): Promise<any>;
/** 调起发帖编辑器(论坛) */
export function callNative(
jumpMethod: JumpMethod.OPENEDITORFORUM,
jumpConfig: {
classify?: string;
name?: string;
id?: string;
permission: "createThread";
}
): Promise<any>;
/** 获取社区绑定后的token,请求社区相关接口使用 */
export function callNative(jumpMethod: JumpMethod.GETCOMMUNITYTOKEN): Promise<any>;
/** 编辑头像 */
export function callNative(jumpMethod: JumpMethod.EDITAVATARFORUM): Promise<any>;
/** 振动 */
export function callNative(jumpMethod: JumpMethod.VIBRATE, jumpConfig?: IVibrate): Promise<any>;
/** 获取系统信息 */
export function callNative(jumpMethod: JumpMethod.GETDEVICECONFIGURE): Promise<any>;
/** 调起选择菜单 */
export function callNative(
jumpMethod: JumpMethod.OPENSELECT,
jumpConfig: { selectList: ISelectItem[];[key: string]: any }
): Promise<any>;
/** 调起模态框 */
export function callNative(
jumpMethod: JumpMethod.OPENMODAL,
jumpConfig: { title: string; subTitle: string; btnList: IModalBtn[] }
): Promise<any>;
/** 打开视频播放页 */
export function callNative(
jumpMethod: JumpMethod.VIDEOPLAYER,
jumpConfig: { video_url: string; cover_url: string; title: string }
): Promise<any>;
/** 广播消息到其他 webview */
export function callNative(
jumpMethod: JumpMethod.PUSHMESSAGE,
jumpConfig: { [key: string]: string | number | object }
): Promise<any>;
/** 获取APP当前登录的用户信息 */
export function callNative(jumpMethod: JumpMethod.GETAPPUSERINFO): Promise<any>;
/** 调起弹层 */
export function callNative(
jumpMethod: JumpMethod.FULLDIALOG,
jumpConfig: { url?: string; status: boolean }
): Promise<any>;
/** 旋转屏幕 */
export function callNative(
jumpMethod: JumpMethod.SETREQUESTEDORIENTATION,
jumpConfig: { set: IOrientation }
): Promise<any>;
/** 调起录音 */
export function callNative(
jumpMethod: JumpMethod.CLIENTRECORD,
jumpConfig: IClientRecord
): Promise<any>;
/** 调起相册 */
export function callNative(
jumpMethod: JumpMethod.SELECTALBUM,
jumpConfig: ISelectAlbum
): Promise<any>;
/** 获取定位信息:经纬度、精度、速度 */
export function callNative(jumpMethod: JumpMethod.GEOLOCATION): Promise<any>;"cmsdetail"; //资讯详情 url webview固定有分享
"insidelink"; //坦克详情 tankid 非webview
"weblink"; //链接 url webview 固定无分享,需要调用js接口
"weeklylink"; //周报 url webview固定有分享
"rankfilterlink"; //排行榜筛选页 url webview固定有分
Last updated