From 14fb897e7e6b31d0d6e26e24f3e87cc6597c676e Mon Sep 17 00:00:00 2001 From: Patrick Peng Sun Date: Thu, 25 May 2017 21:50:31 +1000 Subject: [PATCH] test kf transfer message --- server.go | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/server.go b/server.go index 2e57910..0f89a2b 100644 --- a/server.go +++ b/server.go @@ -62,7 +62,21 @@ func answerWechatPost(w http.ResponseWriter, r *http.Request) { h := ReadCommonHeader(d) reply, _ := BuildTextMsg(h.MsgType, h.FromUserName) if h.MsgType == "text" { - reply, _ = BuildTextMsg("test some link ", h.FromUserName) + + // url := "http://www.google.com.au/" + // first := "很高兴有你参加志愿者" + // remark := "明天给你发1万块钱" + // name := "利于修" + // staffID := "1235465" + // joinDate := time.Now().Format("2006-01-02 15:04:06 Mon MST -07") + // totalCount := "50次" + // totalTime := "2小时" + // log.Println("send kf msg") + // templateSendJoinVolunteer(h.FromUserName, url, first, remark, name, staffID, joinDate, totalCount, totalTime) + + reply, _ = BuildKFTransferAnyOneMsg(h.FromUserName) + //reply, _ = BuildKFTransferMsg(h.FromUserName, "kf2001@gh_f09231355c68") + //reply, _ = BuildTextMsg("test some link ", h.FromUserName) } if h.MsgType == "voice" { a := ReadVoiceMsg(d) @@ -71,7 +85,7 @@ func answerWechatPost(w http.ResponseWriter, r *http.Request) { if h.MsgType == "event" { a := ReadEventMsg(d) if a.Event == "LOCATION" { - reply = BuildLocationMsg(0, 0, 0, h.FromUserName) + reply, _ = BuildTextMsg("test some link ", h.FromUserName) fmt.Printf("output %s", reply) } else { reply, _ = BuildTextMsg(a.Event+"/"+a.EventKey, h.FromUserName)