...
|
...
|
@@ -74,10 +74,16 @@ const getArticleUrls = () => { |
|
|
};
|
|
|
|
|
|
// www 地图数据
|
|
|
const wwwXmlData = () => {// eslint-disable-line
|
|
|
return Promise.all([keywordsPage(), getStaticUrls(_.get(staticUrls, 'www')), getArticleUrls()]).then(result => {
|
|
|
return _.concat(result[1], result[0], result[2]);
|
|
|
});
|
|
|
const wwwXmlData = (page) => {// eslint-disable-line
|
|
|
if (page > 1) {
|
|
|
return keywordsPage(page);
|
|
|
} else {
|
|
|
return Promise.all([keywordsPage(page),
|
|
|
getStaticUrls(_.get(staticUrls, 'www')),
|
|
|
getArticleUrls()]).then(result => {
|
|
|
return _.concat(result[1], result[0], result[2]);
|
|
|
});
|
|
|
}
|
|
|
};
|
|
|
|
|
|
// list 地图数据
|
...
|
...
|
@@ -133,7 +139,9 @@ const siteMap = (req, res, next) => { |
|
|
return;
|
|
|
}
|
|
|
|
|
|
eval(subdomain + 'XmlData')().then(urls => {// eslint-disable-line
|
|
|
let page = req.params[0] || 1;
|
|
|
|
|
|
eval(subdomain + 'XmlData')(page).then(urls => {// eslint-disable-line
|
|
|
sm.createSitemap({
|
|
|
hostname: `https://${subdomain}.yohobuy.com`,
|
|
|
xmlNs: ' ',
|
...
|
...
|
|