...
|
...
|
@@ -40,9 +40,9 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
/**
|
|
|
* 资源位
|
|
|
*/
|
|
|
_getTrendPop() {
|
|
|
_getTrendPop(contentCode) {
|
|
|
return service.get('operations/api/v5/resource/get', {
|
|
|
content_code: 'fa046a09b7c2c0e06927162404d95111',
|
|
|
content_code: contentCode,
|
|
|
}).then(result => {
|
|
|
if (result && result.code === 200 && result.data) {
|
|
|
return result.data[0];
|
...
|
...
|
@@ -52,12 +52,12 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
});
|
|
|
}
|
|
|
|
|
|
promotionData(uid, isApp) {
|
|
|
return api.all([this._getPromotionData(uid, isApp), this._getTrendPop()]).then(result => {
|
|
|
promotionData(uid, isApp, contentCode) {
|
|
|
return api.all([this._getPromotionData(uid, isApp), this._getTrendPop(contentCode)]).then(result => {
|
|
|
let friendPromotionData = {};
|
|
|
|
|
|
friendPromotionData = Object.assign(friendPromotionData, result[0]);
|
|
|
friendPromotionData.bannerSrc = _.get(result[7], 'data[0].src', '');
|
|
|
friendPromotionData.bannerSrc = _.get(result[1], 'data[0].src', '');
|
|
|
|
|
|
return friendPromotionData;
|
|
|
});
|
...
|
...
|
@@ -159,21 +159,6 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 好友邀请页
|
|
|
*/
|
|
|
friendInvite(uid, yhChannel, limit, page) {
|
|
|
return api.all([this._getPromotionData(uid), this._hotGoods(yhChannel, limit, page)]).then(result => {
|
|
|
let friendInviteData = {};
|
|
|
|
|
|
friendInviteData.hotGoods = result[1];
|
|
|
|
|
|
friendInviteData = Object.assign(friendInviteData, result[0]);
|
|
|
|
|
|
return friendInviteData;
|
|
|
});
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 好友邀请信息
|
|
|
*/
|
|
|
inviteUserInfo(inviteCode) {
|
...
|
...
|
@@ -185,4 +170,23 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
return result;
|
|
|
});
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 好友邀请页
|
|
|
*/
|
|
|
friendInvite(inciteCode, yhChannel, limit, page, contentCode) {
|
|
|
return api.all([this.inviteUserInfo(inciteCode), this._hotGoods(yhChannel, limit, page),
|
|
|
this._getTrendPop(contentCode)]).then(result => {
|
|
|
|
|
|
let friendInviteData = {};
|
|
|
|
|
|
friendInviteData.hotGoods = result[1];
|
|
|
|
|
|
friendInviteData = Object.assign(friendInviteData, result[0].data);
|
|
|
|
|
|
friendInviteData.imgSrc = _.get(result[2], 'data[0].src', '');
|
|
|
|
|
|
return friendInviteData;
|
|
|
});
|
|
|
}
|
|
|
}; |
...
|
...
|
|