Commit a3c23059 by BellCodeEditor

save project

parent c724edcd
Showing with 2 additions and 2 deletions
......@@ -22,13 +22,13 @@ def register(): # 注册验证
name,password1,password2=app_reg.get_input()
if name=="" or password1=="" or password2=="":
messagebox.showwarning("警告","请填写完整的资料")
elif name in uses:
elif name in users:
messagebox.showwarning("错误","用户已经存在")
elif password2 != password1:
messagebox.showwarning("错误","两次填写不正确")
else:
uses[name]=password1
con=json.dump(uses)
con=json.dump(users)
with open("user.txt","w",encoding="utf-8")as filo:
filo.write(con)
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