|
@@ -93,13 +93,13 @@ func (c *BaseAuthController) ServeJSON(encoding ...bool) {
|
|
|
hasEncoding = true
|
|
|
}
|
|
|
if c.Data["json"] == nil {
|
|
|
- go utils.SendEmail("异常提醒:", "接口:"+"URI:"+c.Ctx.Input.URI()+";无返回值", utils.EmailSendToUsers)
|
|
|
+ go utils.SendEmail(utils.APPNAME+" "+utils.RunMode+"异常提醒:", "接口:"+"URI:"+c.Ctx.Input.URI()+";无返回值", utils.EmailSendToUsers)
|
|
|
return
|
|
|
}
|
|
|
baseRes := c.Data["json"].(*models.BaseResponse)
|
|
|
if baseRes != nil && baseRes.Ret != 200 && baseRes.Ret != 408 {
|
|
|
body, _ := json.Marshal(baseRes)
|
|
|
- go utils.SendEmail(utils.APPNAME+"失败提醒", "URI:"+c.Ctx.Input.URI()+"<br/> ErrMsg:"+baseRes.ErrMsg+";<br/>Msg:"+baseRes.Msg+";<br/> Body:"+string(body), utils.EmailSendToUsers)
|
|
|
+ go utils.SendEmail(utils.APPNAME+" "+utils.RunMode+" 失败提醒", "URI:"+c.Ctx.Input.URI()+"<br/> ErrMsg:"+baseRes.ErrMsg+";<br/>Msg:"+baseRes.Msg+";<br/> Body:"+string(body), utils.EmailSendToUsers)
|
|
|
}
|
|
|
c.JSON(c.Data["json"], hasIndent, hasEncoding)
|
|
|
}
|