You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 satır
1.1KB

  1. package main
  2. func (ss *openIDSessionData) serveEvents(in* InWechatMsg) (processed bool) {
  3. processed = true
  4. e := in.body.(EventMsg)
  5. switch e.Event {
  6. case "subscribe":
  7. in.replyText("/::D, 来啦")
  8. onSubscribe(in)
  9. return
  10. case "unsubscribe":
  11. in.replyText("")
  12. onUnSubscribe(in)
  13. return
  14. case "pic_photo_or_album":
  15. in.replyText("上传图片")
  16. case "scancode_waitmsg":
  17. in.replyText("scancode_waitmsg/" + e.EventKey)
  18. case "SCAN":
  19. in.replyText("SCAN/" + e.EventKey)
  20. case "LOCATION":
  21. in.replyText("")
  22. onLocation(in)
  23. case "CLICK":
  24. in.replyText("")
  25. onClick(in)
  26. case "VIEW":
  27. in.replyText("CLICK" + e.EventKey)
  28. case "TEMPLATESENDJOBFINISH":
  29. // <xml><ToUserName><![CDATA[gh_f09231355c68]]></ToUserName>
  30. // <FromUserName><![CDATA[oUN420Wj78vnkNeAJY7RMPXA28oc]]></FromUserName>
  31. // <CreateTime>1499150186</CreateTime>
  32. // <MsgType><![CDATA[event]]></MsgType>
  33. // <Event><![CDATA[TEMPLATESENDJOBFINISH]]></Event>
  34. // <MsgID>414001772</MsgID>
  35. // <Status><![CDATA[success]]></Status>
  36. // </xml>
  37. //in.replyText("TEMPLATESENDJOBFINISH")
  38. }
  39. return
  40. }