|
|
|
@ -39,27 +39,22 @@ module Educoder
|
|
|
|
|
params['text'] = "【Edu实训】" + code + "(手机验证码),有效期为10分钟。如非本人操作,请忽略。"
|
|
|
|
|
elsif send_type == 'competition_start'
|
|
|
|
|
params['text'] = "【Edu实训】亲爱的#{user_name},你参与的#{name}将于#{result}开始,请及时参赛"
|
|
|
|
|
Rails.logger.info "#{params['text']}"
|
|
|
|
|
elsif send_type == "teacher_register"
|
|
|
|
|
params['mobile'] = EduSetting.get('teacher_register_phone') || '17680641960'
|
|
|
|
|
params['text'] = "【Edu实训】亲爱的#{user_name},有新的老师#{name}注册啦,请尽快处理"
|
|
|
|
|
elsif send_type == 'subject_authorization' || send_type == 'shixun_authorization'
|
|
|
|
|
params['text'] = "【Edu实训】亲爱的#{user_name},您提交的#{name}#{send_type=='subject_authorization'?'实训路径':'实训'}发布申请#{result},请登录平台查看详情"
|
|
|
|
|
Rails.logger.info "#{params['text']}"
|
|
|
|
|
elsif send_type == 'authentication_pro' || send_type == 'authentication'|| send_type == 'trial_authorization' || send_type == 'project_info'
|
|
|
|
|
params['text'] = "【Edu实训】亲爱的#{user_name},您提交的#{send_type == 'authentication_pro'?'职业认证':(send_type == 'authentication'? '实名认证' : (send_type == 'project_info'?'加入申请':'试用申请' ))}#{result},请登录平台查看详情"
|
|
|
|
|
Rails.logger.info "#{params['text']}"
|
|
|
|
|
elsif send_type == "apply_pro_certification" || send_type == "apply_auth"
|
|
|
|
|
params['text'] = "【Edu实训】亲爱的#{name},有新的#{send_type == 'apply_pro_certification'?'职业':'实名'}认证申请,请尽快处理"
|
|
|
|
|
Rails.logger.info "#{params['text']}"
|
|
|
|
|
elsif send_type == "publish_subject" ||send_type == "publish_shixun"|| send_type == "user_apply_auth" || send_type == "discuss"
|
|
|
|
|
params['mobile'] = EduSetting.get('subject_shixun_notify_phone') || '18711011226' if send_type == "publish_subject" || send_type == "publish_shixun"
|
|
|
|
|
params['text'] = "【Edu实训】亲爱的#{name},有新的#{send_type == 'publish_subject'?'实训路径':(send_type == 'publish_shixun' ? '实训' : (send_type == 'discuss' ? '实训评论':'试用'))}申请发布,请尽快处理"
|
|
|
|
|
Rails.logger.info "#{params['text']}"
|
|
|
|
|
elsif send_type == 'join_course_multi_role'
|
|
|
|
|
params['text'] = "【Edu实训】亲爱的#{user_name},您的课堂#{name}有助教或者教师申请加入,请尽快审核"
|
|
|
|
|
Rails.logger.info "#{params['text']}"
|
|
|
|
|
elsif send_type == 'applied_project_info'
|
|
|
|
|
params['text'] = "【Edu实训】亲爱的#{user_name},您的项目#{name}有成员申请加入,请尽快审核"
|
|
|
|
|
Rails.logger.info "#{params['text']}"
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
http = Net::HTTP.new(send_tpl_sms_uri.host, send_tpl_sms_uri.port)
|
|
|
|
|