Authored by 郭成尧

前端入参修改

... ... @@ -12,14 +12,17 @@ const mRoot = '../models';
const detail = require(`${mRoot}/detail`);
exports.index = (req, res) => {
var id = req.params.id;
var uid = null, // 需要修改为正式取 UID 的方式
vipLevel = 0;// 用户等级
detail({
id: id,
ua: req.get('user-agent') || ''
id: req.params.id,
uid: uid,
vipLevel: vipLevel,
ua: req.get('user-agent') ||  ''
}).then((result) => {
res.render('detail', {
resultShow: JSON.stringify(result, null, 4),
resultShow: JSON.stringify(result, null, 4),
result: result,
devEnv: true,
module: 'product',
... ...
... ... @@ -502,9 +502,11 @@ module.exports = (data) => {
return api.get('', sign.apiSign({
productId: data.id,
uid: data.uid,
vipLevel: data.vipLevel,
method: 'h5.product.data'
})).then(result => {
finalResult = detailDataPkg(result, null, 0, data.ua);
finalResult = detailDataPkg(result, data.uid, data.vipLevel, data.ua);
return api.get('', sign.apiSign({
method: 'app.shop.queryShopsByBrandId',
... ...
/**
* router of sub app product
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2016/05/06
*/
'use strict';
const router = require('express').Router();
const cRoot = './controllers';
// 商品详情controller
const detail = require(`${cRoot}/detail`);
// routers
router.get('/detail/:id', detail.index);
module.exports = router;
\ No newline at end of file
/**
* router of sub app product
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2016/05/06
*/
'use strict';
const router = require('express').Router();
const cRoot = './controllers';
// 商品详情controller
const detail = require(`${cRoot}/detail`);
// routers
router.get('/detail/:id/:gid', detail.index);
module.exports = router;
... ...