Authored by 郝肖肖

'loc-url'

@@ -3,7 +3,7 @@ const fs = require('fs'); @@ -3,7 +3,7 @@ const fs = require('fs');
3 const xsdFile = fs.readFileSync('./apps/controllers/seo/xm.xsd').toString(); 3 const xsdFile = fs.readFileSync('./apps/controllers/seo/xm.xsd').toString();
4 4
5 5
6 -for (let i = 1; i <= 32; i++) { 6 +for (let i = 1; i <= 78; i++) {
7 const xml = `./public/dist/goods-xml/goods-${i}.xml`; 7 const xml = `./public/dist/goods-xml/goods-${i}.xml`;
8 const xmlFile = fs.readFileSync(xml).toString(); 8 const xmlFile = fs.readFileSync(xml).toString();
9 const schema = xsd.parse(xsdFile); 9 const schema = xsd.parse(xsdFile);
@@ -82,7 +82,7 @@ class SeoIndexModel extends global.yoho.BaseModel { @@ -82,7 +82,7 @@ class SeoIndexModel extends global.yoho.BaseModel {
82 }); 82 });
83 83
84 products.push({ 84 products.push({
85 - loc: `${GOODS_URL}/goods-${params.start}.xml`, 85 + loc: `https://www.yohobuy.com/product/${item.product_skn}.html`,
86 lastmod: moment.unix(item.edit_time).format('YYYY-MM-DD'), 86 lastmod: moment.unix(item.edit_time).format('YYYY-MM-DD'),
87 changefreq: 'daily', 87 changefreq: 'daily',
88 priority: 1.0, 88 priority: 1.0,