|
|
@@ -27,7 +27,7 @@ class GetWxQRCodeRequest(BaseModel): |
|
|
|
|
|
|
|
|
|
|
|
class LogincCaptchCode(BaseModel): |
|
|
|
tokenId: str |
|
|
|
tel: str |
|
|
|
captchCode:str |
|
|
|
|
|
|
|
@agent_router.post("/getlogin", response_model=None) |
|
|
@@ -108,7 +108,7 @@ async def waitting_login_result(request: Request, token_id, app_id,region_id, ag |
|
|
|
break |
|
|
|
|
|
|
|
logger.info(f"{token_id} 使用 {app_id},等待扫码登录,二维码有效时间 {150 - int(now - start_time)} 秒") |
|
|
|
captch_code = await request.app.state.gewe_service.get_login_wx_captch_code_from_cache_async(token_id) |
|
|
|
captch_code = await request.app.state.gewe_service.get_login_wx_captch_code_from_cache_async(agent_tel) |
|
|
|
captch_code= captch_code if captch_code else '' |
|
|
|
logger.info(f"{token_id} 使用 {app_id} 的验证码 {captch_code}") |
|
|
|
ret,msg,res = await request.app.state.gewe_service.check_login_async(token_id, app_id, uuid,captch_code) |
|
|
@@ -202,7 +202,7 @@ async def waitting_login_result(request: Request, token_id, app_id,region_id, ag |
|
|
|
|
|
|
|
@agent_router.post("/logincaptchcode", response_model=None) |
|
|
|
async def login_captch_code(request: Request, body: LogincCaptchCode, ): |
|
|
|
token_id = body.tokenId |
|
|
|
tel = body.tel |
|
|
|
captch_code=body.captchCode |
|
|
|
res=await request.app.state.gewe_service.save_login_wx_captch_code_to_cache_async(token_id,captch_code) |
|
|
|
res=await request.app.state.gewe_service.save_login_wx_captch_code_to_cache_async(tel,captch_code) |
|
|
|
return {'message': '操作成功'} |