Commit 4eb1d2f2 by BellCodeEditor

save project

parent 91b88599
Showing with 8 additions and 8 deletions
import tkinter
import json
from tkinter import messagebox
import json
with open("user.txt",'r',encoding="utf-8") as file1:
info = file1.read()
......@@ -29,14 +28,13 @@ def register(): # 注册验证
messagebox.showwarning("警告","用户密码名不一致")
else:
users[name] = password1
content = json.dumps(users)
content2 = json.dumps(users)
with open("user.txt",'w',encoding="utf-8") as file2:
file2.write(content)
messagebox.showinfo("成功","注册成功")
file2.write(content2)
messagebox.showinfo("成功","登录成功")
def login(): # 登录验证
pass
name,password = app_login
class My_login(): # 登录窗口
def __init__(self):
self.root = tkinter.Tk()
......
{"admin": "123456"}
\ 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