test(work): 适配新的接口模型

This commit is contained in:
Fu Diwei 2021-08-20 00:29:41 +08:00
parent 1f484b70dd
commit 86147075b3
8 changed files with 325 additions and 17 deletions

View File

@ -0,0 +1,28 @@
<xml>
<ToUserName><![CDATA[toUser]]></ToUserName>
<FromUserName><![CDATA[FromUser]]></FromUserName>
<CreateTime>123456789</CreateTime>
<MsgType><![CDATA[event]]></MsgType>
<Event><![CDATA[template_card_event]]></Event>
<EventKey><![CDATA[key111]]></EventKey>
<TaskId><![CDATA[taskid111]]></TaskId>
<CardType><![CDATA[text_notice]]></CardType>
<ResponseCode><![CDATA[ResponseCode]]></ResponseCode>
<AgentID>1</AgentID>
<SelectedItems>
<SelectedItem>
<QuestionKey><![CDATA[QuestionKey1]]></QuestionKey>
<OpitonIds>
<OpitonId><![CDATA[OpitonId1]]></OpitonId>
<OpitonId><![CDATA[OpitonId2]]></OpitonId>
</OpitonIds>
</SelectedItem>
<SelectedItem>
<QuestionKey><![CDATA[QuestionKey2]]></QuestionKey>
<OpitonIds>
<OpitonId><![CDATA[OpitonId3]]></OpitonId>
<OpitonId><![CDATA[OpitonId4]]></OpitonId>
</OpitonIds>
</SelectedItem>
</SelectedItems>
</xml>

View File

@ -0,0 +1,9 @@
<xml>
<ToUserName><![CDATA[toUser]]></ToUserName>
<FromUserName><![CDATA[fromUser]]></FromUserName>
<CreateTime>1357290913</CreateTime>
<MsgType><![CDATA[update_button]]></MsgType>
<Button>
<ReplaceName><![CDATA[ReplaceName]]></ReplaceName>
</Button>
</xml>

View File

@ -0,0 +1,3 @@
{
"msgid": "vcT8gGc-7dFb4bxT35ONjBDz901sLlXPZw1DAMC_Gc26qRpK-AK5sTJkkb0128t"
}

View File

@ -0,0 +1,4 @@
{
"errcode": 0,
"errmsg": "ok"
}

View File

@ -33,7 +33,9 @@
"title": "中秋节礼品领取",
"description": "今年中秋节公司有豪礼相送",
"url": "URL",
"picurl": "http://res.mail.qq.com/node/ww/wwopenmng/images/independent/doc/test_pic_msg1.png"
"picurl": "http://res.mail.qq.com/node/ww/wwopenmng/images/independent/doc/test_pic_msg1.png",
"appid": "wx123123123123123",
"pagepath": "pages/index?userid=zhangsan&orderid=123123123"
}
]
},
@ -96,23 +98,133 @@
]
},
"selected_ticket_list": [ "xxx", "yyy" ],
"template_msg": {
"template_id": "ttxxlGlgIAwJrCTFjtndfgHPoIySyk6w",
"url": "http://www.qq.com",
"content_item": [
"template_card": {
"card_type": "text_notice",
"source": {
"icon_url": "图片的url",
"desc": "企业微信"
},
"card_image": {
"url": "图片的url",
"aspect_ratio": 1.3
},
"main_title": {
"title": "欢迎使用企业微信",
"desc": "您的好友正在邀请您加入企业微信"
},
"emphasis_content": {
"title": "100",
"desc": "核心数据"
},
"sub_title_text": "下载企业微信还能抢红包!",
"vertical_content_list": [
{
"key": "会议室",
"value": "402"
},
{
"key": "会议地点",
"value": "广州TIT-402会议室"
},
{
"key": "会议时间",
"value": "2018年8月1日 09:00-09:30"
"title": "惊喜红包等你来拿",
"desc": "下载企业微信还能抢红包!"
}
]
],
"horizontal_content_list": [
{
"keyname": "邀请人",
"value": "张三"
},
{
"type": 1,
"keyname": "企业微信官网",
"value": "点击访问",
"url": "https://work.weixin.qq.com"
},
{
"type": 2,
"keyname": "企业微信下载",
"value": "企业微信.apk",
"media_id": "文件的media_id"
}
],
"jump_list": [
{
"type": 1,
"title": "企业微信官网",
"url": "https://work.weixin.qq.com"
},
{
"type": 2,
"title": "跳转小程序",
"appid": "小程序的appid",
"pagepath": "/index.html"
}
],
"card_action": {
"type": 2,
"url": "https://work.weixin.qq.com",
"appid": "小程序的appid",
"pagepath": "/index.html"
},
"task_id": "task_id",
"button_list": [
{
"text": "按钮1",
"style": 1,
"key": "button_key_1"
},
{
"text": "按钮2",
"style": 2,
"key": "button_key_2"
}
],
"checkbox": {
"question_key": "question_key1",
"option_list": [
{
"id": "option_id1",
"text": "选择题选项1",
"is_checked": true
},
{
"id": "option_id2",
"text": "选择题选项2",
"is_checked": false
}
],
"mode": 1
},
"select_list": [
{
"question_key": "question_key1",
"title": "选择器标签1",
"selected_id": "selection_id1",
"option_list": [
{
"id": "selection_id1",
"text": "选择器选项1"
},
{
"id": "selection_id2",
"text": "选择器选项2"
}
]
},
{
"question_key": "question_key2",
"title": "选择器标签2",
"selected_id": "selection_id3",
"option_list": [
{
"id": "selection_id3",
"text": "选择器选项3"
},
{
"id": "selection_id4",
"text": "选择器选项4"
}
]
}
],
"submit_button": {
"text": "提交",
"key": "key"
}
},
"safe": 0,
"enable_id_trans": 0,

View File

@ -3,5 +3,7 @@
"errmsg": "ok",
"invaliduser": "userid1|userid2",
"invalidparty": "1|2",
"invalidtag": "3|4"
"invalidtag": "3|4",
"msgid": "xxxx",
"response_code": "xyzxyz"
}

View File

@ -0,0 +1,145 @@
{
"userids": [ "userid1", "userid2" ],
"partyids": [ 2, 3 ],
"tagids": [ 44, 55 ],
"atall": 0,
"agentid": 1,
"response_code": "response_code",
"original_task_id": "original_task_id",
"button": {
"task_id": "taskid",
"replace_name": "replace_name"
},
"template_card": {
"card_type": "text_notice",
"source": {
"icon_url": "图片的url",
"desc": "企业微信"
},
"card_image": {
"url": "图片的url",
"aspect_ratio": 1.3
},
"main_title": {
"title": "欢迎使用企业微信",
"desc": "您的好友正在邀请您加入企业微信"
},
"vertical_content_list": [
{
"title": "惊喜红包等你来拿",
"desc": "下载企业微信还能抢红包!"
}
],
"emphasis_content": {
"title": "100",
"desc": "核心数据"
},
"sub_title_text": "下载企业微信还能抢红包!",
"horizontal_content_list": [
{
"keyname": "邀请人",
"value": "张三"
},
{
"type": 1,
"keyname": "企业微信官网",
"value": "点击访问",
"url": "https://work.weixin.qq.com"
},
{
"type": 2,
"keyname": "企业微信下载",
"value": "企业微信.apk",
"media_id": "文件的media_id"
}
],
"jump_list": [
{
"type": 1,
"title": "企业微信官网",
"url": "https://work.weixin.qq.com"
},
{
"type": 2,
"title": "跳转小程序",
"appid": "小程序的appid",
"pagepath": "/index.html"
}
],
"card_action": {
"type": 2,
"url": "https://work.weixin.qq.com",
"appid": "小程序的appid",
"pagepath": "/index.html"
},
"button_list": [
{
"text": "按钮1",
"style": 1,
"key": "button_key_1"
},
{
"text": "按钮2",
"style": 2,
"key": "button_key_2"
}
],
"checkbox": {
"question_key": "question_key1",
"option_list": [
{
"id": "option_id1",
"disable": false,
"text": "选择题选项1",
"is_checked": true
},
{
"id": "option_id2",
"text": "选择题选项2",
"is_checked": false
}
],
"disable": false,
"mode": 1
},
"select_list": [
{
"question_key": "question_key1",
"title": "选择器标签1",
"selected_id": "selection_id1",
"disable": false,
"option_list": [
{
"id": "selection_id1",
"text": "选择器选项1"
},
{
"id": "selection_id2",
"text": "选择器选项2"
}
]
},
{
"question_key": "question_key2",
"title": "选择器标签2",
"selected_id": "selection_id3",
"disable": false,
"option_list": [
{
"id": "selection_id3",
"text": "选择器选项3"
},
{
"id": "selection_id4",
"text": "选择器选项4"
}
]
}
],
"submit_button": {
"text": "提交",
"key": "key"
},
"replace_text": "已提交"
}
}

View File

@ -0,0 +1,5 @@
{
"errcode": 0,
"errmsg": "ok",
"invaliduser": [ "userid1", "userid2" ]
}