update
This commit is contained in:
@@ -132,7 +132,7 @@ set wxmp masters w1&w2&w3...
|
|||||||
|
|
||||||
#set wx relay_mode true
|
#set wx relay_mode true
|
||||||
|
|
||||||
##### 设置指定转发地址,格式为 https://域名/reply?url=%s
|
##### 设置指定转发地址,格式为 https://域名/relay?url=%s
|
||||||
|
|
||||||
#set wx relaier ?
|
#set wx relaier ?
|
||||||
|
|
||||||
|
|||||||
+5
-3
@@ -17,7 +17,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var wx = core.NewBucket("wx")
|
var wx = core.NewBucket("wx")
|
||||||
var api_url = wx.Get("api_url")
|
var api_url = func() string {
|
||||||
|
return wx.Get("api_url")
|
||||||
|
}
|
||||||
var robot_wxid = wx.Get("robot_wxid")
|
var robot_wxid = wx.Get("robot_wxid")
|
||||||
|
|
||||||
func sendTextMsg(pmsg *TextMsg) {
|
func sendTextMsg(pmsg *TextMsg) {
|
||||||
@@ -27,7 +29,7 @@ func sendTextMsg(pmsg *TextMsg) {
|
|||||||
}
|
}
|
||||||
pmsg.Event = "SendTextMsg"
|
pmsg.Event = "SendTextMsg"
|
||||||
pmsg.RobotWxid = robot_wxid
|
pmsg.RobotWxid = robot_wxid
|
||||||
req := httplib.Post(api_url)
|
req := httplib.Post(api_url())
|
||||||
req.Header("Content-Type", "application/json")
|
req.Header("Content-Type", "application/json")
|
||||||
data, _ := json.Marshal(pmsg)
|
data, _ := json.Marshal(pmsg)
|
||||||
enc := mahonia.NewEncoder("gbk")
|
enc := mahonia.NewEncoder("gbk")
|
||||||
@@ -57,7 +59,7 @@ func sendOtherMsg(pmsg *OtherMsg) {
|
|||||||
pmsg.Event = "SendImageMsg"
|
pmsg.Event = "SendImageMsg"
|
||||||
}
|
}
|
||||||
pmsg.RobotWxid = robot_wxid
|
pmsg.RobotWxid = robot_wxid
|
||||||
req := httplib.Post(api_url)
|
req := httplib.Post(api_url())
|
||||||
req.Header("Content-Type", "application/json")
|
req.Header("Content-Type", "application/json")
|
||||||
data, _ := json.Marshal(pmsg)
|
data, _ := json.Marshal(pmsg)
|
||||||
req.Body(data)
|
req.Body(data)
|
||||||
|
|||||||
Reference in New Issue
Block a user