From dc2ba9635394dc81411de2f8cc8d8f887a5e083b Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Fri, 15 Jul 2016 10:26:37 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=B3=A8=E5=86=8C=E5=8F=91?= =?UTF-8?q?=E9=80=81=E7=BB=91=E5=AE=9A=E6=88=90=E5=8A=9F=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=EF=BC=8C=E5=8A=A0=E5=85=A5=E7=8F=AD=E7=BA=A7?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E9=80=9A=E7=9F=A5=E7=82=B9=E5=87=BB=E8=B7=B3?= =?UTF-8?q?=E5=85=A5=E7=8F=AD=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/apis/users.rb | 3 ++- app/controllers/wechats_controller.rb | 2 +- public/assets/wechat/class_list.html | 8 ++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/api/mobile/apis/users.rb b/app/api/mobile/apis/users.rb index e2ea8d35b..e34bae63f 100644 --- a/app/api/mobile/apis/users.rb +++ b/app/api/mobile/apis/users.rb @@ -67,7 +67,8 @@ module Mobile openid: openid, user: user ) - + ws = WechatService.new + ws.binding_succ_notice(user.id, "您已成功绑定Trustie平台", user.login, Time.now.strftime("%Y-%m-%d")) present :data, user, with: Mobile::Entities::User present :status, 0 end diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 38bff250e..ea305d967 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -221,7 +221,7 @@ class WechatsController < ActionController::Base news = (1..1).each_with_object([]) { |n, memo| memo << { title: '恭喜您成功加入班级,开始学习吧!', content: "课程名称: #{course.name}\n班级名称: #{course.name}\n任课老师: #{course.teacher.show_name}\n进入班级,和小伙伴愉快的学习吧!"} } return 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?id='+course.id.to_s}&response_type=code&scope=snsapi_base&state=myclass#wechat_redirect" + url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=#{Wechat.config.appid}&redirect_uri=#{ROOT_URL+'/wechat/user_activities#/class?id='+course.id.to_s}&response_type=code&scope=snsapi_base&state=myclass#wechat_redirect" pic_url = "#{ROOT_URL}/images/wechat/class.jpg" article.item title: "#{n[:title]}", description: n[:content], diff --git a/public/assets/wechat/class_list.html b/public/assets/wechat/class_list.html index dafce2cfc..b5feefc73 100644 --- a/public/assets/wechat/class_list.html +++ b/public/assets/wechat/class_list.html @@ -4,8 +4,8 @@
我创建的课程
-
{{syllabus.title}}
-