Commit 979dd28a by BellCodeEditor

save project

parent 456c53ec
Showing with 8 additions and 5 deletions
......@@ -19,16 +19,21 @@ def reg_to_login(): # 注册界面转登录界面
def register(): # 注册验证
name,password1,password2=app_reg.get_input()
if name==''or password1=='' or password2=='':
massagebox.showwarning('警告,输入完整信息有误')
messagebox.showwarning('警告,输入完整信息有误')
elif name in user:
messagebox.showwarning('名字重复')
elif password1!=password2:
messagebox.showwarning('两次输入密码不一致')
else:
user[name]=password1
content=json.dumps(user)
with open('user.txt','w',encoding='utf-8')as file:
file.write(content)
messagebox.showinfo('注册成功')
reg_to_login()
def login(): # 登录验证
pass
pass
class My_login(): # 登录窗口
def __init__(self):
......
{"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