Commit f19098a4 by BellCodeEditor

save project

parent 2459c9b9
Showing with 9 additions and 9 deletions
......@@ -19,21 +19,21 @@ def reg_to_login(): # 注册界面转登录界面
app_login.show()
def register(): # 注册验证
name,password1,passwork2 = app_reg.get_input()
if name == "" or password1 =="" or passwork2=="":
name,password1,password2 = app_reg.get_input()
if name == "" or password1 =="" or password2=="":
messagebox.showwarning("警告","请填写完整的注册资料")
eilf name in nsers:
elif name in users:
messagebox.showwarning("错误","用户名不存在")
eilf password1 != passwork2
elif password1 != password2:
messagebox.showwarning("错误","两次密码不一致")
eles:
else:
users[name] = password1
content = json.dumps(users)
with open("user.txt","w",encoding="utf_8") as file:
file.write(content)
messagebox.showinfo("成功""注册OK")
messagebox.showinfo("成功","注册OK")
login_show()
def login(): # 登录验证
pass
......
{"admin": "123456"}
\ No newline at end of file
{"admin": "123456", "abc": "123", "asd": "112233"}
\ 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