Commit 3fb8f13f by BellCodeEditor

save project

parent 96f64751
Showing with 9 additions and 7 deletions
......@@ -59,9 +59,7 @@ class Note(): # 便签、笔记
self.y += 30
app = Note()
app.show()
app.root.mainloop()
#******************************************************************************
with open("user.txt", "r", encoding="utf-8") as f:
info = f.read()
......@@ -96,11 +94,15 @@ def register(): # 注册验证
messagebox.showinfo("成功", "注册成功")
reg_to_login()
def login(): # 登录验证
def login():
global app # 登录验证
name, password = app_login.get_input()
pwd = users.get(name)
if pwd == password:
messagebox.showinfo("成功", "登录成功")
app_login.root.destroy()
app = Note()
app.show()
app.root.mainloop()
else:
messagebox.showwarning("错误", "用户名或密码错误!")
......
{"admin": "admin", "python": "123456", "xuanxuan": "201202"}
\ No newline at end of file
{"admin": "admin", "python": "123456", "xuanxuan": "201202", "122": "1"}
\ 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