forked from Trustie/forgeplus
更换短信模板
This commit is contained in:
parent
28d2bbe9a1
commit
acaea1901d
|
|
@ -27,7 +27,7 @@ class AccountsController < ApplicationController
|
|||
result = autologin_register(username, email, password, platform, phone)
|
||||
if result[:message].blank?
|
||||
PlatformStatistic.data.increment!(:users_count)
|
||||
Gitlink::Sms.send(mobile: phone, send_type: 'init_password', code: password) if need_send_pwd_sms
|
||||
Gitlink::Sms.send(mobile: phone, send_type: 'init_password', code: password, user_name: username) if need_send_pwd_sms
|
||||
render_ok({user: result[:user]})
|
||||
else
|
||||
render_error(result[:message])
|
||||
|
|
@ -54,7 +54,7 @@ class AccountsController < ApplicationController
|
|||
return render_error("该手机号已注册") if phone.present? && User.where(phone: phone).exists?
|
||||
result = autologin_register(username, email, password, platform, phone)
|
||||
if result[:message].blank?
|
||||
Gitlink::Sms.send(mobile: phone, send_type: 'init_password', code: password)
|
||||
Gitlink::Sms.send(mobile: phone, send_type: 'init_password', code: password, user_name: username)
|
||||
PlatformStatistic.data.increment!(:users_count)
|
||||
render_ok({user: result[:user]})
|
||||
else
|
||||
|
|
|
|||
|
|
@ -38,7 +38,8 @@ module Gitlink
|
|||
if send_type.nil?
|
||||
params['text'] = "【红山开源平台】您的验证码是#{code}。如非本人操作,请忽略本短信。"
|
||||
elsif send_type == 'init_password'
|
||||
params['text'] = "【红山开源平台】您的初始密码是#{code}。登录后请及时修改密码。"
|
||||
# params['text'] = "【红山开源平台】您的初始密码是#{code}。登录后请及时修改密码。"
|
||||
params['text'] = "【红山开源平台】尊敬的用户,您好!非常感谢您注册红山开源平台www.osredm.com ,以下是您的账户信息,请妥善保管。账号:#{user_name}(用户账户名)密码:#{code}(随机生成密码)"
|
||||
elsif send_type == 'competition_start'
|
||||
params['text'] = "【红山开源平台】亲爱的#{user_name},你参与的#{name}将于#{result}开始,请及时参赛"
|
||||
elsif send_type == 'authentication_pro' || send_type == 'authentication'|| send_type == 'trial_authorization' || send_type == 'project_info'
|
||||
|
|
|
|||
Loading…
Reference in New Issue