Commit 0e490996 by BellCodeEditor

auto save

parent d941623e
Showing with 5 additions and 3 deletions
...@@ -28,10 +28,12 @@ def register(): # 注册验证 ...@@ -28,10 +28,12 @@ def register(): # 注册验证
messagebox.showwarning('错误','两次密码不一致!') messagebox.showwarning('错误','两次密码不一致!')
else: else:
users1[name] = password1 users1[name] = password1
con=json.dumps(users1)
with open('user.txt','w',encoding='utf-8') as f: with open('user.txt','w',encoding='utf-8') as f:
info = f.write() f.write(con)
users = json.loads(info) # users = json.loads(info)
messagebox.showinfo('成功','注册成功')
reg_to_login()
def login(): # 登录验证 def login(): # 登录验证
pass pass
......
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