Blame view

apps/product/controllers/similar.js 625 Bytes
李靖 authored
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
'use strict';

const headerModel = require('../../../doraemon/models/header'); // 头部model
const similarModel = require('../models/similar');

exports.index = (req, res, next) => {
    let responseData = {
        pageHeader: headerModel.setNav({
            navTitle: '找相似',
        }),
        module: 'product',
        page: 'similar',
        title: '找相似',
        width750: true,
        pageFooter: true,
        localCss: true
    };

    req.ctx(similarModel).list({skn: req.query.skn}).then(result => {
        res.render('similar/index', Object.assign(responseData, result));
    }).catch(next);
李靖 authored
22
};