...
|
...
|
@@ -49,12 +49,15 @@ const demoXml = (req, res) => { |
|
|
};
|
|
|
|
|
|
const siteMapXml = (req, res) => {
|
|
|
let sitemap = new Array(26).fill().map((val, k) => {
|
|
|
return `http://spiderwebhook.yoho.cn/dist/goods-xml/goods-${k + 1}.xml`;
|
|
|
req.ctx(SeoIndexModel).getGoodsPage().then(result => {
|
|
|
let sitemap = new Array(result).fill().map((val, k) => {
|
|
|
return `http://spiderwebhook.yoho.cn/dist/goods-xml/goods-${k + 1}.xml`;
|
|
|
});
|
|
|
|
|
|
res.setHeader('Content-Type', 'text/xml; charset=utf-8');
|
|
|
return res.render('seo/site-map', {sitemap});
|
|
|
});
|
|
|
|
|
|
res.setHeader('Content-Type', 'text/xml; charset=utf-8');
|
|
|
res.render('seo/site-map', {sitemap});
|
|
|
};
|
|
|
|
|
|
module.exports = {
|
...
|
...
|
|