diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 01dd135be..beee86472 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -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 diff --git a/config/menu.yml b/config/menu.yml index 1a4927fbd..2f38a48a9 100644 --- a/config/menu.yml +++ b/config/menu.yml @@ -6,4 +6,8 @@ button: - type: "view" name: "进入网站" - url: "http://www.trustie.net/" \ No newline at end of file + url: "http://www.trustie.net/" + - + type: "click" + name: "意见返馈" + url: "FEEDBACK" \ No newline at end of file