Commit 1e75903f by BellCodeEditor

save project

parent a665a5fb
Showing with 13 additions and 6 deletions
......@@ -43,6 +43,9 @@ class Note(): # 便签、笔记
def remove(self):
num=self.v.get()
alist.pop(num)
content = json.dumps(users)
with open("user.txt", 'w', encoding="utf-8") as file:
file.write(content)
self.canvas.destroy()
self.show()
......@@ -54,6 +57,9 @@ class Note(): # 便签、笔记
self.v=tkinter.IntVar()
if info != "":
alist.append(info)
content = json.dumps(users)
with open("user.txt", 'w', encoding="utf-8") as file:
file.write(content)
self.canvas.create_text(40,self.y,text=info,font=("宋体",11),
anchor=W, fill='#FF9900')
dx = tkinter.Radiobutton(self.canvas,image=self.im,value=self.v2,variable=self.v,command=self.remove)
......@@ -104,12 +110,13 @@ def register(): # 注册验证
reg_to_login()
def login(): # 登录验证
global app
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:
app_login.root.destroy()
app = Note()
alist=user_name['event']
app=Note()
app.show()
app.root.mainloop()
......
{"admin": "admin", "python": "123456", "ef": "1", "we": {"password": "12", "event": ["\u63d0\u793a1", "\u63d0\u793a2"]}}
\ No newline at end of file
{"admin": "admin", "python": "123456", "ef": "1", "we": {"password": "12", "event": ["\u63d0\u793a1", "\u63d0\u793a2", "1120"]}}
\ 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