|
@@ -46,6 +46,10 @@ module.exports = class extends Base {
|
|
|
const brand = await this.model('brand').where({id: info.brand_id}).find();
|
|
|
const commentCount = await this.model('comment').where({value_id: goodsId, type_id: 0}).count();
|
|
|
const hotComment = await this.model('comment').where({value_id: goodsId, type_id: 0}).find();
|
|
|
+ let activity = null;
|
|
|
+ if (info.activity_id > 0) {
|
|
|
+ activity = await this.model('activity').where({id: info.activity_id}).find();
|
|
|
+ }
|
|
|
let commentInfo = {};
|
|
|
if (!think.isEmpty(hotComment)) {
|
|
|
const commentUser = await this.model('user').field(['nicNkame', 'name', 'avatar_url']).where({id: hotComment.user_id}).find();
|
|
@@ -72,6 +76,7 @@ module.exports = class extends Base {
|
|
|
// return this.json(jsonData);
|
|
|
return this.success({
|
|
|
info: info,
|
|
|
+ activity: activity,
|
|
|
gallery: gallery,
|
|
|
attribute: attribute,
|
|
|
userHasCollect: userHasCollect,
|