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


Зареждане…
Отказ
Запис