From fbdd7b0a718aa0d808d4ae5849e8b62d7f6398b3 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Sat, 13 Jul 2019 14:59:23 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=8F=91=E9=80=81=E7=9F=AD=E4=BF=A1?= =?UTF-8?q?=E6=89=93=E5=8D=B0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/educoder/sms.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/educoder/sms.rb b/lib/educoder/sms.rb index 237b270d5..5ba273aa8 100644 --- a/lib/educoder/sms.rb +++ b/lib/educoder/sms.rb @@ -28,6 +28,8 @@ module Educoder def self.sendYunpian(mobile, code, send_type, name, user_name, result) #修改为您的apikey.可在官网(http://www.yunpian.com)登录后用户中心首页看到 apikey = EduSetting.get('sms_apikey') + Rails.logger.info("#####apikey: #{apikey}") + Rails.logger.info("#####mobile: #{mobile}") #指定模板发送接口HTTP地址 send_tpl_sms_uri = URI.parse('https://sms.yunpian.com/v2/sms/single_send.json') @@ -70,6 +72,7 @@ module Educoder response = http.start { |http| http.request(request) } ActiveSupport::JSON.decode(response.body) rescue =>err + Rails.logger.error("#############sendYunpian_error: #{err.message}") return nil end end From cb0ce291a13ac614530bddc70f6403a8770e3f19 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Sat, 13 Jul 2019 15:15:31 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/educoder/sms.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/educoder/sms.rb b/lib/educoder/sms.rb index 5ba273aa8..cadce7465 100644 --- a/lib/educoder/sms.rb +++ b/lib/educoder/sms.rb @@ -28,8 +28,6 @@ module Educoder def self.sendYunpian(mobile, code, send_type, name, user_name, result) #修改为您的apikey.可在官网(http://www.yunpian.com)登录后用户中心首页看到 apikey = EduSetting.get('sms_apikey') - Rails.logger.info("#####apikey: #{apikey}") - Rails.logger.info("#####mobile: #{mobile}") #指定模板发送接口HTTP地址 send_tpl_sms_uri = URI.parse('https://sms.yunpian.com/v2/sms/single_send.json')