Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_sync_trustie
cxt 5 years ago
commit d2d245cacd

@ -25,6 +25,8 @@ class Weapps::CodeSessionsController < Weapps::BaseController
end
set_session_unionid(user_info['unionId'])
user_info['nickname'] = user_info['nickName']
session[:wechat_user_extra] = user_info
end
set_session_openid(result['openid'])

@ -16,7 +16,7 @@ class Weapps::SessionsController < Weapps::BaseController
end
# 绑定微信号
OpenUsers::Wechat.create!(user: user, uid: session_unionid) if user.wechat_open_user.blank?
OpenUsers::Wechat.create!(user: user, uid: session_unionid, extra: session[:wechat_user_extra]) if user.wechat_open_user.blank?
successful_authentication(user)
end

@ -24,7 +24,7 @@ class Competitions::JoinTeamService < ApplicationService
raise Error, '您已加入该战队' if team.team_members.exists?(user_id: user.id)
enrolled = competition.team_members.exists?(user_id: user.id)
if enrolled && (is_teacher && competition.teacher_multiple_limited?) || (!is_teacher && competition.member_multiple_limited?)
if enrolled && ((is_teacher && competition.teacher_multiple_limited?) || (!is_teacher && competition.member_multiple_limited?))
raise Error, '您已加入其它战队'
end

Loading…
Cancel
Save