| @@ -18,13 +18,12 @@ var menu = []byte(` | |||
| "type":"click", | |||
| "name":"我的会员资料", | |||
| "key": "MEMBER_MYPROFILE" | |||
| }, | |||
| }, | |||
| { | |||
| "type":"click", | |||
| "name":"积分和账单", | |||
| "key": "MEMBER_CREDITS" | |||
| }, | |||
| { | |||
| "type":"click", | |||
| "name":"搜索其他会员信息", | |||
| @@ -32,8 +31,8 @@ var menu = []byte(` | |||
| }, | |||
| { | |||
| "type":"click", | |||
| "name":"广播给所有会员", | |||
| "key":"MEMBER_BROADCAST" | |||
| "name":"匿名投诉", | |||
| "key":"MEMBER_FEEDBACK" | |||
| }, | |||
| { | |||
| "type": "view", | |||
| @@ -51,10 +50,10 @@ var menu = []byte(` | |||
| "name":"我来发起一次活动", | |||
| "key": "EVENT_STARTONE" | |||
| }, | |||
| { | |||
| "type":"pic_photo_or_album", | |||
| "name":"参与直播活动", | |||
| "key": "EVENT_CONTRIBUTEPHOTO" | |||
| { | |||
| "type":"click", | |||
| "name":"观看当前活动的直播", | |||
| "key": "EVENT_LIVE" | |||
| }, | |||
| { | |||
| "type":"scancode_waitmsg", | |||
| @@ -85,23 +84,23 @@ var menu = []byte(` | |||
| { | |||
| "type":"click", | |||
| "name":"融入澳洲社区", | |||
| "key": "CARDEV_INDUSTRY" | |||
| "key": "CAREERDEV_INDUSTRY" | |||
| }, | |||
| { | |||
| "type":"click", | |||
| "name":"OutReach Program", | |||
| "key": "CARDEV_OUTREACH" | |||
| "key": "CAREERDEV_OUTREACH" | |||
| }, | |||
| { | |||
| "type":"click", | |||
| "name":"母校发展机会", | |||
| "key": "CARDEV_HIT" | |||
| "name":"母校/国内纽带", | |||
| "key": "CAREERDEV_HIT" | |||
| }, | |||
| { | |||
| "type":"click", | |||
| "name":"全球发展机会", | |||
| "key":"CARDEV_GLOBAL" | |||
| "name":"校友互助信息", | |||
| "key":"CAREERDEV_HELP" | |||
| }] | |||
| } | |||
| ] | |||
| @@ -0,0 +1,39 @@ | |||
| package main | |||
| func onClick(in InWechatMsg) { | |||
| e := in.body.(EventMsg) | |||
| openid := in.header.FromUserName | |||
| switch e.EventKey { | |||
| case "MEMBER_MYPROFILE": | |||
| kfSendTxtAs(openid, "profile", "孙鹏") | |||
| case "MEMBER_CREDITS": | |||
| kfSendTxtAs(openid, "没有余额", "孙鹏") | |||
| case "MEMBER_SEARCH": | |||
| kfSendTxtAs(openid, "搜索", "孙鹏") | |||
| case "MEMBER_FEEDBACK": | |||
| kfSendTxtAs(openid, "匿名投诉", "孙鹏") | |||
| case "EVENT_STARTONE": | |||
| kfSendTxtAs(openid, "开启活动", "孙鹏") | |||
| case "EVENT_LIVE": | |||
| kfSendTxtAs(openid, "观看直播", "孙鹏") | |||
| case "EVENT_CHECKIN": | |||
| kfSendTxtAs(openid, "签到", "孙鹏") | |||
| case "EVENT_LUCKYDRAW": | |||
| kfSendTxtAs(openid, "抽奖", "孙鹏") | |||
| case "EVENTS_UPCOMING": | |||
| kfSendTxtAs(openid, "活动s", "孙鹏") | |||
| case "CAREERDEV_JOBS": | |||
| kfSendTxtAs(openid, "工作", "孙鹏") | |||
| case "CAREERDEV_INDUSTRY": | |||
| kfSendTxtAs(openid, "业界", "孙鹏") | |||
| case "CAREERDEV_OUTREACH": | |||
| kfSendTxtAs(openid, "out", "孙鹏") | |||
| case "CAREERDEV_HIT": | |||
| kfSendTxtAs(openid, "母校", "孙鹏") | |||
| case "CAREERDEV_HELP": | |||
| kfSendTxtAs(openid, "互助", "孙鹏") | |||
| default: | |||
| kfSendTxt(openid, e.EventKey) | |||
| } | |||
| } | |||
| @@ -12,6 +12,8 @@ func (ss *openIDSessionData) serveEvents(in InWechatMsg) (processed bool) { | |||
| in.replyText("") | |||
| onUnSubscribe(in) | |||
| return | |||
| case "pic_photo_or_album": | |||
| in.replyText("上传图片") | |||
| case "scancode_waitmsg": | |||
| in.replyText("scancode_waitmsg/" + e.EventKey) | |||
| case "SCAN": | |||
| @@ -19,7 +21,8 @@ func (ss *openIDSessionData) serveEvents(in InWechatMsg) (processed bool) { | |||
| case "LOCATION": | |||
| in.replyText("LOCATION") | |||
| case "CLICK": | |||
| in.replyText("CLICK/" + e.EventKey) | |||
| in.replyText("") | |||
| onClick(in) | |||
| case "VIEW": | |||
| in.replyText("CLICK" + e.EventKey) | |||
| case "TEMPLATESENDJOBFINISH": | |||