修复微信处理流程bug
This commit is contained in:
parent
d76db7d81e
commit
7e57007cc0
|
@ -19,10 +19,6 @@ import (
|
||||||
"github.com/johlanse/study_xxqg/utils/update"
|
"github.com/johlanse/study_xxqg/utils/update"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
|
||||||
initWechat()
|
|
||||||
}
|
|
||||||
|
|
||||||
var (
|
var (
|
||||||
wx *mp.WeiXin
|
wx *mp.WeiXin
|
||||||
lastNonce = ""
|
lastNonce = ""
|
||||||
|
@ -192,6 +188,9 @@ func sendMsg(id, message string) {
|
||||||
* @param req
|
* @param req
|
||||||
*/
|
*/
|
||||||
func HandleWechat(rep http.ResponseWriter, req *http.Request) {
|
func HandleWechat(rep http.ResponseWriter, req *http.Request) {
|
||||||
|
if wx == nil {
|
||||||
|
initWechat()
|
||||||
|
}
|
||||||
wx.ServeHTTP(rep, req)
|
wx.ServeHTTP(rep, req)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue