Browse Source

fix:图标详情

zqbao 9 months ago
parent
commit
f8de805337
1 changed files with 5 additions and 0 deletions
  1. 5 0
      controllers/chart.go

+ 5 - 0
controllers/chart.go

@@ -1,6 +1,7 @@
 package controllers
 
 import (
+	"encoding/json"
 	"eta/eta_mini_api/models"
 	"eta/eta_mini_api/models/response"
 	"eta/eta_mini_api/services"
@@ -58,6 +59,10 @@ func (this *ChartController) List() {
 func (this *ChartController) Detail() {
 	br := new(models.BaseResponse).Init()
 	defer func() {
+		if br.Ret != 200 {
+			errb, _ := json.Marshal(br)
+			alarm_msg.SendAlarmMsg(fmt.Sprintf("获得图表详情失败:%s, user:%d", string(errb), this.User.UserId), 1)
+		}
 		this.Data["json"] = br
 		this.ServeJSON()
 	}()