以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  [求助]请教下,获取时效价格的API怎么写?  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=129543)

--  作者:zto001
--  发布时间:2018/12/31 0:20:00
--  [求助]请教下,获取时效价格的API怎么写?
API文档
基础信息下

获取时效价格


的代码应该怎么写?



合作商编码(company_id):   a27daa5603d342bd8021c90a8c497d7f
合作商名称:                       zto73125
合作商签名key:                  dc3f587db1e1
是否BASE64:                     Y

--  作者:zto001
--  发布时间:2019/1/2 9:56:00
--  
请教请教
--  作者:有点甜
--  发布时间:2019/1/2 11:30:00
--  

请自行参考帮助文档替换值获取

 

http://www.foxtable.com/bbs/dispbbs.asp?BoardID=2&ID=129409&skin=0

 


--  作者:有点甜
--  发布时间:2019/1/2 11:33:00
--  
Dim properties As new zopsdk.ZopProperties("a27daa5603d342bd8021c90a8c497d7f","dc3f587db1e1")
Dim client As new zopsdk.ZopClient(properties)
Dim request As new zopsdk.ZopRequest()
request.url = "http://japi.zto.cn/priceAndHourInterfaceGetHourPrice"
request.addParam("company_id", "a27daa5603d342bd8021c90a8c497d7f")
request.addParam("msg_type", "GET_HOUR_PRICE")
request.addParam("data", "{""dispCity"":""无锡市"",""dispProv"":""江苏"",""sendCity"":""杭州市"",""sendProv"":""浙江""}")
Dim str = client.execute(request)
msgbox(str)
Dim jo As JObject = JObject.Parse(str)

--  作者:zto001
--  发布时间:2019/1/2 13:31:00
--  
Dim properties As new zopsdk.ZopProperties("替换值","替换值")
Dim client As new zopsdk.ZopClient(properties)
Dim request As new zopsdk.ZopRequest()
request.url = "替换值"
request.addParam("company_id", "替换值")
request.addParam("msg_type", "类型替换值")
request.addParam("data", "{""dispCity"":""无锡市"",""dispProv"":""江苏"",""sendCity"":""杭州市"",""sendProv"":""浙江""}"data替换值)
Dim str = client.execute(request)
msgbox(str)
Dim jo As JObject = JObject.Parse(str)

就是这个API都是这么写,只是这几个替换值不一样是吧

--  作者:有点甜
--  发布时间:2019/1/2 15:10:00
--  

 

认认真真看之前的几个例子。然后看具体的帮助文档。把代码替换成你帮助文档那里的对一个的值,即可。

 

 


--  作者:zto001
--  发布时间:2019/1/3 0:15:00
--  
Dim properties As new zopsdk.ZopProperties("a27daa5603d342bd8021c90a8c497d7f","dc3f587db1e1")
Dim client As new zopsdk.ZopClient(properties)
Dim request As new zopsdk.ZopRequest()
request.url = "http://japi.zto.cn/priceAndHourInterfaceGetHourPrice"
request.addParam("company_id", "a27daa5603d342bd8021c90a8c497d7f")
request.addParam("msg_type", "GET_HOUR_PRICE")
request.addParam("data", "{""dispCity"":""无锡市"",""dispProv"":""江苏"",""sendCity"":""杭州市"",""sendProv"":""浙江""}")
Dim str = client.execute(request)
msgbox(str)
Dim jo As JObject = JObject.Parse(str)
msgbox("时效:" & jo("data")("hour").tostring )
msgbox("首重:" & jo("data")("firstMoney").tostring )
msgbox("续重:" & jo("data")("addMoney").tostring )






--  作者:有点甜
--  发布时间:2019/1/3 9:05:00
--  
请问现在有什么问题?