https://work.weixin.qq.com/api/doc/90000/90135/90236?st=F611A22821CB322214D3C231C1F442FC390FADB82BEF7A0B05040C8DD562E71BCBA0A47451463C0333EAE3B56ADF40E3C99214D509E571772567E1671A98AC75A5B4DA9BC921156745A48E2ED9D1FAD042A927F1F3CBACD264A0D53D485264061F44ACD06398CC4839BBFC846869AC9E0EF74D67A6426803C147296FA37FFF340765E18FC4890A7ED4A2B3B2C0A769AA&vid=1688853087703446&cst=25E484E625FFB0BBDFD77FD95BB43B762EFFFE9D6E5AB2B19EF8B4E896C3F8A38248BF3797137A0608D86BDA2B2BE21C&deviceid=6917ad20-227b-45af-a2e4-3fed6dcfca0f&version=2.8.15.2044&platform=win#%E4%BB%BB%E5%8A%A1%E5%8D%A1%E7%89%87%E6%B6%88%E6%81%AF
参照这个接口文档写的发送任务卡片消息
代码如下:
Dim ur As String = "https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token={0}"
Dim hc As new HttpClient(Cexp(ur,_lianjiema))
Dim jo As New JObject
Dim ja As New JArray
jo("touser") = "LiXiaoChun"
jo("msgtype") = "taskcard"
jo("agentid") = _agentid
jo("taskcard") = New JObject
jo("taskcard")("title") = "物品申请"
jo("taskcard")("description") = "物品申请用途:"
jo("taskcard")("url") ="https://work.weixin.qq.com"
jo("taskcard")("task_id") ="hhfuwhfuib-_@11"
jo("taskcard")("btn")=ja
ja.Add(New JObject) '给数组添加两个对象成员
ja.Add(New JObject)
ja(0)("key") ="key111"
ja(0)("name") ="批准"
ja(0)("replace_name") ="已批准"
ja(0)("color") ="red"
ja(0)("is_bold") =True
ja(1)("key") ="key222"
ja(1)("name") ="驳回"
ja(1)("replace_name") ="已驳回"
hc.Content = jo.ToString
jo = JObject.Parse(hc.GetData)
If jo("errcode") = "0" Then
MessageBox.show("消息发送成功!")
Else
MessageBox.show(jo.ToString)
End If
怎么实现批准 或 驳回点击后进入对应的页面呢?如test1.htm test2.htm
[此贴子已经被作者于2020/7/17 11:53:41编辑过]