Commit 83d087b2 by BellCodeEditor

save project

parent 8b427a36
Showing with 12 additions and 5 deletions
import tkinter
with open('user.txt','r',encoding='utf-8') as f:
info=f.read()
users=json.loads(info)
#with open('user.txt','r',encoding='utf-8') as f:
#info=f.read()
#users=json.loads(info)
def login_to_reg(): # 登录界面转注册界面
app_login.root.destroy()
global app_reg
......@@ -10,7 +10,7 @@ def login_to_reg(): # 登录界面转注册界面
def reg_to_login(): # 注册界面转登录界面
app_reg.root.destroy()
global app_reg
global app_login
app_login=My_register()
app_login.show()
......@@ -22,7 +22,14 @@ def register(): # 注册验证
messagebox.showwarning('错误','已存在')
elif password1 != password2:
messagebox.showwarning('错误','不一致')
el
else:
users[name]=password1
content=json.dumps(urers)
with open('user.txt','r',encoding='utf-8') as file:
file.write(content)
messagebox.showwarning('成功')
login_show()
def 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