补充:
布尔类型的参数需要传递string类型,比如true需要写成'true'
淘宝开放平台(Taobao Open Platform,简称TOP)提供了丰富的API,开发者可以方便通过QAP调用TOP API。
QN.top.invoke({ query: { method: 'taobao.user.seller.get', // TOP 接口名称 fields: 'nick,sex' // 除了`method`字段外,其他字段为请求的业务参数 } }).then(result => { Modal.alert(result); }, error => { Modal.alert(error); });
QN.top.batch({ query: [ { method: 'taobao.user.seller.get', // TOP 接口名称 fields: 'nick,sex' // 除了`method`字段外,其他字段为请求的业务参数 }, { method: 'taobao.time.get' } ] }).then(result => { console.log(result[0]); // `taobao.user.seller.get` 的返回结果 console.log(result[1]); // `taobao.time.get` 的返回结果 }, error => { console.log(error); });