Authored by 周少峰

sitemap

'use strict';
// const helpers = global.yoho.helpers;
const _ = require('lodash');
const sm = require('sitemap');
const staticUrls = require('../../../config/staticUrls');
const getStaticUrls = (currentStatics) => {
let urls = [];
_.forEach(_.get(currentStatics, 'loc', []), url => {
urls.push({
url: url,
changefreq: currentStatics.changefreq,
priority: currentStatics.priority
});
});
_.forEach(currentStatics, (value) => {
_.forEach(value.loc, url => {
urls.push({
url: url,
changefreq: value.changefreq,
priority: value.priority
});
});
});
return urls;
};
// www 地图数据
const wwwXmlData = () => {// eslint-disable-line
return getStaticUrls(_.get(staticUrls, 'www'));
};
// list 地图数据
const listXmlData = () => {// eslint-disable-line
return getStaticUrls(_.get(staticUrls, 'list'));
};
// item 地图数据
const itemXmlData = () => {// eslint-disable-line
return getStaticUrls(_.get(staticUrls, 'item'));
};
// guang 地图数据
const guangXmlData = () => {// eslint-disable-line
return getStaticUrls(_.get(staticUrls, 'guang'));
};
// 站点地图
const siteMap = (req, res) => {
let siteList = ['www', 'list', 'item', 'guang'],
subdomain = req.subdomains[0] || 'www';
if (!siteList.subdomain) {
res.end();
}
sm.createSitemap({
hostname: `https://${subdomain}.yohobuy.com`,
urls: eval(subdomain + 'XmlData')() // eslint-disable-line
}).toXML(function(err, xml) {
if (err) {
return res.status(500).end();
}
res.header('Content-Type', 'application/xml');
res.send(xml);
});
};
module.exports = {
siteMap
};
... ...
... ... @@ -17,6 +17,7 @@ const robot = require(`${cRoot}/robot-check`); // 机器人检查
const materialController = require(`${cRoot}/material`);
const activate = require(`${cRoot}/activate`); // 激活点击统计
const questionnaire = require(`${cRoot}/questionnaire`);
const sitemap = require(`${cRoot}/sitemap`);
router.get('/ads', ads.jump);
router.get('/check', captcha.tryGeetest, robot.index);
... ... @@ -31,5 +32,5 @@ router.get('/material/getRecommendlist', auth, materialController.getRecommendli
router.get('/activate-count', auth, activate.index);
router.get('/activate-count/getList', auth, activate.getList);
router.get('/questionnaire/:id', auth, questionnaire.getQuestionnaire);
router.get('/sitemap.xml', sitemap.siteMap);
module.exports = router;
... ...
/**
* pc/wap站静态url 用于站点地图
*
*/
const moment = require('moment');
const today = moment().format('Y-M-D');
module.exports = {
www: {
// 频道
channel: {
loc: ['https:www.yohobuy.com/', 'https://www.yohobuy.com/girls/', 'https://www.yohobuy.com/kids/', 'https://www.yohobuy.com/lifestyle/'],
lastmod: today,
changefreq: 'daily',
priority: 0.8
},
// 品牌一览
brands: {
loc: ['https://www.yohobuy.com/boys-brands/', 'https://www.yohobuy.com/girls-brands/', 'https://www.yohobuy.com/kids-brands/', 'https://www.yohobuy.com/lifestyle-brands/'],
lastmod: today,
changefreq: 'daily',
priority: 0.5
},
// 领券中心
coupon: {
loc: ['https://www.yohobuy.com/coupon/'],
lastmod: today,
changefreq: 'weekly',
priority: 0.3
},
// sale
salse: {
loc: ['https://www.yohobuy.com/product/boys-sale/', 'https://www.yohobuy.com/product/girls-sale/', 'https://www.yohobuy.com/product/kids-sale/', 'https://www.yohobuy.com/product/lifestyle-sale/'],
lastmod: today,
changefreq: 'daily',
priority: 0.3
}
},
list: {
// 新品到着
new: {
loc: ['https://list.yohobuy.com/boys-new/', 'https://list.yohobuy.com/girls-new/', 'https://list.yohobuy.com/kids-new/', 'https://list.yohobuy.com/lifestyle-new/'],
lastmod: today,
changefreq: 'daily',
priority: 0.5
},
// 分类列表
category: {
loc: [],
lastmod: today,
changefreq: 'daily',
priority: 0.3
}
},
// 搜索列表
search: {
loc: ['https://search.yohobuy.com/'],
lastmod: today,
changefreq: 'daily',
priority: 0.3
},
// 逛 编辑列表/标签列表/逛详情动态添加
guang: {
loc: ['https://guang.yohobuy.com/boys/', 'https://guang.yohobuy.com/girls/', 'https://guang.yohobuy.com/kids/', 'https://guang.yohobuy.com/lifestyle/'],
lastmod: today,
changefreq: 'daily',
priority: 0.3
},
// 商品详情动态添加
item: {
loc: [],
lastmod: today,
changefreq: 'daily',
priority: 0.3
},
m: {
// 频道
channel: {
loc: ['https:m.yohobuy.com/', 'https://m.yohobuy.com/girls/', 'https://m.yohobuy.com/kids/', 'https://m.yohobuy.com/lifestyle/'],
lastmod: today,
changefreq: 'daily',
priority: 0.8
},
// 新品到着
new: {
loc: ['https://m.yohobuy.com/product/boys-new/', 'https://m.yohobuy.com/product/girls-new/', 'https://m.yohobuy.com/product/kids-new/?msort=365', 'https://m.yohobuy.com/product/lifestyle-new/?msort=10'],
lastmod: today,
changefreq: 'daily',
priority: 0.5
},
// 品牌一览
brands: {
loc: ['https://m.yohobuy.com/boys-brands/', 'https://m.yohobuy.com/girls-brands/', 'https://m.yohobuy.com/kids-brands/', 'https://m.yohobuy.com/lifestyle-brands/'],
lastmod: today,
changefreq: 'daily',
priority: 0.5
},
// 领券中心
coupon: {
loc: ['https://m.yohobuy.com/coupon/floor?title=领券中心&share_id=1037&code=b78b32ed81b18dde8ac84fd33602b88b&type=5'],
lastmod: today,
changefreq: 'weekly',
priority: 0.3
},
// sale
salse: {
loc: ['https://m.yohobuy.com/product/boys-sale/', 'https://m.yohobuy.com/product/girls-sale/', 'https://m.yohobuy.com/product/kids-sale/?msort=365', 'https://m.yohobuy.com/product/lifestyle-sale/?msort=10'],
lastmod: today,
changefreq: 'daily',
priority: 0.3
},
// 分类列表 TODO 链接优化后再推
// category: {
// loc: ['https://m.yohobuy.com/cate', 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=373&sort_name=T%E6%81%A4',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=387&sort_name=%E8%83%8C%E5%BF%83',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=452&sort_name=POLO',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=374&sort_name=%E8%A1%AC%E8%A1%AB',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=418&sort_name=%E5%A5%97%E8%A3%85',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=397&sort_name=%E5%8D%AB%E8%A1%A3',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=405&sort_name=%E5%A4%B9%E5%85%8B',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=401&sort_name=%E6%AF%9B%E8%A1%A3%2F%E9%92%88%E7%BB%87',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=407&sort_name=%E5%A4%A7%E8%A1%A3%2F%E9%A3%8E%E8%A1%A3',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=432&sort_name=%E7%BE%BD%E7%BB%92%E6%9C%8D',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=424&sort_name=%E6%A3%89%E8%A1%A3',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=457&sort_name=%E8%A5%BF%E8%A3%85',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=407%2C405%2C397%2C374%2C373%2C401%2C432%2C424%2C457%2C452%2C418%2C387&sort_name=%E4%B8%8A%E8%A1%A3',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=378&sort_name=%E8%BF%9E%E8%A1%A3%E8%A3%99',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=379&sort_name=%E5%8D%8A%E8%BA%AB%E8%A3%99',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=378%2C379&sort_name=%E8%A3%99%E8%A3%85',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=377&sort_name=%E7%9F%AD%E8%A3%A4',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=376&sort_name=%E4%BC%91%E9%97%B2%E8%A3%A4',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=389&sort_name=%E7%89%9B%E4%BB%94%E8%A3%A4',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=385&sort_name=%E6%89%93%E5%BA%95%E8%A3%A4',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=472&sort_name=%E8%BF%9E%E4%BD%93%E8%A3%A4',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=389%2C385%2C377%2C376%2C470&sort_name=%E8%A3%A4%E8%A3%85',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=383&sort_name=%E5%87%89%E9%9E%8B%2F%E5%87%89%E6%8B%96',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=375&sort_name=%E4%BC%91%E9%97%B2%2F%E8%BF%90%E5%8A%A8%E9%9E%8B',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=461&sort_name=%E6%97%B6%E8%A3%85%E9%9E%8B',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=463&sort_name=%E9%9D%B4%E5%AD%90',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=383%2C375%2C461%2C463&sort_name=%E9%9E%8B%E9%9D%B4',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=431%2C433&sort_name=%E5%A4%AA%E9%98%B3%E9%95%9C%2F%E7%9C%BC%E9%95%9C',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=409&sort_name=%E8%A2%9C%E5%AD%90',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=415%2C416%2C458%2C459&sort_name=%E5%B8%BD%E5%AD%90',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=422&sort_name=%E5%9B%B4%E5%B7%BE',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=431%2C433%2C415%2C416%2C422%2C395%2C428%2C409&sort_name=%E6%9C%8D%E9%85%8D',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=393&sort_name=%E5%8F%8C%E8%82%A9%E5%8C%85',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=393%2C411&sort_name=%E5%8C%85%E7%B1%BB',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=478%2C480%2C270%2C332&sort_name=%E7%94%9F%E6%B4%BB%E6%97%A5%E7%94%A8',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=482%2C484%2C486&sort_name=%E5%B0%8F%E5%AE%B6%E7%94%B5',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=488%2C490%2C277&sort_name=%E5%88%9B%E6%84%8F%E7%A4%BC%E5%93%81',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=353%2C496%2C450&sort_name=%E5%AE%B6%E5%B1%85%E5%AE%B6%E7%BA%BA',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=275&sort_name=%E5%AE%B6%E5%B1%85%E9%A5%B0%E5%93%81',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=271&sort_name=%E9%9D%A0%E5%9E%AB%2F%E6%8A%B1%E6%9E%95',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=274&sort_name=%E9%A6%99%E8%96%B0%2F%E9%A6%99%E6%B0%9B',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=273&sort_name=%E5%8E%A8%E5%85%B7%2F%E9%A4%90%E5%85%B7',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=272&sort_name=%E5%82%A8%E7%89%A9%E6%94%B6%E7%BA%B3',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=272%2C353%2C267%2C268%2C269%2C270%2C271%2C273%2C274%2C275%2C276%2C332%2C333%2C450%2C277&sort_name=%E5%AE%B6%E5%B1%85%E7%94%9F%E6%B4%BB',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=261&sort_name=%E5%BD%A9%E5%A6%86',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=263&sort_name=%E9%A6%99%E6%B0%B4',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=260&sort_name=%E9%9D%A2%E9%83%A8%E6%8A%A4%E8%82%A4',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=264&sort_name=%E4%B8%AA%E4%BA%BA%E6%8A%A4%E7%90%86',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=352&sort_name=%E7%BA%B9%E8%BA%AB%E8%B4%B4',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=263%2C260%2C264%2C261%2C352%2C262&sort_name=%E7%BE%8E%E5%A6%86%2F%E4%B8%AA%E6%8A%A4',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=514&sort_name=%E6%89%8B%E6%9C%BA',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=313&sort_name=%E6%89%8B%E6%9C%BA%2Fipad%E5%A3%B3',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=212&sort_name=%E6%89%8B%E6%9C%BA%E9%85%8D%E4%BB%B6',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=398&sort_name=%E6%99%BA%E8%83%BD%E8%A3%85%E5%A4%87',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=492%2C494&sort_name=%E5%BD%B1%E9%9F%B3%E5%A8%B1%E4%B9%90',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=212%2C313%2C398%2C492%2C494%2C514&sort_name=%E6%95%B0%E7%A0%813C',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=171&sort_name=%E8%80%B3%E6%9C%BA',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=185&sort_name=%E7%9B%B8%E6%9C%BA',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=162&sort_name=%E6%89%8B%E8%A1%A8',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=211%2C113%2C200&sort_name=%E6%95%B0%E7%A0%81%E9%85%8D%E4%BB%B6',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=267&sort_name=%E6%9D%AF%E5%AD%90%2F%E6%B0%B4%E5%A3%B6',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=333&sort_name=%E9%9B%A8%E4%BC%9E%2F%E9%9B%A8%E8%A1%A3',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=466&sort_name=%E8%87%AA%E8%A1%8C%E8%BD%A6',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=302%2C343%2C344%2C399&sort_name=%E8%A3%85%E5%A4%87',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=466%2C302%2C343%2C344%2C399&sort_name=%E8%BF%90%E5%8A%A8%E6%88%B7%E5%A4%96',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=292%2C449&sort_name=%E7%8E%A9%E5%81%B6',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=304&sort_name=DIY%2F%E6%A8%A1%E5%9E%8B',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=498&sort_name=%E6%88%90%E4%BA%BA%E7%94%A8%E5%93%81',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=292%2C304%2C449%2C498&sort_name=%E7%8E%A9%E5%85%B7%E5%A8%B1%E4%B9%90',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=184&sort_name=%E5%AD%A6%E4%B9%A0%E7%94%A8%E5%93%81',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=112&sort_name=%E7%AC%94',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=111&sort_name=%E6%9C%AC%E5%AD%90',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=110&sort_name=%E5%9B%BE%E4%B9%A6%2F%E9%9F%B3%E5%83%8F',
// 'https://list.m.yohobuy.com/?gender=1%2C2%2C3&sort=110%2C111%2C112%2C184&sort_name=%E5%9B%BE%E4%B9%A6%E6%96%87%E5%85%B7',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=114&sort_name=T%E6%81%A4',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=116&sort_name=POLO',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=115%2C516&sort_name=%E8%A1%AC%E8%A1%AB',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=124%2C516&sort_name=%E5%A4%B9%E5%85%8B',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=119%2C516&sort_name=%E5%8D%AB%E8%A1%A3',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=227&sort_name=%E9%98%B2%E9%A3%8E%E5%A4%96%E5%A5%97',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=173&sort_name=%E7%9A%AE%E8%A1%A3',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=258&sort_name=%E6%AF%9B%E8%A1%A3%2F%E9%92%88%E7%BB%87',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=125&sort_name=%E5%A4%A7%E8%A1%A3%2F%E9%A3%8E%E8%A1%A3',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=122&sort_name=%E8%A5%BF%E8%A3%85',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=118&sort_name=%E9%A9%AC%E7%94%B2',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=117&sort_name=%E8%83%8C%E5%BF%83',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=413&sort_name=%E5%A5%97%E8%A3%85',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=123&sort_name=%E6%A3%89%E8%A1%A3',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=121&sort_name=%E7%BE%BD%E7%BB%92%E6%9C%8D',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=114%2C293%2C116%2C117%2C115%2C119%2C124%2C122%2C413%2C258%2C173%2C227%2C125%2C118%2C121%2C123&sort_name=%E4%B8%8A%E8%A1%A3',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=129&sort_name=%E4%BC%91%E9%97%B2%E8%A3%A4',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=131&sort_name=%E7%9F%AD%E8%A3%A4',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=130&sort_name=%E7%89%9B%E4%BB%94%E8%A3%A4',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=346&sort_name=%E8%BF%90%E5%8A%A8%E8%A3%A4',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=133&sort_name=%E6%89%93%E5%BA%95%2F%E7%B4%A7%E8%BA%AB%E8%A3%A4',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=223&sort_name=%E8%BF%9E%E4%BD%93%E8%A3%A4',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=348&sort_name=%E8%A5%BF%E8%A3%A4',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=129%2C222%2C130%2C131%2C346%2C133%2C348&sort_name=%E8%A3%A4%E8%A3%85',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=147&sort_name=%E4%BC%91%E9%97%B2%2F%E8%BF%90%E5%8A%A8%E9%9E%8B',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=149&sort_name=%E5%87%89%E9%9E%8B%2F%E5%87%89%E6%8B%96',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=148&sort_name=%E9%9D%B4%E5%AD%90',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=151&sort_name=%E6%97%B6%E8%A3%85%E9%9E%8B',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=231&sort_name=%E4%BF%9D%E5%85%BB%E6%8A%A4%E7%90%86',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=147%2C149%2C148%2C151%2C231%2C298&sort_name=%E9%9E%8B%E9%9D%B4',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=152&sort_name=%E5%8F%8C%E8%82%A9%E5%8C%85',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=153%2C196%2C195%2C197&sort_name=%E6%89%8B%E6%8B%8E%2F%E5%8D%95%E8%82%A9%E5%8C%85',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=238%2C239&sort_name=%E9%92%B1%E5%8C%85%2F%E5%8D%A1%E5%8C%85',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=157&sort_name=%E8%85%B0%E5%8C%85',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=342&sort_name=%E9%82%AE%E5%B7%AE%E5%8C%85',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=156&sort_name=%E7%94%B5%E8%84%91%E5%8C%85',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=161%2C300&sort_name=%E5%82%A8%E7%89%A9%E5%8C%85',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=160&sort_name=%E7%8E%AF%E4%BF%9D%E5%8C%85',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=233&sort_name=%E5%8C%85%E9%85%8D',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=341&sort_name=tote%E5%8C%85',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=340&sort_name=%E6%97%85%E8%A1%8C%E5%8C%85',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=210&sort_name=%E6%97%85%E8%A1%8C%E7%AE%B1',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=240%2C349&sort_name=%E6%89%8B%E5%8C%85%2F%E9%92%A5%E5%8C%99%E5%8C%85',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=152%2C153%2C196%2C238%2C239%2C240%2C349%2C157%2C342%2C156%2C161%2C300%2C160%2C233%2C341%2C340%2C210%2C339%2C351%2C195%2C197&sort_name=%E5%8C%85%E7%B1%BB',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=72%2C74%2C75%2C76&sort_name=%E9%A6%96%E9%A5%B0',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=224%2C322%2C323%2C324%2C325%2C326%2C327%2C328%2C329%2C330%2C331&sort_name=%E5%B8%BD%E5%AD%90',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=162&sort_name=%E6%89%8B%E8%A1%A8',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=142&sort_name=%E8%A2%9C%E5%AD%90',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=77%2C79%2C80%2C213%2C217%2C218%2C234%2C303%2C305%2C306%2C307%2C334&sort_name=%E9%85%8D%E9%A5%B0',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=78%2C199&sort_name=%E7%9A%AE%E5%B8%A6',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=186%2C235&sort_name=%E5%A4%AA%E9%98%B3%E9%95%9C%2F%E7%9C%BC%E9%95%9C',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=316&sort_name=%E5%9B%B4%E5%B7%BE',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=320&sort_name=%E6%89%8B%E5%B8%95',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=321&sort_name=%E4%B8%9D%E5%B7%BE',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=164&sort_name=%E6%89%8B%E5%A5%97',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=317&sort_name=%E6%8A%AB%E8%82%A9',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=186%2C235%2C163%2C224%2C322%2C323%2C324%2C325%2C326%2C327%2C328%2C329%2C330%2C331%2C72%2C74%2C75%2C76%2C142%2C77%2C78%2C79%2C80%2C199%2C213%2C217%2C218%2C234%2C303%2C305%2C306%2C307%2C334%2C162%2C316%2C320%2C164%2C317%2C295%2C321&sort_name=%E6%9C%8D%E9%85%8D',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=311&sort_name=%E5%86%85%E8%A3%A4',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=357&sort_name=%E5%AE%B6%E5%B1%85%E6%9C%8D',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=311%2C357%2C359&sort_name=%E5%86%85%E8%A1%A3%2F%E5%AE%B6%E5%B1%85%E6%9C%8D',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=264&sort_name=%E4%B8%AA%E4%BA%BA%E6%8A%A4%E7%90%86',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=352&sort_name=%E7%BA%B9%E8%BA%AB%E8%B4%B4',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=263&sort_name=%E9%A6%99%E6%B0%B4',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=260&sort_name=%E9%9D%A2%E9%83%A8%E6%8A%A4%E7%90%86',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=261&sort_name=%E5%BD%A9%E5%A6%86',
// 'https://list.m.yohobuy.com/?gender=1%2C3&sort=263%2C260%2C264%2C261%2C352%2C262%2C265&sort_name=%E7%BE%8E%E5%A6%86%2F%E4%B8%AA%E6%8A%A4',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=114&sort_name=T%E6%81%A4',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=115%2C516&sort_name=%E8%A1%AC%E8%A1%AB',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=119&sort_name=%E5%8D%AB%E8%A1%A3',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=124%2C516&sort_name=%E5%A4%B9%E5%85%8B',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=258&sort_name=%E6%AF%9B%E8%A1%A3%2F%E9%92%88%E7%BB%87',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=125&sort_name=%E5%A4%A7%E8%A1%A3%2F%E9%A3%8E%E8%A1%A3',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=173&sort_name=%E7%9A%AE%E8%A1%A3',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=227&sort_name=%E9%98%B2%E9%A3%8E%E5%A4%96%E5%A5%97',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=122&sort_name=%E8%A5%BF%E8%A3%85',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=118&sort_name=%E9%A9%AC%E7%94%B2',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=121%2C123&sort_name=%E6%A3%89%E6%9C%8D',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=121&sort_name=%E7%BE%BD%E7%BB%92%E6%9C%8D',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=413&sort_name=%E5%A5%97%E8%A3%85',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=227%2C173%2C125%2C258%2C121%2C123%2C119%2C124%2C118%2C122%2C115%2C117%2C114%2C293%2C116%2C413&sort_name=%E4%B8%8A%E8%A1%A3',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=134&sort_name=%E8%BF%9E%E8%A1%A3%E8%A3%99',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=135&sort_name=%E5%8D%8A%E8%BA%AB%E8%A3%99',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=134%2C135&sort_name=%E8%A3%99%E8%A3%85',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=129&sort_name=%E4%BC%91%E9%97%B2%E8%A3%A4',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=130&sort_name=%E7%89%9B%E4%BB%94%E8%A3%A4',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=346&sort_name=%E8%BF%90%E5%8A%A8%E8%A3%A4',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=133&sort_name=%E6%89%93%E5%BA%95%2F%E7%B4%A7%E8%BA%AB%E8%A3%A4',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=131&sort_name=%E7%9F%AD%E8%A3%A4',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=348&sort_name=%E8%A5%BF%E8%A3%A4',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=223&sort_name=%E8%BF%9E%E4%BD%93%E8%A3%A4',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=348%2C346%2C131%2C133%2C129%2C130&sort_name=%E8%A3%A4%E8%A3%85',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=147&sort_name=%E4%BC%91%E9%97%B2%2F%E8%BF%90%E5%8A%A8%E9%9E%8B',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=151&sort_name=%E6%97%B6%E8%A3%85%E9%9E%8B',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=148&sort_name=%E9%9D%B4%E5%AD%90%2F%E9%AB%98%E5%B8%AE%E9%9E%8B',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=149&sort_name=%E5%87%89%E9%9E%8B%2F%E5%87%89%E6%8B%96',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=231&sort_name=%E4%BF%9D%E5%85%BB%E6%8A%A4%E7%90%86',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=147%2C149%2C148%2C151%2C231%2C508&sort_name=%E9%9E%8B%E9%9D%B4',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=152&sort_name=%E5%8F%8C%E8%82%A9%E5%8C%85',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=153%2C195%2C196%2C197&sort_name=%E6%89%8B%E6%8B%8E%2F%E5%8D%95%E8%82%A9%E5%8C%85',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=238%2C239&sort_name=%E9%92%B1%E5%8C%85%2F%E5%8D%A1%E5%8C%85',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=240%2C349&sort_name=%E6%89%8B%E5%8C%85%2F%E9%92%A5%E5%8C%99%E5%8C%85',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=157&sort_name=%E8%85%B0%E5%8C%85',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=342&sort_name=%E9%82%AE%E5%B7%AE%E5%8C%85',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=156&sort_name=%E7%94%B5%E8%84%91%E5%8C%85',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=161%2C300&sort_name=%E5%82%A8%E7%89%A9%E5%8C%85',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=160&sort_name=%E7%8E%AF%E4%BF%9D%E5%8C%85',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=233&sort_name=%E5%8C%85%E9%85%8D',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=341&sort_name=tote%E5%8C%85',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=340&sort_name=%E6%97%85%E8%A1%8C%E5%8C%85',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=210&sort_name=%E6%97%85%E8%A1%8C%E7%AE%B1',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=152%2C153%2C238%2C239%2C240%2C349%2C157%2C342%2C156%2C161%2C300%2C160%2C233%2C341%2C340%2C210%2C339%2C351%2C195%2C196%2C197&sort_name=%E5%8C%85%E7%B1%BB',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=224%2C322%2C323%2C324%2C325%2C326%2C327%2C328%2C329%2C330%2C331&sort_name=%E5%B8%BD%E5%AD%90',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=186%2C235&sort_name=%E5%A4%AA%E9%98%B3%E9%95%9C%2F%E7%9C%BC%E9%95%9C',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=72%2C74%2C75%2C76&sort_name=%E9%A6%96%E9%A5%B0',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=162&sort_name=%E6%89%8B%E8%A1%A8',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=77%2C78%2C79%2C80%2C199%2C213%2C217%2C218%2C234%2C303%2C305%2C306%2C307%2C334&sort_name=%E9%85%8D%E9%A5%B0',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=142&sort_name=%E8%A2%9C%E5%AD%90',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=164&sort_name=%E6%89%8B%E5%A5%97',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=317&sort_name=%E6%8A%AB%E8%82%A9',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=316&sort_name=%E5%9B%B4%E5%B7%BE',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=320&sort_name=%E6%89%8B%E5%B8%95',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=321&sort_name=%E4%B8%9D%E5%B7%BE',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=186%2C235%2C163%2C224%2C322%2C323%2C324%2C325%2C326%2C327%2C328%2C329%2C330%2C331%2C72%2C74%2C75%2C76%2C142%2C77%2C78%2C79%2C80%2C199%2C213%2C217%2C218%2C234%2C303%2C305%2C306%2C307%2C334%2C162%2C316%2C320%2C164%2C317%2C295%2C321&sort_name=%E6%9C%8D%E9%85%8D',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=364&sort_name=%E6%96%87%E8%83%B8',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=311&sort_name=%E5%86%85%E8%A3%A4',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=357&sort_name=%E5%AE%B6%E5%B1%85%E6%9C%8D',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=359&sort_name=%E5%AE%B6%E5%B1%85%E9%9E%8B',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=311%2C364%2C357%2C359&sort_name=%E5%86%85%E8%A1%A3%2F%E5%AE%B6%E5%B1%85%E6%9C%8D',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=263&sort_name=%E9%A6%99%E6%B0%B4',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=264&sort_name=%E4%B8%AA%E4%BA%BA%E6%8A%A4%E7%90%86',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=261&sort_name=%E5%BD%A9%E5%A6%86',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=352&sort_name=%E7%BA%B9%E8%BA%AB%E8%B4%B4',
// 'https://list.m.yohobuy.com/?gender=2%2C3&sort=263%2C264%2C260%2C261%2C262%2C265%2C352&sort_name=%E7%BE%8E%E5%A6%86%2F%E4%B8%AA%E6%8A%A4'],
// lastmod: today,
// changefreq: 'daily',
// priority: 0.3
// },
item: {
loc: [],
lastmod: today,
changefreq: 'daily',
priority: 0.3
}
},
'guang.m': {
loc: ['https://guang.m.yohobuy.com/?gender=1%2C3', 'https://guang.m.yohobuy.com/?gender=2%2C3', 'https://guang.m.yohobuy.com/?gender=1%2C2%2C3', 'https://guang.m.yohobuy.com/?id=2&name=%E6%90%AD%E9%85%8D', 'https://guang.m.yohobuy.com/?id=4', 'http://guang.m.yohobuy.com/?id=0', 'https://guang.m.yohobuy.com/?id=1', 'https://guang.m.yohobuy.com/?id=3', 'https://guang.m.yohobuy.com/?id=5',
'https://guang.m.yohobuy.com/guang/author-8168253/', 'https://guang.m.yohobuy.com/guang/author-8168291', 'https://guang.m.yohobuy.com/guang/author-8168283', 'https://guang.m.yohobuy.com/guang/author-8168239', 'https://guang.m.yohobuy.com/guang/author-8168287', 'https://guang.m.yohobuy.com/guang/author-8168287', 'https://guang.m.yohobuy.com/guang/author-8168259', 'https://guang.m.yohobuy.com/guang/author-7823335', 'https://guang.m.yohobuy.com/guang/author-8123505',
'https://guang.m.yohobuy.com/guang/author-6875335', 'https://guang.m.yohobuy.com/guang/author-8168275', 'https://guang.m.yohobuy.com/guang/author-8168289', 'https://guang.m.yohobuy.com/guang/author-8168257', 'https://guang.m.yohobuy.com/guang/author-8168265', 'https://guang.m.yohobuy.com/guang/author-8168271', 'https://guang.m.yohobuy.com/guang/author-8168227', 'https://guang.m.yohobuy.com/guang/author-8168244', 'https://guang.m.yohobuy.com/guang/author-8168255',
'https://guang.m.yohobuy.com/guang/author-8168248', 'https://guang.m.yohobuy.com/guang/author-380463'],
lastmod: today,
changefreq: 'daily',
priority: 0.3
}
};
... ...
... ... @@ -109,6 +109,11 @@ module.exports = [
req.mobileUrl = `${MOBILE_DOMAIN}/author-${channel}-${authorId}-p${page}/`;
return `/guang/index/editor?channel=${channel}&author_id=${authorId}&page=${page}`;
}
},
{
type: TYPE.rewrite,
origin: '/sitemap.xml',
target: '/3party/sitemap.xml'
}
];
... ...
... ... @@ -36,6 +36,7 @@ module.exports = [
return `/product${req.url}`;
}
},
// 商品详情页新链接
{
type: TYPE.rewrite,
... ... @@ -44,5 +45,10 @@ module.exports = [
req.mobileUrl = `${MOBILE_DOMAIN}/product/${p1}.html${p2 ? p2 : ''}`;
return `/product${req.url}`;
}
},
{
type: TYPE.rewrite,
origin: '/sitemap.xml',
target: '/3party/sitemap.xml'
}
];
... ...
... ... @@ -73,5 +73,10 @@ module.exports = [
type: TYPE.rewrite,
origin: req => req.path === '/new',
target: '/product/list/new'
},
{
type: TYPE.rewrite,
origin: '/sitemap.xml',
target: '/3party/sitemap.xml'
}
];
... ...
... ... @@ -83,6 +83,11 @@ module.exports = [
type: TYPE.redirect,
origin: '/index.html',
target: helpers.urlFormat('/')
},
{
type: TYPE.rewrite,
origin: '/sitemap.xml',
target: '/3party/sitemap.xml'
}
];
... ...
... ... @@ -48,6 +48,7 @@
"request-ip": "^1.2.2",
"request-promise": "^3.0.0",
"serve-favicon": "^2.3.0",
"sitemap": "^1.12.0",
"urlencode": "^1.1.0",
"uuid": "^2.0.2",
"yoho-express-session": "^2.0.0",
... ...