图片调整

chenlw_dev
guange 10 years ago
parent 95070b7e83
commit 02cf9b56e1

@ -121,12 +121,16 @@ class WechatsController < ActionController::Base
uw = user_binded?(request[:FromUserName]) uw = user_binded?(request[:FromUserName])
if uw && uw.user if uw && uw.user
ua = UserActivity.where(user_id: uw.user.id).order("id desc").limit(5) ua = UserActivity.where(user_id: uw.user.id).order("id desc").limit(5)
logo = "trustie_logo2.png"
news = ua.map do |ua| news = ua.map do |ua|
{title: "act_type: #{ua.act_type}, act_id: #{ua.act_id}", content: "container_id: #{ua.container_id}, container_type: #{ua.container_type}"} {title: "act_type: #{ua.act_type}, act_id: #{ua.act_id}",
content: "container_id: #{ua.container_id}, container_type: #{ua.container_type}",
pic_url:"http://wechat.trustie.net/images/trustie_logo#{logo}.png" }
logo = "trustie_logo1.png"
end end
request.reply.news(news) do |article, n, index| # article is return object request.reply.news(news) do |article, n, index| # article is return object
article.item title: "#{index} #{n[:title]}", description: n[:content], pic_url: 'http://wechat.trustie.net/images/trustie_logo2.png', url: 'http://www.baidu.com/' article.item title: "#{index} #{n[:title]}", description: n[:content], pic_url: n[:pic_url], url: 'http://www.baidu.com/'
end end
else else
openid = request[:FromUserName] openid = request[:FromUserName]

Loading…
Cancel
Save