소스 검색

test kf transfer message

master
Patrick Peng Sun 8 년 전
부모
커밋
14fb897e7e
1개의 변경된 파일16개의 추가작업 그리고 2개의 파일을 삭제
  1. +16
    -2
      server.go

+ 16
- 2
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 <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)

Loading…
취소
저장