Commit 9697cd3f by BellCodeEditor

auto save

parent 99296199
Showing with 6 additions and 4 deletions
...@@ -29,8 +29,10 @@ def register(): # 注册验证 ...@@ -29,8 +29,10 @@ def register(): # 注册验证
messagebox.showerror("ERROR","密码不一致") messagebox.showerror("ERROR","密码不一致")
else: else:
users[name] = pd1 users[name] = pd1
messagebox.showerror("失败","注册失败") content = json.dumps(users)
with open('user.txt','w',encoding='utf-8') as f:
f.write(content)
messagebox.showinfo("恭喜","注册成功!")
def login(): # 登录验证 def login(): # 登录验证
pass pass
......
{"admin": "123456"} {"admin": "123456", "wx461961": "123456", "1": "1", "2": "2"}
\ 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