openid参数

chenlw_dev
guange 9 years ago
parent e1f1c6fbc0
commit a6a0681b78

@ -12,7 +12,7 @@ module Mobile
requires :openid, type: String
end
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_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

Loading…
Cancel
Save