Commit 403dd3e5 by BellCodeEditor

save project

parent 40af6fff
Showing with 1 additions and 2 deletions
...@@ -25,6 +25,7 @@ def register(): ...@@ -25,6 +25,7 @@ def register():
elif password1 != password2: elif password1 != password2:
messagebox.showwarning("错误","两次密码不一致!") messagebox.showwarning("错误","两次密码不一致!")
else:users[name]=json.dumps(users) else:users[name]=json.dumps(users)
content=json.dumps(users)
with open("user.txt","w",encoding="utf-8") as file: with open("user.txt","w",encoding="utf-8") as file:
file.write(content) file.write(content)
messagebox.showinfo("成功","注册成功") messagebox.showinfo("成功","注册成功")
......
{"admin": "123456"}
\ 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