作者 yangfu

修改:1.推送类型

增加:1.oss文件上传 2.sts授权
... ... @@ -18,7 +18,7 @@ UMENG_API_HOST = "http://msg.umeng.com"
#数据库相关
MYSQL_USER = "${MYSQL_USER||root}"
MYSQL_PASSWORD = "${MYSQL_PASSWORD||sutianxia2018}"
MYSQL_HOST = "${MYSQL_HOST||101.37.68.23}"
MYSQL_PORT = "${MYSQL_PORT||3306}"
MYSQL_PASSWORD = "${MYSQL_PASSWORD||eagle1010}"
MYSQL_HOST = "${MYSQL_HOST||114.55.200.59}"
MYSQL_PORT = "${MYSQL_PORT||32306}"
MYSQL_DB_NAME = "${MYSQL_DB_NAME||mmm_open_dev}"
\ No newline at end of file
... ...
... ... @@ -166,6 +166,7 @@ func NewAps(options *push.Options) (v *Aps) {
Alert: NewAlert(options),
AutoBadge: "+1",
ContentAvailable: 0,
Sound: "default",
}
return
}
... ... @@ -184,7 +185,8 @@ type PushInfo struct {
type Aps struct {
Alert *Alert `json:"alert"`
AutoBadge string `json:"autoBadge"` //用于计算应用上面未读数字
ContentAvailable int `json:"content-available"` //推送直接带有透传数据 0:有通知栏消息 1:无通知栏消息
ContentAvailable int `json:"content-available,omitempty"` //推送直接带有透传数据 0:有通知栏消息 1:无通知栏消息
Sound string `json:"sound"`
}
type Alert struct {
Title string `json:"title"`
... ...
... ... @@ -32,6 +32,9 @@ func (this *PushController) PushInfo() {
msg = m
return
}
if len(request.ProjectKey) == 0 {
request.ProjectKey = "worth" //默认是价值项目
}
header := controllers.GetRequestHeader(this.Ctx)
msg = protocol.NewReturnResponse(push.Notification(header, request))
}
... ...