Skip to content

Commit

Permalink
fixbugs
Browse files Browse the repository at this point in the history
  • Loading branch information
blusewang committed Aug 17, 2021
1 parent 3647140 commit 3edca98
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions mp_api/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"strings"
)

// 消息通知`query`数据
// MessageQuery 消息通知`query`数据
type MessageQuery struct {
Signature string `param:"signature" binding:"required"`
Timestamp string `param:"timestamp" binding:"required"`
Expand All @@ -24,7 +24,7 @@ type MessageQuery struct {
MsgSignature string `param:"msg_signature"`
}

// 安全验证
// Validate 安全验证
func (mq MessageQuery) Validate(PrivateToken string) (err error) {
arr := []string{PrivateToken, mq.Timestamp, mq.Nonce}
sort.Strings(arr)
Expand All @@ -37,7 +37,7 @@ func (mq MessageQuery) Validate(PrivateToken string) (err error) {
return
}

// 公众号消息
// MessageData 公众号消息
type MessageData struct {
ToUserName string `xml:"ToUserName" json:"to_user_name,omitempty"`
Encrypt string `xml:"Encrypt" json:"encrypt,omitempty"`
Expand Down
8 changes: 4 additions & 4 deletions mp_api/mini_program.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
package mp_api

type MiniProgramJsCode2SessionQuery struct {
AppId string `json:"appid"`
Secret string `json:"secret"`
JsCode string `json:"js_code"`
GrantType string `json:"grant_type"`
AppId string `url:"appid"`
Secret string `url:"secret"`
JsCode string `url:"js_code"`
GrantType string `url:"grant_type"`
}

type MiniProgramJsCode2SessionRes struct {
Expand Down

0 comments on commit 3edca98

Please sign in to comment.