Commit c0fcf8f4 by BellCodeEditor

save project

parent 50b30140
Showing with 19 additions and 3 deletions
import tkinter import tkinter
from tkinter import messagebox
import json
with open("user.txt","r",encoding="utf-8") as f2:
info = f2.read()
zd = json.loads(info)
def login_to_reg(): # 登录界面转注册界面 def login_to_reg(): # 登录界面转注册界面
app_login.root.destroy() app_login.root.destroy()
...@@ -7,11 +13,21 @@ def login_to_reg(): # 登录界面转注册界面 ...@@ -7,11 +13,21 @@ def login_to_reg(): # 登录界面转注册界面
app_reg.show() app_reg.show()
def reg_to_login(): # 注册界面转登录界面 def reg_to_login(): # 注册界面转登录界面
app_reg.root.destroy()
global app_login
app_login=My_login()
app_login.show()
def register(): # 注册验证 def register(): # 注册验证
pass name, mima1,mima2 = app_reg.get_input()
if name=="" or mima1=="" or mima2=="":
messagebox.showwarning("警告","请填写完整的注册信息")
elif name in zd:
messagebox.showerror("错误","此有户已被注册")
elif mima1 != mima2:
messagebox.showerror("错误","两次密码不一致")
else:
zd[mame] = mima1
def login(): # 登录验证 def login(): # 登录验证
pass pass
......
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