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