rbac/wwwroot/gen_sms_code.dspy
2026-03-21 09:35:56 +08:00

19 lines
367 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

phone = params_kw.cellphone
if phone is None:
return {
"status": "error",
"data":{
"message": "没有收到手机号"
}
}
# 使用短信模块发布的sms_engine实例生成验证码参数手机号
id, code = await sms_engine.generate_sms_code(phone)
debug(f'ret')
return {
"status": "ok",
"data": {
"message": "短信码已生成",
"id": id
}
}