|
|
|
@ -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
|
|
|
|
|