def getOrdersByType(request): """ 获取用户订单 :param request: httprequest :return: 渲染后的订单列表 """ print(request.POST) if '0' in request.POST['type']: context = order_service.getOrders('abc') else: context = order_service.getOrders('abc', request.POST['type']) print(context) return render(request, 'DiningServer/orders.html', context)
def getOrders(request): """ 获取用户订单页面 :param request: :return: 返回”我的订单页面“ """ context = order_service.getOrders('abc') return render(request, 'DiningServer/myOrder.html', context)