Normalize router page information

@inner
@param {Object} result the existed router pages
@param {Array} pages the router pages to normalize
@param {string=} prefix the page name prefix, optional
@return {string} return the entry page name
function normalizePages(result, pages, prefix) {
    let entryPageName;
    pages.forEach((item, idx) => {
        let filter;
        if (typeof item === 'object') {
            let {path, filter: pageFilter} = item;
            item = path;
            filter = pageFilter;
        }

        let {pageName, componentName} = getPageInfo(item, prefix);
        let pageInfo = {
            component: componentName
        };
        filter && (pageInfo.filter = filter);
        result[pageName] = pageInfo;
        if (idx === 0) {
            entryPageName = pageName;
        }
    });

    return entryPageName;
}