Commit 9447f368 by BellCodeEditor

save project

parent 7a4d93c2
Showing with 7 additions and 4 deletions
......@@ -16,8 +16,8 @@ def reg_to_login(): # 注册界面转登录界面
app_login=My_register()
app_login.show()
def register(): # 注册验证
name,password1,password2=app_reg.get_input()
if name =="" or password1=="" or password2==""
name,password1,password2 = app_reg.get_input()
if name == "" or password1 == "" or password2 == ""
messagebox.showwarning("警告","请输入新的注册资料")
elif name in users:
messagebox.showwarning("错误","请填写完整的注册资料")
......@@ -26,8 +26,11 @@ def register(): # 注册验证
else:
users[name]=password1
content=json.dumps(users)
with open as target:
pass
with open ("user,txt","w",encoding="utf-8" )as file:
file.write(content)
messagebox.showinfo("成功","注册成功)
reg_to_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