Commit 1af571ed by BellCodeEditor

save project

parent 3a501b02
Showing with 2 additions and 2 deletions
...@@ -3,7 +3,7 @@ from tkinter import messagebox ...@@ -3,7 +3,7 @@ from tkinter import messagebox
import json import json
with open("user.txt","r",encoding="utf-8") as f: with open("user.txt","r",encoding="utf-8") as f:
info=f.read() info=f.read()
users=json_login(info) users=json.loads(info)
def login_to_reg(): # 登录界面转注册界面 def login_to_reg(): # 登录界面转注册界面
app_login.root.destroy() app_login.root.destroy()
global app_reg global app_reg
...@@ -28,7 +28,7 @@ def login(): # 登录验证 ...@@ -28,7 +28,7 @@ def login(): # 登录验证
with open("user.txt","w",encoding="utf-8") as file: with open("user.txt","w",encoding="utf-8") as file:
file.write(content) file.write(content)
messagebox.showinfo("成功","注册成功") messagebox.showinfo("成功","注册成功")
login_show() reg_to_login()
class My_login(): # 登录窗口 class My_login(): # 登录窗口
def __init__(self): def __init__(self):
self.root = tkinter.Tk() self.root = tkinter.Tk()
......
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