|
@@ -274,6 +274,12 @@ func SendThs(title, labelStr, abstract, jumpBaseUrl, logoUrl string) (err error)
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+ dataType := "1" //内容类型:1文字 2小程序
|
|
|
+ dataTypeEncript, err := gorsa.PublicEncrypt(dataType, pubKey)
|
|
|
+ if err != nil {
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
//开始发送
|
|
|
client := http.Client{}
|
|
|
form := url.Values{}
|
|
@@ -282,6 +288,7 @@ func SendThs(title, labelStr, abstract, jumpBaseUrl, logoUrl string) (err error)
|
|
|
form.Add("label", label)
|
|
|
form.Add("url", jumpUrl)
|
|
|
form.Add("icon", picUrl)
|
|
|
+ form.Add("dataType", dataTypeEncript)
|
|
|
|
|
|
utils.FileLog.Info("SendThs parms:%s", form.Encode())
|
|
|
resp, err := client.PostForm(sendUrl, form)
|