瀏覽代碼

极光推送

master
huangjiajun 5 天之前
父節點
當前提交
ee85ee3b2b
共有 2 個文件被更改,包括 3 次插入2 次删除
  1. +1
    -1
      jPush/push.go
  2. +2
    -1
      jPush/sdk/push_request.go

+ 1
- 1
jPush/push.go 查看文件

@@ -34,7 +34,7 @@ func PushAllUser(key, secret, title, content string, platform string, extras map
}
func getMsg(title, content string, platform string, audience interface{}, extras map[string]interface{}) *jpush.PushRequest {
req := &jpush.PushRequest{
Platform: jpush.Platform(platform),
Platform: platform,
Audience: audience,
Notification: &jpush.PushNotification{
Alert: content,


+ 2
- 1
jPush/sdk/push_request.go 查看文件

@@ -5,6 +5,7 @@ import "encoding/json"
type Platform string

const (
All Platform = "all"
PlatformAndroid Platform = "android"
PlatformIOS Platform = "ios"
PlatformWinPhone Platform = "winphone"
@@ -85,7 +86,7 @@ type PushOptions struct {

type PushRequest struct {
Cid string `json:"cid,omitempty"`
Platform Platform `json:"platform"`
Platform string `json:"platform"`
Audience interface{} `json:"audience,omitempty"`
Notification *PushNotification `json:"notification,omitempty"`
Message *PushMessage `json:"message,omitempty"`


Loading…
取消
儲存