修改绑定登录的地址

This commit is contained in:
yuanke 2016-08-14 10:28:46 +08:00
parent 6472a1c71c
commit 56da43221d
1 changed files with 4 additions and 1 deletions

View File

@ -252,13 +252,16 @@ class WechatsController < ActionController::Base
end end
def sendBind(request) def sendBind(request)
tmpurl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=#{Wechat.config.appid}&redirect_uri=#{ROOT_URL+'/wechat/user_activities'}&response_type=code&scope=snsapi_base&state=login&connect_redirect=1#wechat_redirect"
logger.info "tmpurl!!!!!!!!!!!!!!"
logger.info tmpurl
news = (1..1).each_with_object([]) { |n, memo| memo << { title: '绑定登录', content: "欢迎使用Trustie创新实践服务平台 news = (1..1).each_with_object([]) { |n, memo| memo << { title: '绑定登录', content: "欢迎使用Trustie创新实践服务平台
" } } " } }
request.reply.news(news) do |article, n, index| # article is return object 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=#{ROOT_URL+'/wechat/user_activities'}&response_type=code&scope=snsapi_base&state=login#wechat_redirect" url = tmpurl
pic_url = "#{ROOT_URL}/images/weixin_pic.jpg" pic_url = "#{ROOT_URL}/images/weixin_pic.jpg"
article.item title: "#{n[:title]}", article.item title: "#{n[:title]}",
description: n[:content], description: n[:content],