...
|
...
|
@@ -30,16 +30,19 @@ type MessageExt struct { |
|
|
}
|
|
|
|
|
|
// PushInfo 个推
|
|
|
func (serviceGateway *HttplibMmmOpenApiServiceGateway) PushInfo(msgType int, projects []string, uids []int64, title string, content string) (map[string]interface{}, error) {
|
|
|
func (serviceGateway *HttplibMmmOpenApiServiceGateway) PushInfo(msgType int, project string, uids []int64, title string, content string) (map[string]interface{}, error) {
|
|
|
url := strings.Join([]string{serviceGateway.baseURL, "v1", "push", "pushInfo"}, "/")
|
|
|
serviceGateway.CreateRequest("post", url)
|
|
|
options := &MessageOptions{
|
|
|
MmmType: msgType,
|
|
|
Projects: projects,
|
|
|
Project: project,
|
|
|
Receivers: uids,
|
|
|
Title: title,
|
|
|
Content: content,
|
|
|
}
|
|
|
options.Ext.TransData.MmmType = "103" //固定值,需要手机端配合设置
|
|
|
options.Ext.TransData.MmmTitle = title
|
|
|
options.Ext.TransData.MmmContent = content
|
|
|
serviceGateway.SetBody(options)
|
|
|
response := make(map[string]interface{})
|
|
|
err := serviceGateway.ToJson(&response)
|
...
|
...
|
|