From fab467f4ec65e4b78e2b9f6b610c80110f97dba0 Mon Sep 17 00:00:00 2001 From: linxiaozhi Date: Sat, 23 Mar 2019 20:40:49 +0800 Subject: [PATCH] =?UTF-8?q?=E9=92=89=E9=92=89=E6=A8=A1=E6=9D=BF=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E6=A0=BC=E5=BC=8F=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controllers/notify_tpl.go | 4 ++-- notify/dingtalk.go | 9 --------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/controllers/notify_tpl.go b/controllers/notify_tpl.go index fbf1e05..95aaecb 100644 --- a/controllers/notify_tpl.go +++ b/controllers/notify_tpl.go @@ -59,7 +59,7 @@ func (self *NotifyTplController) AjaxSave() { notifyTpl.Type = models.NotifyTplTypeDefault notifyTpl.Status, _ = self.GetInt("status") - if notifyTpl.TplType == 1 || notifyTpl.TplType == 3 { + if notifyTpl.TplType == 1 || notifyTpl.TplType == 2 || notifyTpl.TplType == 3 { m := make(map[string]string) err := json.Unmarshal([]byte(notifyTpl.Content), &m) if err != nil { @@ -85,7 +85,7 @@ func (self *NotifyTplController) AjaxSave() { notifyTpl.Content = strings.TrimSpace(self.GetString("content")) notifyTpl.Status, _ = self.GetInt("status") - if notifyTpl.TplType == 1 || notifyTpl.TplType == 3 { + if notifyTpl.TplType == 1 || notifyTpl.TplType == 2 || notifyTpl.TplType == 3 { m := make(map[string]string) err := json.Unmarshal([]byte(notifyTpl.Content), &m) if err != nil { diff --git a/notify/dingtalk.go b/notify/dingtalk.go index e68bc8a..7f3e05f 100644 --- a/notify/dingtalk.go +++ b/notify/dingtalk.go @@ -17,15 +17,6 @@ import ( "bytes" ) -type Msg struct { - MsgType string `json:"msgtype"` - Text *Text `json:"text"` -} - -type Text struct { - Content string `json:"content"` -} - type Dingtalk struct { Dingtalks map[string]string Content map[string]interface{}