openid参数

This commit is contained in:
guange 2016-04-02 08:08:03 +08:00
parent e1f1c6fbc0
commit a6a0681b78
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@ module Mobile
requires :openid, type: String requires :openid, type: String
end end
post do post do
user = UserWechat.find_by_openid(params[:openid]) user = UserWechat.find_by_openid(params[:openid]).user
shield_project_ids = ShieldActivity.where("container_type='User' and container_id=#{user.id} and shield_type='Project'").map(&:shield_id) 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) 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 page = params[:page] ? params[:page] : 0