else: print('输入错误,请重新输入') pass else: input("输入错误,按任意键继续") else: input("输入错误,按任意键继续") if __name__ == '__main__': # 程序主入口 # 创建购物车对象 goods = goods(conf.goods_file) # 常见客户对象 customer = customer(conf.customer_file) print(conf.app_info) print('请先登录:') # 调用客户对象的authenticate()进行登录验证 if customer.authenticate(): # 登录成功 #if True: # 获取当前用户信息 current_user_info = customer.get_current_customer_info() flag = True while flag: # 打印主菜单 print_main_menu() # 获取输入的菜单编号 chose = input("请输入菜单编号:").strip() if chose == '1':
Help: ''' from model.customer import customer from model.shopping import shopping from model.goods import goods from model.atm import atm from libs import mylib import conf if __name__ == '__main__': shopping = shopping() goo = goods() logger = mylib.mylog(conf.SHOPPING_LOG) cu = customer() atm = atm() def print_menu(menu_list): ''' 输出菜单函数,用于显示菜单和获取用户输入 :param menu_list: 菜单列表 :return: 返回用户输入的选项 ''' for item in enumerate(menu_list, 1): print('%s、 %s' %item) # 通过遍历打印菜单项 chose = input('请选择:').strip() # 获取用户输入 return chose #返回用户输入 def print_welcome(): ''' 输出系统信息和用户信息
def __init__(self): self.__current_customer = [] self.__customer = customer() self.__tmp_cart = []
Description: 65商城主程序 Help: ''' from model.customer import customer from model.shopping import shopping from model.goods import goods from model.atm import atm from libs import mylib import conf if __name__ == '__main__': shopping = shopping() goo = goods() logger = mylib.mylog(conf.SHOPPING_LOG) cu = customer() atm = atm() def print_menu(menu_list): ''' 输出菜单函数,用于显示菜单和获取用户输入 :param menu_list: 菜单列表 :return: 返回用户输入的选项 ''' for item in enumerate(menu_list, 1): print('%s、 %s' % item) # 通过遍历打印菜单项 chose = input('请选择:').strip() # 获取用户输入 return chose #返回用户输入 def print_welcome(): '''
break else: print('输入错误,请重新输入') pass else: input("输入错误,按任意键继续") else: input("输入错误,按任意键继续") if __name__ == '__main__': # 程序主入口 # 创建购物车对象 goods = goods(conf.goods_file) # 常见客户对象 customer = customer(conf.customer_file) print(conf.app_info) print('请先登录:') # 调用客户对象的authenticate()进行登录验证 if customer.authenticate(): # 登录成功 #if True: # 获取当前用户信息 current_user_info = customer.get_current_customer_info() flag = True while flag: # 打印主菜单 print_main_menu() # 获取输入的菜单编号 chose = input("请输入菜单编号:").strip() if chose == '1':