detail.js
441 Bytes
/**
* 商品详情controller
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2016/5/6
*/
'use strict';
const mRoot = '../models';
// 商品详情model
const detail = require(`${mRoot}/detail`);
exports.index = (req, res) => {
var id = req.params.id;
detail({
id: id
}).then((result) => {
res.render('detail', {
result: JSON.stringify(result, null, 4),
devEnv: true
});
});
};