We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
标签(空格分隔): JSBridge
callback定义:
{ "status": 0, "message": "xxx", "data": {}, }
Error Code 定义
待定...
JF.passport_login({string phoneNum,string backURL});
phoneNum 可以为空,用户的注册手机号 backURL 登录成功后的返回页面
JF.passport_register({string phoneNum,string backURL});
JF.passport_invite( Callback callback);
JF.navigator_setTitle(String title, Callback callback);
title 要设置的标题 callback 设置成功后的回调
JF.navigator_setBanner(String json, Callback callback);
json格式:
{ "images": "http://share.png", "link": "http://sss/sd.html" ... }
JF.navigator_setAction(String json, Callback callback);
[ { "icon": "http://share.png | share", // 导航栏右边添加图标,url或者local icon name(可约定默认本地图标名称) "title": "分享", // 或者在更多中显示的名称 "actionName": "share" // JS调用的方法名 }, { "icon": "http://share.png | share.png", // 导航栏右边添加图标,url或者local icon name(可约定默认本地图标名称) "title": "分享", // 或者在更多中显示的名称 "actionName": "share" // JS调用的方法名 } ]
JF.navigator_removeAction(Callback callback);
JF.navigator_setShareInfo(string json)
json:
{ title:'', //分享标题 desc:'', //分享描述 icon:'' //分享的小图片, link:'' //分享后的连接地址 }
JF.navigator_closeWindow();
JF.navigator_openURL(String URL);
显示原生的提示框
JF.window_confirm(String json, Callback callback);
{ "title": "提示", "message": "确定删除", "yes": "确定", "no": "取消" }
callback:
{ "status":0, "message":'', "data": 1 //1 确认, 0 取消 }
JF.window_toast(String json, Callback callback);
{ "message": "xxxx", // 消息内容 "duration": "2000", // 持续2秒 }
JF.window_loading(String json, Callback callback);
{ "action": "show" or "hide", // 显示或隐藏 "title": "loading...", // 显示的标题 "masked": true or false // 是有全屏遮罩,默认为true }
JF.window_share(string json,callback)
显示分享弹窗
{ title:'', //分享标题 desc:'', //分享描述 icon:'' //分享的小图片, link:'' //分享的连接 }
JF.device_info(Callback callback);
{ "status": "message": "data": { "device_id": "00000000", // "bundle_id": 程序包ID ... } }
JF.device_captureAudio(Callback callback);
{ "status": "message": "data": {"filePath": "xxxxx"} }
JF.device_captureImage(String json, Callback callback)
{ "type": "jpg", // }
JF.device_captureVideo(String json, Callback callback);
{ "type": "mp4", // }
JF.device_network(Callback callback);
{ "status": "message": "data": {"status" : "WIFI"} }
网络连接情况。
JF.parment_order(string orderId,Callback callback)
orderId 生成的订单id
JF.parment_buy(string json,Callback callback)
json:
{ type:1, product_id:xxxx, .... }
JF.parment_gobuy()
跳转到原生APP的商品分类或列表页
The text was updated successfully, but these errors were encountered:
No branches or pull requests
P2P 类 JSBridge 开发接口文档
标签(空格分隔): JSBridge
约定
callback定义:
Error Code 定义
待定...
passport
用户登录
phoneNum 可以为空,用户的注册手机号
backURL 登录成功后的返回页面
用户注册
phoneNum 可以为空,用户的注册手机号
backURL 登录成功后的返回页面
邀请好友
导航 navigator
设置顶部标题
title 要设置的标题
callback 设置成功后的回调
设置广告位
json格式:
设置导航栏右侧按钮关联动作。
json格式:
移除导航栏右侧按钮关联动作
设置页面的分享信息
json:
关闭当前窗口
打开外部浏览器
弹窗 window
显示原生的提示框
确认框 confirm
json格式:
callback:
显示提示框 toast
json格式:
显示或隐藏正在加载提示框 loading
json格式:
分享 share
显示分享弹窗
json:
设备相关 device
获取设备信息 info
callback:
捕获音频 captureAudio
callback:
捕获图片 captureImage
json格式:
callback:
捕获视屏captureVideo
json格式:
callback:
获取网络连接情况 network
callback:
网络连接情况。
支付 parment
立即支付
orderId 生成的订单id
购买产品
json:
去投资
跳转到原生APP的商品分类或列表页
The text was updated successfully, but these errors were encountered: