Commit 53d7c0b9 by BellCodeEditor

auto save

parent 1ad5587b
Showing with 4 additions and 6 deletions
......@@ -20,16 +20,16 @@ def reg_to_login(): # 注册界面转登录界面
def register(): # 注册验证
name,password1,password2=app_reg.get_input()
if name ==""or password1==""or password2=="":
if name =="" or password1=="" or password2=="":
messagebox.showwarning("警报","没病吧")
elif name in users:
messagebox.showwarning("警报","没病吧")
elif password != password2:
elif password1 != password2:
messagebox.showwarning("警报","没病吧")
else:
users[name]=password1
contert=json.dumps(users)
with open("user.txt","w",encoding="utf-8")as file:
content=json.dumps(users)
with open("user.txt","w",encoding="utf-8") as file:
file.write(content)
messagebox.showinfo("成功","注册成功")
login_show()
......
{"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