jindong_user ="xiong"
jingdong_password = "ok"
weixing_user = "abc"
weixing_password = "123"
pass_logon = False
def logon(f):
def inner():
global pass_logon
if not pass_logon:
logon_rule=int(input("输入1用微信登录,输入2用京东账号登录:"))
if logon_rule == 1:
passs_user = input("微信账户:")
pass_password = input("微信密码:")
if passs_user == weixing_user and pass_password == weixing_password:
print("welcome")
f()
pass_logon=True
else:
print("密码错误")
elif logon_rule == 2:
pass_user = input("京东账号:")
pass_password = input("京东账号密码:")
if pass_user==jindong_user and pass_password==jingdong_password:
print("welcome")
f()
pass_logon=True
else:
print("密码错误")
else:
print("没有此选项")
else:
print("welcome")
f()
return inner