动态内容调整

This commit is contained in:
guange 2016-01-20 23:38:40 +08:00
parent 6075f44786
commit 745b8399d1
1 changed files with 3 additions and 3 deletions

View File

@ -124,7 +124,7 @@ class WechatsController < ActionController::Base
if uw && uw.user
ua = user_activity(uw.user)
logo = "trustie_logo2.png"
logo = "http://wechat.trustie.net/images/trustie_logo2.png"
i = 0
news =[]
ua.each do |a|
@ -133,7 +133,7 @@ class WechatsController < ActionController::Base
if activity
news << {title: activity[0],
content: activity[1],
picurl: "http://wechat.trustie.net/images/#{i == 1 ? logo : activity[2]}",
picurl: "#{i == 1 ? logo : 'https://www.trustie.net'+activity[2]}",
url: activity[3]
}
end
@ -143,7 +143,7 @@ class WechatsController < ActionController::Base
request.reply.news(news) do |article, n, index| # article is return object
article.item title: "#{n[:content]}",
description: n[:title],
pic_url: "https://www.turstie.net#{n[:picurl]}",
pic_url: "#{n[:picurl]}",
url: n[:url]
end
else