Kaynağa Gözat

极光推送

master
huangjiajun 3 gün önce
ebeveyn
işleme
ee85ee3b2b
2 değiştirilmiş dosya ile 3 ekleme ve 2 silme
  1. +1
    -1
      jPush/push.go
  2. +2
    -1
      jPush/sdk/push_request.go

+ 1
- 1
jPush/push.go Dosyayı Görüntüle

@@ -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 Dosyayı Görüntüle

@@ -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"`


Yükleniyor…
İptal
Kaydet