Commit aebcedf9 by BellCodeEditor

save project

parent 3db0279d
Showing with 4 additions and 2 deletions
...@@ -90,8 +90,10 @@ def register(): # 注册验证 ...@@ -90,8 +90,10 @@ def register(): # 注册验证
elif password1 != password2: elif password1 != password2:
messagebox.showwarning("错误", "两次密码不一致!") messagebox.showwarning("错误", "两次密码不一致!")
else: else:
users[name] = password1 user_info = {}
content = json.dumps(users) user_info["password"] = password1
user_info["event"] = ["提示1,可以从输入进任务",
"2,点框,删除" ]
with open("user.txt", "w", encoding="utf-8") as file: # "w"每次写入都覆盖原来的内容 with open("user.txt", "w", encoding="utf-8") as file: # "w"每次写入都覆盖原来的内容
file.write(content) file.write(content)
# 注册成功,跳往登陆界面 # 注册成功,跳往登陆界面
......
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