From 073140582817970c0fd4830ef4fb37dd7f952a9b Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Fri, 8 Apr 2016 10:50:05 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=96=B0=E5=86=8D=E6=AC=A1=E8=BF=9B?= =?UTF-8?q?=E6=9D=A5=E7=9A=84=E7=94=A8=E6=88=B7=E6=8F=90=E7=A4=BA=E6=AC=A2?= =?UTF-8?q?=E8=BF=8E=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index dac449834..fdfd19f64 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -131,30 +131,7 @@ class WechatsController < ActionController::Base def default_msg(request) uw = user_binded?(request[:FromUserName]) if uw && uw.user - - ua = user_activity(uw.user) - logo = "http://wechat.trustie.net/images/trustie_logo2.png" - i = 0 - news =[] - ua.each do |a| - i += 1 - activity = process_activity(a) - if activity - news << {title: activity[0], - content: activity[1], - picurl: "#{i == 1 ? logo : 'https://www.trustie.net/'+activity[2]}", - url: activity[3] - } - end - - end - - request.reply.news(news) do |article, n, index| # article is return object - article.item title: "#{n[:content]}", - description: n[:title], - pic_url: "#{n[:picurl]}", - url: n[:url] - end + request.reply.text "欢迎回来, #{uw.user.show_name}" else sendBind(request) end