Commit 1182cd80 by BellCodeEditor

auto save

parent c437efde
Showing with 5 additions and 4 deletions
...@@ -25,9 +25,10 @@ def register(): # 注册验证 ...@@ -25,9 +25,10 @@ def register(): # 注册验证
elif password1 != password2: elif password1 != password2:
messagebox.showwarning('密码错误','确认密码不对') messagebox.showwarning('密码错误','确认密码不对')
else: else:
user[name] = password1 b[name] = password1
messagebox.showinfo('成功','注册成功')
content=json.dumps(b) content=json.dumps(b)
with open('user.txt','r',encoding='UTF-8') as file: with open('user.txt','w',encoding='UTF-8') as file:
file.write(content) file.write(content)
def login(): # 登录验证 def login(): # 登录验证
pass pass
......
{"admin": "123456"} {"admin": "123456", "1": "1", "4": "6", "0": "0"}
\ No newline at end of file \ 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