最新版本
This commit is contained in:
@@ -22,6 +22,7 @@ from .aliyun_sms import send_verification_sms, verify_sms_code
|
||||
# 定义积分奖励值
|
||||
REWARD_POINTS = 50 # 例如奖励50积分
|
||||
|
||||
|
||||
def check_and_reward_points(user, openid):
|
||||
"""
|
||||
根据 openid 查询原系统会员状态,为原系统的用户增加一天会员时长(不论是否为会员)。
|
||||
@@ -151,7 +152,7 @@ def send_verification_email_view(request):
|
||||
if request.method == 'POST':
|
||||
try:
|
||||
body = json.loads(request.body)
|
||||
email = body.get('phone_number')
|
||||
email = body.get('email')
|
||||
if not email:
|
||||
return JsonResponse({'code': 400, 'message': '邮箱地址是必须的'})
|
||||
|
||||
@@ -193,8 +194,8 @@ def send_verification_sms_view(request):
|
||||
if not phone_number:
|
||||
return JsonResponse({'code': 400, 'message': '手机号码是必须的'})
|
||||
|
||||
sign_name = "福铭科技" # 替换为实际的签名名称
|
||||
template_code = "SMS_299200388" # 替换为实际的短信模板代码
|
||||
sign_name = "光映" # 替换为实际的签名名称
|
||||
template_code = "SMS_473670066" # 替换为实际的短信模板代码
|
||||
|
||||
response = send_verification_sms(phone_number, sign_name, template_code)
|
||||
return JsonResponse(response)
|
||||
@@ -379,7 +380,7 @@ def send_verification_code_view(request):
|
||||
if '@' in identifier:
|
||||
response = send_verification_email(identifier)
|
||||
else:
|
||||
response = send_verification_sms(identifier, "福铭科技", "SMS_299200388")
|
||||
response = send_verification_sms(identifier, "光映", "SMS_473670066")
|
||||
|
||||
return JsonResponse(response)
|
||||
except json.JSONDecodeError:
|
||||
|
||||
Reference in New Issue
Block a user