Authored by 周少峰

Merge branch 'feature/keywordsMove' into gray

@@ -74,10 +74,16 @@ const getArticleUrls = () => { @@ -74,10 +74,16 @@ const getArticleUrls = () => {
74 }; 74 };
75 75
76 // www 地图数据 76 // www 地图数据
77 -const wwwXmlData = () => {// eslint-disable-line  
78 - return Promise.all([keywordsPage(), getStaticUrls(_.get(staticUrls, 'www')), getArticleUrls()]).then(result => {  
79 - return _.concat(result[1], result[0], result[2]);  
80 - }); 77 +const wwwXmlData = (page) => {// eslint-disable-line
  78 + if (page > 1) {
  79 + return keywordsPage(page);
  80 + } else {
  81 + return Promise.all([keywordsPage(page),
  82 + getStaticUrls(_.get(staticUrls, 'www')),
  83 + getArticleUrls()]).then(result => {
  84 + return _.concat(result[1], result[0], result[2]);
  85 + });
  86 + }
81 }; 87 };
82 88
83 // list 地图数据 89 // list 地图数据
@@ -133,7 +139,9 @@ const siteMap = (req, res, next) => { @@ -133,7 +139,9 @@ const siteMap = (req, res, next) => {
133 return; 139 return;
134 } 140 }
135 141
136 - eval(subdomain + 'XmlData')().then(urls => {// eslint-disable-line 142 + let page = req.params[0] || 1;
  143 +
  144 + eval(subdomain + 'XmlData')(page).then(urls => {// eslint-disable-line
137 sm.createSitemap({ 145 sm.createSitemap({
138 hostname: `https://${subdomain}.yohobuy.com`, 146 hostname: `https://${subdomain}.yohobuy.com`,
139 xmlNs: ' ', 147 xmlNs: ' ',