Skip to content

Commit

Permalink
fix: 如果手机号已存在,只是更新登录信息,收不到验证码。
Browse files Browse the repository at this point in the history
准确的说之前是不更新位置才会有此类问题。
原因:没有执行initheader
  • Loading branch information
397179459 committed Sep 9, 2024
1 parent 71beef8 commit b706cb3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions login.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ def get_cfg_token_userid(mobile):
if encrypt_mobile in sections:
print(f'[{mobile}] 已存在,将运行更新程序')
change_flag = False
initHeader_flag = False

if get_user_yn_confirm(f"是否需要修改 [{mobile}] 截止时间,[y/n],默认不修改[n]:"):
enddate = get_cfg_enddate(mobile)
Expand All @@ -118,6 +119,7 @@ def get_cfg_token_userid(mobile):

if get_user_yn_confirm(f"是否需要修改 [{mobile}] 预约位置,[y/n],默认不修改[n]:"):
province, city, location = get_cfg_location()
initHeader_flag = True

config.set(encrypt_mobile, 'province', province)
config.set(encrypt_mobile, 'city', city)
Expand All @@ -130,6 +132,8 @@ def get_cfg_token_userid(mobile):
print(f"不修改 [{mobile}] 预约位置")

if get_user_yn_confirm(f"是否需要修改 [{mobile}] token和userid,[y/n],默认不修改[n]:"):
if not initHeader_flag:
process.init_headers()
token, userid = get_cfg_token_userid(mobile)
encrypt_userid = privateCrypt.encrypt_aes_ecb(str(userid), aes_key)

Expand Down

0 comments on commit b706cb3

Please sign in to comment.