Skip to content

Commit bf78565

Browse files
author
盛辉
committed
Update wechat
1 parent 6f189f6 commit bf78565

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

wechat/corp.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -359,8 +359,9 @@ func (c *Corp) VerifyEventMsg(signature string, items ...string) error {
359359
return nil
360360
}
361361

362-
// DecodeEventMsg 事件消息解密,使用包体内的 Encrypt 字段
362+
// DecodeEventMsg 事件消息解密
363363
//
364+
// 使用包体内的 Encrypt 字段
364365
// [参考](https://developer.work.weixin.qq.com/document/path/96211)
365366
func (c *Corp) DecodeEventMsg(encrypt string) ([]byte, error) {
366367
return EventDecrypt(c.corpid, c.srvCfg.aeskey, encrypt)

wechat/miniprogram.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -712,15 +712,18 @@ func (mp *MiniProgram) VerifyEventMsg(signature string, items ...string) error {
712712
return nil
713713
}
714714

715-
// DecodeEventMsg 事件消息解密,使用包体内的 Encrypt 字段
715+
// DecodeEventMsg 事件消息解密
716716
//
717+
// 使用包体内的 Encrypt 字段
718+
// 根据配置的数据格式,解析 XML/JSON
717719
// [参考](https://developers.weixin.qq.com/miniprogram/dev/framework/server-ability/message-push.html)
718720
func (mp *MiniProgram) DecodeEventMsg(encrypt string) ([]byte, error) {
719721
return EventDecrypt(mp.appid, mp.srvCfg.aeskey, encrypt)
720722
}
721723

722724
// EncodeEventReply 事件回复加密
723725
//
726+
// 根据配置的数据格式,输出 XML/JSON
724727
// [参考](https://developers.weixin.qq.com/miniprogram/dev/framework/server-ability/message-push.html)
725728
func (mp *MiniProgram) EncodeEventReply(msg value.V) (value.V, error) {
726729
return EventReply(mp.appid, mp.srvCfg.token, mp.srvCfg.aeskey, msg)

0 commit comments

Comments
 (0)