Commit bb3e547e by BellCodeEditor

save project

parent 806787fa
Showing with 7 additions and 6 deletions
......@@ -16,14 +16,17 @@ def reg_to_login(): # 注册界面转登录界面
def register(): # 注册验证
name,password1,password2 = app_reg.get_input()
if name ==""or password1 ==""or password2 =="":
messagebox.showwararing("警告","请填写完整的注册信息")
if name =="" or password1 =="" or password2 =="":
messagebox.showwarning("警告","请填写完整的注册信息")
elif name in users:
messagebox.showwararing("错误","用户名已存在!")
messagebox.showwarning("错误","用户名已存在!")
elif password1 != password2:
messagebox.showwararing("错误","两次密码不同!")
messagebox.showwarning("错误","两次密码不同!")
else:
users[name] = password1
conten = json.dumps(users)
with open('user.txt','w',encoding='utf-8')as f:
file.write(content)
def login(): # 登录验证
pass
......
{"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