| @@ -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 <a href=http://www.hitxy.org.au/> some link </a>", 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 <a href=http://www.hitxy.org.au/> some link </a>", 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 <a href=http://www.hitxy.org.au/> some link </a>", h.FromUserName) | |||
| fmt.Printf("output %s", reply) | |||
| } else { | |||
| reply, _ = BuildTextMsg(a.Event+"/"+a.EventKey, h.FromUserName) | |||