Commit 97ed7f0f by BellCodeEditor

save project

parent 8396995c
Showing with 9 additions and 4 deletions
...@@ -26,11 +26,16 @@ def register(): # 注册验证 ...@@ -26,11 +26,16 @@ def register(): # 注册验证
messagebox.showwarning('警告','用户名已存在') messagebox.showwarning('警告','用户名已存在')
else: else:
users[name] = password1 users[name] = password1
content = users content = json.dumps(users)
with open ("user.txt","w",encoding = 'utf-8') as file:
file.wirte(content)
messagebox.showwarning('警告','已成功注册') messagebox.showwarning('警告','已成功注册')
def login(): # 登录验证 def login(): # 登录验证
pass name,password = app_login.get_input()
pwd = users.get(name)
if pwd == name and
#qwertyuioplkjhgfdsazxcvbnm,./';[]=-0987654321`
class My_login(): # 登录窗口 class My_login(): # 登录窗口
def __init__(self): def __init__(self):
......
{"admin": "123456"} {"admin": "123456",''}
\ No newline at end of file \ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment