|
|
@@ -14,6 +14,7 @@ import ( |
|
|
|
"github.com/gin-gonic/gin" |
|
|
|
"github.com/jinzhu/copier" |
|
|
|
"github.com/tidwall/gjson" |
|
|
|
"strings" |
|
|
|
"time" |
|
|
|
) |
|
|
|
|
|
|
@@ -66,7 +67,12 @@ func GetMenu(c *gin.Context) { |
|
|
|
} |
|
|
|
sysCfgDb.SysCfgUpdate("wechat_menu", utils.SerializeStr(menuList)) |
|
|
|
} |
|
|
|
|
|
|
|
for k, v := range menuList { |
|
|
|
menuList[k].Url = strings.ReplaceAll(v.Url, "\\u0026", "&") |
|
|
|
for k1, v1 := range v.SubButton { |
|
|
|
menuList[k].SubButton[k1].Url = strings.ReplaceAll(v1.Url, "\\u0026", "&") |
|
|
|
} |
|
|
|
} |
|
|
|
replyContentSet := []map[string]string{ |
|
|
|
{"msgType": "text", "name": "文本"}, |
|
|
|
{"msgType": "image", "name": "图片"}, |
|
|
@@ -104,6 +110,7 @@ func SetMenu(c *gin.Context) { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
fmt.Println(utils.SerializeStr(param)) |
|
|
|
menu, err := utils.SetWechatSelfMenu(token, param) |
|
|
|
if err != nil { |
|
|
|
e.OutErr(c, 400, err.Error()) |
|
|
@@ -124,7 +131,9 @@ func commSetModule(modData string) string { |
|
|
|
Data: modData, |
|
|
|
CreateAt: time.Now(), |
|
|
|
} |
|
|
|
db.Db.Insert(mod) |
|
|
|
insert, err := db.Db.Insert(mod) |
|
|
|
fmt.Println(insert) |
|
|
|
fmt.Println(err) |
|
|
|
return "official_account_custom_reply" + "_" + utils.IntToStr(mod.ModId) |
|
|
|
} |
|
|
|
|
|
|
|