{
"tradeList": [
{
"warehouse_id": "1201",
"trade_no": "123123123",
"shop_id": "1092",
"tradeTime": "2018-06-12 17:16:48",
"receiver_nick": "ewtw",
"receiver_name": "rhfg",
"receiver_province": "dfh",
"receiver_city": "fhd",
"receiver_town": "hf",
"receiver_address": "fhg",
"receiver_mobile": "fh",
"bInvoice": "0",
"tradeinfo_details": [
{
"goods_id": "152037",
"spec_id": "",
"goods_name": "货品测试2",
"sell_count": "12"
},
{
"goods_id": "152039",
"spec_id": "",
"goods_name": "货品测试22",
"sell_count": "12"
}
]
},
{
"warehouse_id": "1201",
"trade_no": "123123123",
"shop_id": "1092",
"tradeTime": "2018-06-12 17:16:48",
"receiver_nick": "ewtw",
"receiver_name": "rhfg",
"receiver_province": "dfh",
"receiver_city": "fhd",
"receiver_town": "hf",
"receiver_address": "fhg",
"receiver_mobile": "fh",
"bInvoice": "0",
"tradeinfo_details": [
{
"goods_id": "152038",
"spec_id": "",
"goods_name": "货品测试3",
"sell_count": "12"
}
]
}
]
}
对于查询类接口,参"pageno"和"pagesize"如何理解?
-> pageno:页码,pagesize:每页条数,取值范围 1 ~ 100,假设pageno = 1,pagesize = 100,则表示从第一页开始读取数据,每次调取一次查询类接口可获取100条数据,然后pageno加1,则会读取下一页的100条数据,以此类推,直至满足查询条件的数据读取完毕。一般接口不返回总条数,可通过每次获取到的数据条数小于pagesize来判断数据读取完毕。
调接口报错:"参数sign不正确"
-> 报这个错误时,说明已有权限调取接口,不过调取接口时进行的签名验证的sign值不正确,sign的计算包括排序和MD5加密2步,其中排序注意有字典排序(versions=1.0)和ASCII码排序(versions=1.1)2种,开放平台网站上有提供签名校验工具,可以下载工具用来排查排序,签名是否正确。另外计算签名sign的过程中不需要urlencode,只是最终签名计算完毕发送post请求的时候url里的所有参数值需做urlencode编码(当字符串数据以URL的形式传递给web服务器时,字符串中是不允许出现空格和特殊字符的,所以传输之前需要进行urlencode编码)。