Commit 0a1b9b20 by BellCodeEditor

save project

parent b49ae223
Showing with 10 additions and 3 deletions
......@@ -14,7 +14,7 @@ def login_to_reg(): # 登录界面转注册界面
app_reg.show()
def reg_to_login(): # 注册界面转登录界面
app_reg.roct.destroy()
app_reg.root.destroy()
global app_login
app_login = My_register()
app_login.show()
......@@ -29,6 +29,13 @@ def register(): # 注册验证
messagebox.showerror("错误","密码的内容不一致")
else:
users[name] = password1
content = json.dumps(users)
with open("user.txt","w",encoding="utf-8") as f1:
f1.write(content)
messagebox.showinfo("提示","注册成功")
reg_to_login()
def login(): # 登录验证
pass
......
{"admin": "123456"}
\ No newline at end of file
{"admin": "123456", "313": "123", "1": "1", "2": "2", "11": "2"}
\ 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