This commit is contained in:
wangchuxiao
2023-02-09 20:36:34 +08:00
parent 8a1702fcf7
commit 759432794f
216 changed files with 2299 additions and 4059 deletions
+4 -6
View File
@@ -26,23 +26,21 @@ func newGetuiClient() *MobPush {
}
func (j *MobPush) Push(accounts []string, alert, detailContent, operationID string, opts push.PushOpts) (string, error) {
var target requestParams.PushTarget
var target requestparams.PushTarget
target.SetAlias(accounts)
target.SetTarget(2)
var no requestParams.PushNotify
var no requestparams.PushNotify
no.SetType(1)
no.SetIosProduction(1)
no.SetPlats([]int{1, 2})
no.SetContent(alert)
var forward requestParams.PushForward
var forward requestparams.PushForward
forward.SetNextType(2)
forward.SetScheme(config.Config.Push.Mob.Scheme)
var po requestParams.PushObj
var po requestparams.PushObj
po.SetSource("webapi")
po.SetAppkey(config.Config.Push.Mob.AppKey)
po.SetPushTarget(&target)
@@ -1,4 +1,4 @@
package requestParams
package requestparams
type PushForward struct {
NextType int `json:"nextType"`
@@ -1,4 +1,4 @@
package requestParams
package requestparams
type PushNotify struct {
Plats []int `json:"plats,omitempty"`
@@ -1,4 +1,4 @@
package requestParams
package requestparams
type PushObj struct {
Source interface{} `json:"source"`
@@ -1,4 +1,4 @@
package requestParams
package requestparams
type PushTarget struct {
Target interface{} `json:"target,omitempty"`