예제 #1
0
파일: src.py 프로젝트: szk5043/python
def register():
    '''用户注册'''
    while True:
        username = input('请输入用户名: ').strip()
        password = input('请输入密码:').strip()
        conf_password = input('请再输入一次密码:').strip()
        if password == conf_password:
            flag = user.register_interface(username, password)
            if flag:
                break
예제 #2
0
def register():
    while True:
        name = input('请输入注册用户:').strip()
        pwd = input('请输入用户密码:').strip()
        flag, msg = user.register_interface(name, pwd)
        if flag:
            print(msg)
            break
        else:
            print(msg)
예제 #3
0
def register():
    print("欢迎来到注册模块")

    username, pwd = common.input_username_pwd()
    flag = common.check_user(username)  #先判断是否存在
    if flag:
        print("无需注册,用户已经存在")
    else:
        msg = user.register_interface(username, pwd)  # 调用注册接口
        print(msg)
예제 #4
0
def register():
    print('欢迎来到注册功能')
    count = 0
    while count < 3:
        username, pwd = common.input_username_pwd()

        flag, msg = user.register_interface(username, pwd)
        # 判断是否注册成功
        print(msg)
        if flag:
            logger.info(f'{username}注册成功')
            break
        count += 1
예제 #5
0
파일: src.py 프로젝트: wickteam/ATM
def register():
    while True:
        username = input('请输入用户名:').strip()
        password = input('请输入密码:').strip()
        re_password = input('请再次输入密码:').strip()

        if password == re_password:
            flag, msg = user.register_interface(username, password)
            if flag:
                print(msg)
                break
            else:
                print(msg)
예제 #6
0
파일: src.py 프로젝트: AliceMye/www
def register():
    while True:
        # logger_return = common.get_logger('用户注册功能')
        name = input("输入用户姓名>>>:").strip()
        pwd = input("输入用户密码>>>:").strip()
        confirm_pwd = input("再次输入密码>>>:").strip()
        if pwd == confirm_pwd:
            flag, msg = user.register_interface(name, pwd)
            if flag:
                print(msg)
                # logger_return.debug('[%s]用户注册了我们的ATM网站'%user_info['name'])
                break
            else:
                print(msg)
예제 #7
0
파일: src.py 프로젝트: sanqiansi/yangbin
def register():
    print('注册')
    if user_info['name']:
        print('您已经登录过了,不能注册')
        return
    while True:
        name = input('请输入用户名:').strip()
        password = input('请输入密码').strip()
        conf_pwd = input('请确认密码').strip()
        if password == conf_pwd:
            flag, msg = user.register_interface(name, password)
            if flag:
                print(msg)
                break
            else:
                print(msg)
예제 #8
0
def register():
    print('注册界面'.center(20, '-'))
    while True:
        name = input("请设置用户名:")
        info = user.check_user_interface(name)
        # info接收到False,if为真则退出,否则继续注册
        if not info:
            break
        pwd = input("请设置密码:")
        conf_pwd = input("请再次确认密码:")
        if pwd == conf_pwd:
            flag, msg = user.register_interface(name, pwd)
            if flag:
                print(msg)
                break
        else:
            print('两次密码不一致,请确认!')
예제 #9
0
def register():
    if user_info['name']:
        print('已登录!')
        return
    print('注册')
    while True:
        name = input('请输入用户名(输入q退出):').strip()
        if name == 'q': break
        password = input('请输入密码:').strip()
        password1 = input('请确认密码:').strip()
        if password == password1:
            flag, msg = user.register_interface(name, password)
            if flag:
                print(msg)
                user_info['name'] = name
                break
            else:
                print(msg)
예제 #10
0
def register():
    print("注册..")
    while True:
        name = input("请输入用户名:").strip()
        flag = user.check_name_interface(name)
        if flag:
            print("用户已存在!")
            continue
        pwd = input("请输入密码;").strip()
        re_pwd = input("请再次输入密码:").strip()
        if re_pwd == pwd:
            msg = user.register_interface(name, pwd)
            if msg:
                print(msg)
                break
            else:
                print("注册失败!")
        else:
            print("两次输入的密码不一致!")
예제 #11
0
def register():
    print('注册')
    if user_data['name']:
        print('您已经登陆了')
        return
    while True:
        name = input('请输入名字:').strip()
        if name == 'q': break
        password = input('请输入密码').strip()
        conf_password = input('请确认密码').strip()
        if password == conf_password:
            flag, msg = user.register_interface(name, password)
            if flag:
                print(msg)
                break
            else:
                print(msg)
        else:
            print('两次密码不一致')
예제 #12
0
def register():
    """
    注册功能
    """
    print('---------\n欢迎注册\n---------\n')
    while True:
        user_name = input('请输入用户名:').strip()
        user_pwd = input('请输入密码:').strip()
        conf_pwd = input('请确认密码:').strip()
        if user_pwd == conf_pwd:
            flag, msg = user.register_interface(user_name, user_pwd)
            if flag:
                print(msg)
                break
            else:
                print(msg)
                continue
        else:
            print("两次输入不一致")
예제 #13
0
def register():
    while True:
        if user_data['name']:
            print('您已经登入了')
            return
        name = input("请输入名字:>>").strip()
        passwrod = input('请输入密码:>>').strip()
        repeat_passwrod = input('重复输入密码:>>').strip()
        if name is None or passwrod is None:
            print('用户名和密码不能为空')
            continue
        if passwrod == repeat_passwrod:
            flag, msg = user.register_interface(name, passwrod)
            if flag:
                print(msg)
                break
            else:
                print(msg)
        else:
            print('两次密码不一致')
예제 #14
0
def register():
    """
    用户注册
    """
    print("欢迎来到注销页面\n")
    count = 0
    while count < 3:
        # 输入用户信息
        reg_username, pwd = common.input_usernmae_pwd()

        # 实现用户注册
        flag, msg = user.register_interface(reg_username, pwd)
        print(msg)
        if flag:
            logger.info(f'{reg_username}--{msg}')
            break

        count += 1
        if count == 3:
            print("三次机会已用完!")
예제 #15
0
def register():
    while 1:
        user_name = input('user_name:>>').strip()
        if user_name == 'q':
            break
        password = input('password:>>').strip()
        again_password = input('again_password:>>').strip()
        if password != again_password:
            print('密码输入不一致,请重新输入...')
            continue
        # user_dic = {
        #     'name': user_name,
        #     'password': password,
        #     'balance': None,
        # }

        flag, msg = user.register_interface(user_name, password)
        if flag:
            print(msg)
            break
        else:
            print(msg)
예제 #16
0
def register():
    print("注册功能")
    if user_info["name"]:
        user_log.info("%s已经有账号了,不能在注册了" % user_info['name'])
        print("您已经登录了,不能注册")
    while True:
        name = input("请输入用户名:").strip()
        password = input("请输入密码:").strip()
        conf_password = input("请确认密码:").strip()
        if password == conf_password:
            flag, msg = user.register_interface(name, password)
            if flag:
                user_log.info("%s账户已经注册成功" % name)
                print(msg)

                break
            else:
                print(msg)
                break
        else:
            print("密码不正确")
            continue
예제 #17
0
파일: src.py 프로젝트: shx-1999/ATM
def register():
    '''
    注册.
    :return:
    '''
    print('注册。。。')
    if user_data['name']:
        print('你已经登入过了')
    while True:
        name = input('请输入用户名>>:').strip()
        if name.lower() == 'q': break
        password = input('请输入密码>>:').strip()
        password2 = input('再次输入密码>>:').strip()
        if password == password2:
            flag, msg = user.register_interface(name, password)
            if flag:
                print(msg)
                break
            else:
                print('用户已存在')
        else:
            print('两次密码不一致')
예제 #18
0
파일: src.py 프로젝트: TankJam/ATM
def register():
    print('注册...')
    while True:
        name = input('请输入用户名: ').strip()
        pwd = input('请输入密码: ').strip()
        conf_pwd = input('请输入密码: ').strip()
        # 小的逻辑处理
        if pwd == conf_pwd:
            # res = user.register_interface(name, pwd)
            # flag = res[0]
            # msg = res[1]
            flag, msg = user.register_interface(name, pwd)

            # if True:
            #     print(注册成功)
            # eles:
            # print(用户已存在)
            if flag:
                print(msg)
                break

            else:
                print(msg)
예제 #19
0
def register():
    print("register")
    if user_data["name"]:
        print("you have login")
        return

    while True:
        user_name = input("please input the user_name").strip()

        password = input("please input the password").strip()
        password_again = input("please input the password again").strip()

        if password == password_again:
            flg, msg = user.register_interface(user_name, password)

            if flg:
                print(msg)
                break
            else:
                print(msg)

        else:
            print("the two password is not same")
예제 #20
0
def register():
    print("register")
    if user_data["name"]:
        print("you have loged in")
        return

    while True:
        name = input("please input your name").strip()

        if name == 'q':
            break

        password = input("input your password").strip()
        conf_password = input("confim your password").strip()
        if password == conf_password:
            flg, msg = user.register_interface(name, password)
            if flg:
                print(msg)
                break
            else:
                print(msg)

        else:
            print("the passwords are not same")
예제 #21
0
def register():
    username = input('请输入账号')
    pwd = input('请输入密码')
    msg = user.register_interface(username, pwd)
    print(msg)