Skip to content

Commit e76f749

Browse files
Merge branch 'dev'
修改微信报警传递的参数由text修改为msg
2 parents 850ac54 + 20645cb commit e76f749

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ msgType: text 消息类型,目前只支持文本消息
165165
toTag: 标签ID 在企业微信后台可以查看到
166166
toUser: 用户ID 在企业微信后台可以查看到
167167
toParty: 部门ID 在企业微信后台可以查看到
168-
text要发送的文本消息
168+
msg 要发送的消息
169169
```
170170

171171
[返回到目录](#目录)

common/weixin.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var (
1515
)
1616

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

0 commit comments

Comments
 (0)