Authored by yyq

detail limit

... ... @@ -77,7 +77,7 @@ function detail(req, res, next) {
req.ctx(YoLuckService).getDetail(id, uid).then(result => {
if (result.error) {
return next(result.error);
return Promise.reject(result.error);
}
res.render('yoluck/detail', {
... ...
... ... @@ -188,7 +188,7 @@ class YoLuckService extends global.yoho.BaseModel {
return result.data;
} catch (e) {
return {
error: '出错了'
error: e
};
}
}
... ... @@ -223,6 +223,11 @@ class YoLuckService extends global.yoho.BaseModel {
const result = {};
if (r1.error) {
result.error = r1.error;
return result;
}
result.userName = userName || _.get(r4, 'data.nickname', '') || '';
result.actPrizeId = actPrizeId;
result.product = !r1.error ? r1 : {};
... ...