From d5e894561965121d6ab4cd91e9f3002d23ec6822 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 1 Mar 2016 17:06:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 6 +++++- config/menu.yml | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) 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