Explorar el Código

fix 修改参数类型为interface{},支持string和number (#390)

silenceper hace 5 años
padre
commit
5472ac979b
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      miniprogram/subscribe/subscribe.go

+ 2 - 2
miniprogram/subscribe/subscribe.go

@@ -43,8 +43,8 @@ type Message struct {
 
 //DataItem 模版内某个 .DATA 的值
 type DataItem struct {
-	Value string `json:"value"`
-	Color string `json:"color"`
+	Value interface{} `json:"value"`
+	Color string      `json:"color"`
 }
 
 //TemplateItem template item