修改菜单

This commit is contained in:
guange 2016-03-01 17:06:40 +08:00
parent 509d4a3df7
commit d5e8945619
2 changed files with 10 additions and 2 deletions

View File

@ -7,7 +7,7 @@ class WechatsController < ActionController::Base
# default text responder when no other match
on :text do |request, content|
request.reply.text "echo: #{content}" # Just echo
request.reply.text "您的意见已收到" # Just echo
end
# When receive 'help', will trigger this responder
@ -121,6 +121,10 @@ class WechatsController < ActionController::Base
# Any not match above will fail to below
on :fallback, respond: 'fallback message'
on :click, with: 'FEEDBACK' do |request, key|
request.reply.text "如有反馈问题,请直接切入至输入框,发微信给我们即可"
end
on :click, with: 'MY_NEWS' do |request, key|
uw = user_binded?(request[:FromUserName])
if uw && uw.user

View File

@ -6,4 +6,8 @@ button:
-
type: "view"
name: "进入网站"
url: "http://www.trustie.net/"
url: "http://www.trustie.net/"
-
type: "click"
name: "意见返馈"
url: "FEEDBACK"