Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson3-3_DIY1
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d2ef3380
authored
Jun 18, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
c1b7cb86
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
0 deletions
1.py
user.py
user.test.py
user.txt
1.py
View file @
d2ef3380
import
tkinter
import
tkinter
from
tkinter
import
messagebox
from
tkinter
import
messagebox
import
json
with
open
(
"user.txt"
,
"r"
,
encoding
=
"utf-8"
)
as
f
:
info
=
f
.
read
()
users
=
json
.
loads
(
info
)
def
login_to_reg
():
def
login_to_reg
():
app_login
.
root
.
destroy
()
app_login
.
root
.
destroy
()
global
app_reg
global
app_reg
...
@@ -16,6 +21,8 @@ def register(): # 注册验证
...
@@ -16,6 +21,8 @@ def register(): # 注册验证
name
,
a
,
a1
=
app_reg
.
get_input
()
name
,
a
,
a1
=
app_reg
.
get_input
()
if
name
==
""
or
a
==
""
or
a1
==
""
:
if
name
==
""
or
a
==
""
or
a1
==
""
:
messagebox
.
showwarning
(
"警告"
,
"请输入完整信息"
)
messagebox
.
showwarning
(
"警告"
,
"请输入完整信息"
)
elif
name
in
users
:
messagebox
.
showwarning
(
"警告"
,
"用户名已存在"
)
def
login
():
# 登录验证
def
login
():
# 登录验证
pass
pass
...
...
user.py
0 → 100644
View file @
d2ef3380
user.test.py
0 → 100644
View file @
d2ef3380
(
"张三"
:
123
)
\ No newline at end of file
user.txt
0 → 100644
View file @
d2ef3380
{"张三":123}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment