--
Tables("库存同步").Filter="同步状态=\'等待同步\'"
For Each tr As Row In Tables("库存同步").Rows
Dim st1 As String = ""
st1 = "https://open.youzan.com/api/oauthentry/youzan.multistore.goods.sku/3.0.0/update?access_token="
st1 = st1 & Vars("access_token")
st1 = st1 & "&offline_id=" & tr("网点ID")
st1 = st1 & "&num_iid=" & tr("商品ID")
st1 = st1 & "&quantity=" & tr("门店库存")
Dim hc1 As New HttpClient(st1)
Dim jo1 As JObject = Jobject.Parse(hc1.GetData)
If jo1("response")("is_success").ToString = "true" Then
Dim st2 As String = ""
st2 = "https://open.youzan.com/api/oauthentry/youzan.multistore.goods.delivery/3.0.0/update?access_token="
st2 = st2 & Vars("access_token")

此主题相关图片如下:微信截图_20170804000658.png

st2 = st2 & "&offline_id=" & tr("网点ID")
Dim hc2 As New HttpClient(st2)
Dim jo2 As JObject = Jobject.Parse(hc2.GetData)
Output.show(st2)
If jo2("response")("is_success").ToString = "true" Then
tr("同步状态") = "成功同步到线上[" & Date.Now & "]"
Else
tr("同步状态") = "同步失败!"
End If
Else
tr("同步状态") = "同步失败!"
End If
Next
[此贴子已经被作者于2017/8/4 0:09:15编辑过]