Commit 4bfa4b47 by BellCodeEditor

save project

parent 2e9c70dc
Showing with 5 additions and 2 deletions
...@@ -25,6 +25,11 @@ def register(): # 注册验证 ...@@ -25,6 +25,11 @@ def register(): # 注册验证
tkinter.messagebox.showwarning("警告","两次密码不一致") tkinter.messagebox.showwarning("警告","两次密码不一致")
elif name in text_1: elif name in text_1:
tkinter.messagebox.showerror("错误","用户名已存在") tkinter.messagebox.showerror("错误","用户名已存在")
else:
tkinter.messagebox.showinfo("提示","注册成功")
text_1[name]=password1
with open("user.txt","w",encoding="utf-8") as f:
f.write(str(text_1))
......
{"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