code: function (routes) {
      let retRoutes = {};
      Object.keys(routes || {}).forEach(function (routeKey) {
        let item = routes[routeKey];
        if (_.isObject(item)) {
          if (item.hasOwnProperty('list')) {
            // 页面
            let list = [];
            item.list.forEach(function (it) {
              list.push({i: it.id, p: it.path, pagePath: routeKey.split(' ')[1]});
            });
  
            retRoutes[routeKey] = {
              nei: true,
              data: item,
              handle: wrapPage(item.index, list)
            };
          } else {
            // api
            retRoutes[routeKey] = {
              nei: true,
              data: item,
              handle: wrapApi(item.id, item.path)
            };
          }
        } else {
          retRoutes[routeKey] = item;
        }
      });
      return retRoutes;
    }
docs: 获取包装过的路由