Commit c437efde by BellCodeEditor

save project

parent 7cc96dd0
Showing with 6 additions and 3 deletions
......@@ -21,11 +21,14 @@ def register(): # 注册验证
if name=='' or password1=='' or password2=='':
messagebox.showerror('数据错误','请输入完整的数据')
elif name in b:
messagebox.showworning('用户名错误','此名字已经被其它用户注册了')
messagebox.showwarning('用户名错误','此名字已经被其它用户注册了')
elif password1 != password2:
messagebox.showworning('密码错误','确认密码不对')
messagebox.showwarning('密码错误','确认密码不对')
else:
user=[name]
user[name] = password1
content=json.dumps(b)
with open('user.txt','r',encoding='UTF-8') as file:
file.write(content)
def login(): # 登录验证
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