sitemap-config.js 2.65 KB
/**
 *  pc/wap站静态url 用于站点地图
 *
 */

const moment = require('moment');

const {
  FREQ,
  PRIO
} = require('./vars');

module.exports = function() {
  const today = moment().format('Y-M-D');

  return {
    index: {
      urls: [],
      xmlNs: ' ',
      lastmod: ''
    },

    www: {
      main: {
        urls: ['/'],
        lastmod: today,
        changefreq: FREQ.hourly,
        priority: PRIO.L9,
        mobile: true
      },

      // 频道
      channel: {
        urls: ['/girls/', '/kids/', '/lifestyle/'],
        lastmod: today,
        changefreq: FREQ.hourly,
        priority: PRIO.L5,
        mobile: true
      },

      // 领券中心
      coupon: {
        urls: ['/coupon/'],
        lastmod: today,
        changefreq: FREQ.hourly,
        priority: PRIO.L5,
        mobile: true
      },

      // sale
      salse: {
        urls: ['/product/boys-sale/', '/product/girls-sale/', '/product/kids-sale/', '/product/lifestyle-sale/'],
        lastmod: today,
        changefreq: FREQ.hourly,
        priority: PRIO.L5,
        mobile: true
      },

      // 新品到着
      new: {
        urls: ['/boys-new/', '/girls-new/', '/kids-new/', '/lifestyle-new/'],
        lastmod: today,
        changefreq: FREQ.hourly,
        priority: PRIO.L5,
        mobile: true
      }

    },

    product: {
      urls: [],
      lastmod: today,
      changefreq: FREQ.weekly,
      priority: PRIO.L3,
      mobile: true
    },

    list: {
      urls: [],
      lastmod: today,
      changefreq: FREQ.hourly,
      priority: PRIO.L7,
      mobile: true
    },

    shop: {
      urls: ['/boys-brands/', '/girls-brands/', '/kids-brands/', '/lifestyle-brands/'],
      lastmod: today,
      changefreq: FREQ.hourly,
      priority: PRIO.L5,
      mobile: true
    },

    guang: {
      urls: ['/guang/',
        '/guang/boys-t0/', '/guang/boys-t1001/', '/guang/boys-t2/', '/guang/boys-t4/',
        '/guang/boys-t22/', '/guang/news/', '/guang/girls-t0/', '/guang/girls-t1001/',
        '/guang/girls-t2/', '/guang/girls-t4', '/guang/girls-t22/', '/guang/kids-t0/',
        '/guang/kids-t1001/', '/guang/kids-t2/', '/guang/kids-t4/', '/guang/kids-t22/',
        '/guang/lifestyle-t0/', '/guang/lifestyle-t1001/', '/guang/lifestyle-t2/',
        '/guang/lifestyle-t4/', '/guang/lifestyle-t22/'
      ],
      lastmod: today,
      priority: PRIO.L1,
      mobile: true,
      mobileUrls: ['/guang/']
    },

    chanpin: {
      urls: [],
      lastmod: today,
      changefreq: FREQ.hourly,
      priority: PRIO.L5,
      mobile: true
    },

    hot: {
      urls: [],
      lastmod: today,
      changefreq: FREQ.hourly,
      priority: PRIO.L5,
      mobile: true
    }
  };
};