Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
修改微信报警传递的参数由text修改为msg
  • Loading branch information
chanyipiaomiao committed Mar 23, 2018
2 parents 850ac54 + 20645cb commit e76f749
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ msgType: text 消息类型,目前只支持文本消息
toTag: 标签ID 在企业微信后台可以查看到
toUser: 用户ID 在企业微信后台可以查看到
toParty: 部门ID 在企业微信后台可以查看到
text要发送的文本消息
msg 要发送的消息
```

[返回到目录](#目录)
Expand Down
4 changes: 2 additions & 2 deletions common/weixin.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var (
)

// SendWeixinMessage 发送消息
func SendWeixinMessage(msgType, text, toTag, toUser, toParty string) (bool, error) {
func SendWeixinMessage(msgType, msg, toTag, toUser, toParty string) (bool, error) {
agentID, err := beego.AppConfig.Int64("weixin::warningAppAgentID")
if err != nil {
return false, fmt.Errorf("get agentID from app.conf error: %s ", err)
Expand All @@ -29,7 +29,7 @@ func SendWeixinMessage(msgType, text, toTag, toUser, toParty string) (bool, erro
AgentID: agentID, // 企业应用的id,整型。可在应用的设置页面查看
Safe: 0, // 表示是否是保密消息,0表示否,1表示是,默认0
Text: &weixin.Text{
Content: text,
Content: msg,
},
}

Expand Down

0 comments on commit e76f749

Please sign in to comment.