添加适合微信图文的图片

This commit is contained in:
guange 2016-01-20 22:03:18 +08:00
parent 5831068fbd
commit 3df2a8a3cc
1 changed files with 2 additions and 2 deletions

View File

@ -126,7 +126,7 @@ class WechatsController < ActionController::Base
end
request.reply.news(news) do |article, n, index| # article is return object
article.item title: "#{index} #{n[:title]}", description: n[:content], pic_url: 'https://www.trustie.net/images/trustie_logo2.png', url: 'http://www.baidu.com/'
article.item title: "#{index} #{n[:title]}", description: n[:content], pic_url: 'http://wechat.trustie.net/images/trustie_logo2.png', url: 'http://www.baidu.com/'
end
else
openid = request[:FromUserName]
@ -135,7 +135,7 @@ class WechatsController < ActionController::Base
uw = UserWechat.create!(attrs)
news = (1..1).each_with_object([]) { |n, memo| memo << { title: '绑定登录', content: "您还未绑定确实的用户,请先绑定." } }
request.reply.news(news) do |article, n, index| # article is return object
article.item title: "#{n[:title]}", description: n[:content], pic_url: 'https://www.trustie.net/images/trustie_logo2.png', url: login_wechat_url(openid: uw.id)
article.item title: "#{n[:title]}", description: n[:content], pic_url: 'http://wechat.trustie.net/images/trustie_logo2.png', url: login_wechat_url(openid: uw.id)
end
end
end