Commit 70975396 by BellCodeEditor

save project

parent 4313342d
Showing with 3 additions and 2 deletions
......@@ -24,8 +24,9 @@ def register():
messagebox.showwarning("错误","用户名已存在!")
elif password1 != password2:
messagebox.showwarning("错误","两次密码不一致!")
else:users[name]=json.dumps(users)
content=json.dumps(users)
else:
users[name]=json.dumps(users)
content = json.dumps(users)
with open("user.txt","w",encoding="utf-8") as file:
file.write(content)
messagebox.showinfo("成功","注册成功")
......
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