Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
level3-lesson18-diy2
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
c437efde
authored
Jun 10, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
7cc96dd0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
my_app.py
my_app.py
View file @
c437efde
...
@@ -21,11 +21,14 @@ def register(): # 注册验证
...
@@ -21,11 +21,14 @@ def register(): # 注册验证
if
name
==
''
or
password1
==
''
or
password2
==
''
:
if
name
==
''
or
password1
==
''
or
password2
==
''
:
messagebox
.
showerror
(
'数据错误'
,
'请输入完整的数据'
)
messagebox
.
showerror
(
'数据错误'
,
'请输入完整的数据'
)
elif
name
in
b
:
elif
name
in
b
:
messagebox
.
showw
o
rning
(
'用户名错误'
,
'此名字已经被其它用户注册了'
)
messagebox
.
showw
a
rning
(
'用户名错误'
,
'此名字已经被其它用户注册了'
)
elif
password1
!=
password2
:
elif
password1
!=
password2
:
messagebox
.
showw
o
rning
(
'密码错误'
,
'确认密码不对'
)
messagebox
.
showw
a
rning
(
'密码错误'
,
'确认密码不对'
)
else
:
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
():
# 登录验证
def
login
():
# 登录验证
pass
pass
...
...
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