正在显示
3 个修改的文件
包含
10 行增加
和
5 行删除
| @@ -18,7 +18,7 @@ UMENG_API_HOST = "http://msg.umeng.com" | @@ -18,7 +18,7 @@ UMENG_API_HOST = "http://msg.umeng.com" | ||
| 18 | 18 | ||
| 19 | #数据库相关 | 19 | #数据库相关 |
| 20 | MYSQL_USER = "${MYSQL_USER||root}" | 20 | MYSQL_USER = "${MYSQL_USER||root}" |
| 21 | -MYSQL_PASSWORD = "${MYSQL_PASSWORD||sutianxia2018}" | ||
| 22 | -MYSQL_HOST = "${MYSQL_HOST||101.37.68.23}" | ||
| 23 | -MYSQL_PORT = "${MYSQL_PORT||3306}" | 21 | +MYSQL_PASSWORD = "${MYSQL_PASSWORD||eagle1010}" |
| 22 | +MYSQL_HOST = "${MYSQL_HOST||114.55.200.59}" | ||
| 23 | +MYSQL_PORT = "${MYSQL_PORT||32306}" | ||
| 24 | MYSQL_DB_NAME = "${MYSQL_DB_NAME||mmm_open_dev}" | 24 | MYSQL_DB_NAME = "${MYSQL_DB_NAME||mmm_open_dev}" |
| @@ -166,6 +166,7 @@ func NewAps(options *push.Options) (v *Aps) { | @@ -166,6 +166,7 @@ func NewAps(options *push.Options) (v *Aps) { | ||
| 166 | Alert: NewAlert(options), | 166 | Alert: NewAlert(options), |
| 167 | AutoBadge: "+1", | 167 | AutoBadge: "+1", |
| 168 | ContentAvailable: 0, | 168 | ContentAvailable: 0, |
| 169 | + Sound: "default", | ||
| 169 | } | 170 | } |
| 170 | return | 171 | return |
| 171 | } | 172 | } |
| @@ -183,8 +184,9 @@ type PushInfo struct { | @@ -183,8 +184,9 @@ type PushInfo struct { | ||
| 183 | } | 184 | } |
| 184 | type Aps struct { | 185 | type Aps struct { |
| 185 | Alert *Alert `json:"alert"` | 186 | Alert *Alert `json:"alert"` |
| 186 | - AutoBadge string `json:"autoBadge"` //用于计算应用上面未读数字 | ||
| 187 | - ContentAvailable int `json:"content-available"` //推送直接带有透传数据 0:有通知栏消息 1:无通知栏消息 | 187 | + AutoBadge string `json:"autoBadge"` //用于计算应用上面未读数字 |
| 188 | + ContentAvailable int `json:"content-available,omitempty"` //推送直接带有透传数据 0:有通知栏消息 1:无通知栏消息 | ||
| 189 | + Sound string `json:"sound"` | ||
| 188 | } | 190 | } |
| 189 | type Alert struct { | 191 | type Alert struct { |
| 190 | Title string `json:"title"` | 192 | Title string `json:"title"` |
| @@ -32,6 +32,9 @@ func (this *PushController) PushInfo() { | @@ -32,6 +32,9 @@ func (this *PushController) PushInfo() { | ||
| 32 | msg = m | 32 | msg = m |
| 33 | return | 33 | return |
| 34 | } | 34 | } |
| 35 | + if len(request.ProjectKey) == 0 { | ||
| 36 | + request.ProjectKey = "worth" //默认是价值项目 | ||
| 37 | + } | ||
| 35 | header := controllers.GetRequestHeader(this.Ctx) | 38 | header := controllers.GetRequestHeader(this.Ctx) |
| 36 | msg = protocol.NewReturnResponse(push.Notification(header, request)) | 39 | msg = protocol.NewReturnResponse(push.Notification(header, request)) |
| 37 | } | 40 | } |
-
请 注册 或 登录 后发表评论