From 7d4de365216a1a13b26cef7b84253fb00fa23708 Mon Sep 17 00:00:00 2001
From: guange <8863824@gmail.com>
Date: Sat, 2 Apr 2016 07:39:46 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9openid=E8=B0=83=E7=94=A8?=
=?UTF-8?q?=E4=BD=8D=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/api/mobile/apis/activities.rb | 6 +++---
public/assets/wechat/blog_detail.html | 2 +-
public/assets/wechat/course_discussion.html | 2 +-
public/assets/wechat/course_notice.html | 2 +-
public/assets/wechat/homework_detail.html | 2 +-
public/assets/wechat/issue_detail.html | 2 +-
public/assets/wechat/message_detail.html | 2 +-
public/assets/wechat/project_discussion.html | 2 +-
public/javascripts/wechat/wechat_dev.js | 4 +++-
9 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/app/api/mobile/apis/activities.rb b/app/api/mobile/apis/activities.rb
index 9329ea860..15f244715 100644
--- a/app/api/mobile/apis/activities.rb
+++ b/app/api/mobile/apis/activities.rb
@@ -9,10 +9,10 @@ module Mobile
params do
requires :page, type: Integer
+ requires :token, type: String
end
- get ':id' do
- #uw = UserWechat.find params[:openid]
- user = User.find params[:id]
+ post do
+ user = UserWechat.find_by_openid(params[:openid])
shield_project_ids = ShieldActivity.where("container_type='User' and container_id=#{user.id} and shield_type='Project'").map(&:shield_id)
shield_course_ids = ShieldActivity.where("container_type='User' and container_id=#{user.id} and shield_type='Course'").map(&:shield_id)
page = params[:page] ? params[:page] : 0
diff --git a/public/assets/wechat/blog_detail.html b/public/assets/wechat/blog_detail.html
index 8b3f44eb5..dd40df5ab 100644
--- a/public/assets/wechat/blog_detail.html
+++ b/public/assets/wechat/blog_detail.html
@@ -66,8 +66,8 @@
-
+