open-bridge-client
v1.0.6
Published
Produce universal library with webpack and es6
Downloads
6
Maintainers
Readme
使用方法
bridge.call(name, params, cb);
name: 方法名 params: 参数 cb: 回调
SDK目前可调用的服务
服务名 | 参数 | 说明 | 类型 | 默认值 | 备注 ----- | -----|-----|-----|----- | --- open.api.request | cfg | 调用开放平台的API,内部包含5个参数{version, namespace, name, appkey, data} | Object | 无 | 5个参数对应开放平台API的参数
例子:
bridge.call('open.api.request', {
version: '1',
namespace: 'cn.alibaba.open',
name: 'offer.get',
data: {
offerId: "asdfasd",
returnFields: ["offerId", "price"]
}
}, (res) => {
console.log(res);
});