Authored by 周少峰

add static url

@@ -64,6 +64,8 @@ module.exports = class extends global.yoho.BaseModel { @@ -64,6 +64,8 @@ module.exports = class extends global.yoho.BaseModel {
64 * @param urls array 64 * @param urls array
65 */ 65 */
66 sendUrlsToBaidu(site, urls, token) { 66 sendUrlsToBaidu(site, urls, token) {
  67 + logger.info(`${site}${urls.length}`);
  68 +
67 let options = { 69 let options = {
68 url: `http://data.zz.baidu.com/urls?site=${site}&token=${token || config.baiduToken}`, 70 url: `http://data.zz.baidu.com/urls?site=${site}&token=${token || config.baiduToken}`,
69 headers: { 71 headers: {
  1 +/**
  2 + * pc/wap站静态url 用于站点地图
  3 + *
  4 + */
  5 +
  6 +module.exports = {
  7 + pc:{
  8 + // 频道
  9 + channel: {
  10 + loc: ['https:www.yohobuy.com/', 'https://www.yohobuy.com/girls/', 'https://www.yohobuy.com/kids/', 'https://www.yohobuy.com/lifestyle/'],
  11 + lastmod: '2017-12-14',
  12 + changefreq: 'daily',
  13 + priority: '0.8'
  14 + },
  15 +
  16 + // 新品到着
  17 + new: {
  18 + 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/'],
  19 + lastmod: '2017-12-14',
  20 + changefreq: 'daily',
  21 + priority: '0.5'
  22 + },
  23 +
  24 + // 品牌一览
  25 + brands: {
  26 + loc: ['https://list.yohobuy.com/boys-brands/', 'https://list.yohobuy.com/girls-brands/', 'https://list.yohobuy.com/kids-brands/', 'https://list.yohobuy.com/lifestyle-brands/'],
  27 + lastmod: '2017-12-14',
  28 + changefreq: 'daily',
  29 + priority: '0.3'
  30 + },
  31 +
  32 + // 领券中心
  33 + coupon: {
  34 + loc: ['https://www.yohobuy.com/coupon/'],
  35 + lastmod: '2017-12-14',
  36 + changefreq: 'weekly',
  37 + priority: '0.3'
  38 +
  39 + },
  40 +
  41 + // sale
  42 + salse: {
  43 + 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/'],
  44 + lastmod: '2017-12-14',
  45 + changefreq: 'daily',
  46 + priority: '0.3'
  47 + },
  48 +
  49 + // 分类列表
  50 + category: {
  51 + loc: [],
  52 + lastmod: '2017-12-14',
  53 + changefreq: 'daily',
  54 + priority: '0.3'
  55 + },
  56 +
  57 + // 分类列表
  58 + search: {
  59 + loc: ['https://search.yohobuy.com/'],
  60 + lastmod: '2017-12-14',
  61 + changefreq: 'daily',
  62 + priority: '0.3'
  63 + },
  64 +
  65 + // 逛 编辑列表/标签列表/逛详情动态添加
  66 + guang: {
  67 + loc: ['https://guang.yohobuy.com/boys/', 'https://guang.yohobuy.com/girls/', 'https://guang.yohobuy.com/kids/', 'https://guang.yohobuy.com/lifestyle/'],
  68 + lastmod: '2017-12-14',
  69 + changefreq: 'daily',
  70 + priority: '0.3'
  71 + },
  72 +
  73 + // 商品详情动态添加
  74 + item: {
  75 + loc: [],
  76 + lastmod: '2017-12-14',
  77 + changefreq: 'daily',
  78 + priority: '0.3'
  79 + }
  80 + },
  81 + wap: {
  82 + // 频道
  83 + channel: {
  84 + loc: ['https:m.yohobuy.com/', 'https://m.yohobuy.com/girls/', 'https://m.yohobuy.com/kids/', 'https://m.yohobuy.com/lifestyle/'],
  85 + lastmod: '2017-12-14',
  86 + changefreq: 'daily',
  87 + priority: '0.8'
  88 + },
  89 + }
  90 +
  91 +
  92 +}