index.js
565 Bytes
'use strict';
const SeoIndexModel = require('../../models/seo/index');
const index = (req, res) => {
let page = req.params[0];
let limit = req.params[1];
return req.ctx(SeoIndexModel).searchMipHandle({page: page, limit: limit}).then(result => {
res.setHeader('Content-Type', 'text/xml; charset=utf-8');
res.render('seo/index', {products: result});
});
};
const demoXml = (req, res) => {
res.setHeader('Content-Type', 'text/xml; charset=utf-8');
res.render('seo/demo-xml');
};
module.exports = {
index,
demoXml
};