From 60b35a46cea7eb8ddd4d1d44d9b5b3c2ee1e312a Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Tue, 1 Mar 2016 14:05:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E4=BC=81=E4=B8=9Aid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index ea51059df..0429ebd91 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -158,7 +158,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 - url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=#{self.corpid}&redirect_uri=#{login_wechat_url(uid: uw.id)}&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect" + url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=#{Wechat.config.corpid}&redirect_uri=#{login_wechat_url(uid: uw.id)}&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect" article.item title: "#{n[:title]}", description: n[:content], pic_url: 'http://wechat.trustie.net/images/trustie_logo2.png',