一次导入100个卡卷可以这样
Dim maxCount As Integer = 100
Dim ja As Jarray
Dim count As Integer = Tables("导入券").Rows.Count
Dim url As String = "https://api.weixin.qq.com/card/code/deposit?access_token={0}"
Dim hc As New HttpClient(CExp(url,Functions.Execute("GetAccessToken")))
Dim jo As New JObject
jo("card_id") = kaid
For i As Integer = 0 To count Step maxCount '按maxCount的数据进行分组
ja = new Jarray
Dim n = Math.Min(i + maxCount - 1,count )
For j As Integer = i To n '添加当前组的项目到集合
ja.Add(Tables("导入券").Rows(j)("券号"))
Tables("导入券").Rows(j)("是否已导入") = 1
Next
jo("code") = ja
hc.Content = jo.ToString()
hc.GetData
Next
至于修改库存接口只能一个个来,只能分开处理,投放完成后再重新循环之前投放的卡卷进行修改了