Commit 50c55173 by BellCodeEditor

save project

parent 2d9ba145
Showing with 4 additions and 5 deletions
......@@ -65,7 +65,6 @@ class Note(): # 便签、笔记
with open("user.txt", "r", encoding="utf-8") as f:
info = f.read()
users = json.loads(info)
......@@ -106,8 +105,8 @@ def register(): # 注册验证
def login(): # 登录验证
global app,alist
name, password = app_login.get_input()
pwd = users.get(name)
if pwd == password:
user_name = users.get(name)
if user_name != None and user_name["password"]==password:
alist = users[name]["event"]
app_login.root.destroy()
app = Note()
......
{"admin": "admin", "python": "123456", "dfefdvdfvdf": "123456", "\u6211": "123456", "a": {"password": "12", "event": ["\u63d0\u793a\u4e00", "\u63d0\u793a\u4e8c"]}}
\ No newline at end of file
{"admin": "admin", "python": "123456", "dfefdvdfvdf": "123456", "\u6211": "123456", "a": {"password": "12", "event": ["\u63d0\u793a\u4e00", "\u63d0\u793a\u4e8c"]}, "aa": {"password": "1", "event": ["\u63d0\u793a\u4e00", "d000"]}}
\ 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