Commit 7190456e by BellCodeEditor

auto save

parent 36e08179
Showing with 3 additions and 2 deletions
import tkinter
from tkinter import messagebox
import json
with open("user.txt","r",encoding="utf-8") as file:
info = f.read()
info = file.read()
users = json.loads(info)
def login_to_reg(): # 登录界面转注册界面
......@@ -29,7 +30,7 @@ def register(): # 注册验证
users[name] = password1
content = json.dumps(users)
with open("user.txt","w",encoding="utf-8") as file:
file.wirte(content)
file.wirte(content)
messagebox.showinfo("成功","注册成功")
reg_to_login()
def login(): # 登录验证
......
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