|
|
|
@ -139,12 +139,13 @@ class WechatsController < ActionController::Base
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def sendBind(request)
|
|
|
|
|
news = (1..1).each_with_object([]) { |n, memo| memo << { title: '绑定登录', content: "您还未绑定确实的用户,请先绑定." } }
|
|
|
|
|
news = (1..1).each_with_object([]) { |n, memo| memo << { title: '绑定登录', content: "欢迎使用Trustie创新实践服务平台! 在这里您可以随时了解您的课程和项目动态,随时点赞和回复。
|
|
|
|
|
我们将会与微信不断结合,为您提供更有价值的服务。 您还未绑定确实的用户,请先绑定,谢谢!" } }
|
|
|
|
|
request.reply.news(news) do |article, n, index| # article is return object
|
|
|
|
|
url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=#{Wechat.config.appid}&redirect_uri=#{login_wechat_url}&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
|
|
|
|
|
article.item title: "#{n[:title]}",
|
|
|
|
|
description: n[:content],
|
|
|
|
|
pic_url: 'https://www.trustie.net/images/trustie_logo2.png',
|
|
|
|
|
pic_url: 'https://www.trustie.net/images/weixin_pic.jpg',
|
|
|
|
|
url: url
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|