优化短信发送逻辑,支持可选业务类型参数

This commit is contained in:
renzhiyuan 2025-04-08 11:14:56 +08:00
parent 761b8371d8
commit 9bd21cf288
1 changed files with 2 additions and 2 deletions

4
msg.go
View File

@ -24,8 +24,8 @@ func NewMessageCenter(host, clientKey, clientSecret, serverIndex, tempIndex stri
},
}
msg.header = map[string]string{"content-type": "application/json; charset=utf-8"}
accessToken, err := msg.getAccessToken()
msg.header = map[string]string{"Authorization": accessToken, "content-type": "application/json; charset=utf-8"}
token, err := msg.getAccessToken()
msg.header = map[string]string{"Authorization": token, "content-type": "application/json; charset=utf-8"}
return msg, err
}