コード例 #1
0
ファイル: credit_card.py プロジェクト: gains21cn/ATM
                    "", today, common.numtochr(weekoftoday)))
        else:
            print(
                template.index_logined_menu.format(
                    "欢迎您: {0}".format(curruser.name), today,
                    common.numtochr(weekoftoday)))

        choose = common.input_msg("选择功能编号[1-5]: ",
                                  ("1", "2", "3", "4", "5")).strip()
        if choose == "5":
            exitflag = True
            continue

        # 1 购物商城
        if choose == "1":
            curruser.db_load()
            doshopping(curruser)

        # 2 用户登录
        if choose == "2":
            curruser.db_load()
            user_login(curruser, today, weekoftoday)

        # 3 信用卡管理
        if choose == "3":
            card_center(curruser)

        # 4 后台管理
        if choose == "4":
            manager(curruser)
コード例 #2
0
ファイル: day5_credit_card.py プロジェクト: b02330224/oldboy
    while not exitflag:
        # 如果用户登录了,显示登录的界面; 未登录显示未登录的界面
        if not curruser.islogin:
            print(template.index_default_menu.format("", today, common.numtochr(weekoftoday)))
        else:
            print(template.index_logined_menu.format("欢迎您: {0}".format(curruser.name), today,
                                                     common.numtochr(weekoftoday)))

        choose = common.input_msg("选择功能编号[1-5]: ", ("1", "2", "3", "4", "5")).strip()
        if choose == "5":
            exitflag = True
            continue

        # 1 购物商城
        if choose == "1":
            curruser.db_load()
            doshopping(curruser)

        # 2 用户登录
        if choose == "2":
            curruser.db_load()
            user_login(curruser, today, weekoftoday)

        # 3 信用卡管理
        if choose == "3":
            card_center(curruser)

        # 4 后台管理
        if choose == "4":
            manager(curruser)