bugfix
This commit is contained in:
parent
2b639c7eaf
commit
0db205d0ef
@ -100,9 +100,9 @@ class SMSEngine:
|
||||
async def send(self, stype, template_id, phone, params) -> dict:
|
||||
try:
|
||||
f = partial(self.sms_client.send_message, signature_id=self.signature_id,
|
||||
template_id=template_id,
|
||||
mobile=phone,
|
||||
content_var_dict=params)
|
||||
template_id=template_id,
|
||||
mobile=phone,
|
||||
content_var_dict=params)
|
||||
resp = await awaitify(f)()
|
||||
return await self.__validation(stype, template_id, params, phone, resp)
|
||||
except ex.BceHttpClientError as e:
|
||||
@ -173,14 +173,14 @@ class SMSEngine:
|
||||
'del_flg': '0',
|
||||
'create_at': datetime.datetime.now()
|
||||
})
|
||||
vcode = {'SMSvCode': code}
|
||||
# d = await self.send_vcode(phone, "用户注册登录验证", vcode)
|
||||
d = await self.send_vcode(phone, "用户注册登录验证", vcode)
|
||||
debug(f'{d=}, {code=}, {phone=}')
|
||||
if d['status']:
|
||||
return code_id, code
|
||||
else:
|
||||
return None
|
||||
vcode = {'SMSvCode': code}
|
||||
# d = await self.send_vcode(phone, "用户注册登录验证", vcode)
|
||||
d = await self.send_vcode(phone, "用户注册登录验证", vcode)
|
||||
debug(f'{d=}, {code=}, {phone=}')
|
||||
if d['status']:
|
||||
return code_id, code
|
||||
else:
|
||||
return None
|
||||
|
||||
async def check_sms_code(self, code_id: str, vcode: str) -> bool:
|
||||
env = ServerEnv()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user