code: def build_menus(self, order_cats=[]):
          
          menus = [{'category': _cat, 'items': []} for _cat in order_cats]
          for path in self.routes:
              route = self.routes[path]
              for menu in menus:
                  if route['category'] == menu['category']:
                      menu['items'].append(route)
          return menus
docs: 生成全局内存菜单