From c88a9a075b235de37c8e7b7545640be7d4cdcb32 Mon Sep 17 00:00:00 2001 From: jinfengli Date: Fri, 27 May 2022 17:54:25 +0800 Subject: [PATCH] 添加分享记录接口 --- officialserver/互动小说小程序文档.md | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git "a/officialserver/\344\272\222\345\212\250\345\260\217\350\257\264\345\260\217\347\250\213\345\272\217\346\226\207\346\241\243.md" "b/officialserver/\344\272\222\345\212\250\345\260\217\350\257\264\345\260\217\347\250\213\345\272\217\346\226\207\346\241\243.md" index d0b4326..d7d6d6c 100644 --- "a/officialserver/\344\272\222\345\212\250\345\260\217\350\257\264\345\260\217\347\250\213\345\272\217\346\226\207\346\241\243.md" +++ "b/officialserver/\344\272\222\345\212\250\345\260\217\350\257\264\345\260\217\347\250\213\345\272\217\346\226\207\346\241\243.md" @@ -24,7 +24,6 @@ Headers: | key | value | | :----------- | :------------: | -| Content-Type | application/json;charset=utf-8 | | App-Channel-Id | 渠道ID | | Timestamp | 时间戳 | | Authorization | Secret:Timestamp md5摘要之后的串 | @@ -45,3 +44,58 @@ payload中包含的参数: | Key | Describe | | :----------- | :------------: | | openId | 用户id | + + +#### 记录微信分享 + +URL: {基本地址}/wechat/mini/program/interactnovel/record + +METHOD: POST + +Headers: + +| key | value | +| :----------- | :------------: | +| App-Channel-Id | 渠道ID | +| Timestamp | 时间戳 | +| Authorization | Secret:Timestamp md5摘要之后的串 | + + +RequestBody: + +``` +aesjson加密串 +``` + +RequestBody解密: + +``` +{ + "wxOpenId":"112", // 分享者ID + "sharedWxOpenId":"334" // 被分享者的ID +} +``` + + + +ResponseBody: + +```json +{ + "status": 200, + "message":"提示信息", + "retcode": 0, // 0:表示成功,其他表示失败 + "payload": "", // aes加密json之后的串 +} +``` + +Example: + +``` +curl --location --request POST 'https://hw-gz26.heyqiwu.cn/api/officalserver/wechat/mini/program/interactnovel/record' \ +--header 'App-Channel-Id: weixinxiaochengxu-phone-sdk-pro' \ +--header 'Timestamp: 1653645183044' \ +--header 'Authorization: 23d6884659e8899cb4f906c816ecc6b4' \ +--header 'Content-Type: text/plain' \ +--data-raw 'g4rSkgDpp83Bi2LIywNeYGK8ihhVX+eCnKNXayFLO8nseaXU05baPfsmVCZeXzgC' +``` -- libgit2 0.27.1