...
|
...
|
@@ -414,7 +414,7 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
})).then(response => {
|
|
|
if (+response.code === 200) {
|
|
|
if (shareUid) {
|
|
|
this.sendPrizeCode(shareUid, actPrizeId, {isShareTake: true});
|
|
|
this.sendPrizeCode(shareUid, actPrizeId, {isShareTake: true, channel: productInfo.channel });
|
|
|
}
|
|
|
|
|
|
// 参与人数满时更新活动状态
|
...
|
...
|
@@ -575,8 +575,13 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
* @param actPrizeId
|
|
|
* @param extra
|
|
|
* @returns {*}
|
|
|
* CHANNELTYPE: {'yoluck渠道': 0, 'UFO渠道': 1,'YOHOOD渠道': 2}
|
|
|
*/
|
|
|
sendWechatMessage(uid, actPrizeId, extra = {}) {
|
|
|
if (extra.channel === 2) {
|
|
|
this.sendYohoodWechatMessage(uid, actPrizeId, extra = {});
|
|
|
return;
|
|
|
}
|
|
|
let info = {};
|
|
|
let baseUri = 'pages/zeroSell/detail';
|
|
|
|
...
|
...
|
@@ -601,4 +606,38 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
logger.error(e);
|
|
|
});
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 向用户发送获得抽奖码消息
|
|
|
* @param uid
|
|
|
* @param actPrizeId
|
|
|
* @param extra
|
|
|
* @returns {*}
|
|
|
* CHANNELTYPE: {'yoluck渠道': 0, 'UFO渠道': 1,'YOHOOD渠道': 2}
|
|
|
*/
|
|
|
sendYohoodWechatMessage(uid, actPrizeId, extra = {}) {
|
|
|
const { actStartTime, actEndTime, actName, miniAppType } = extra;
|
|
|
const activityTime = `${moment(actStartTime).format('YYYY.MM.DD HH:mm:ss')} - ${moment(actEndTime).format('YYYY.MM.DD HH:mm:ss')}`;
|
|
|
|
|
|
return this.get({
|
|
|
data: {
|
|
|
method: 'wechat.message.send',
|
|
|
sendScene: 'MINI_ACTIVITY_JOIN',
|
|
|
miniAppType: +miniAppType === 63 ? +miniAppType : 29,
|
|
|
params: JSON.stringify({
|
|
|
activityTitle: actName,
|
|
|
activityTime,
|
|
|
pageUrl: `pages/zeroSell/originalPriceSell?actPrizeId=${actPrizeId}`
|
|
|
}),
|
|
|
uidList: [uid]
|
|
|
}
|
|
|
}).then(result => {
|
|
|
if (result.code !== 200) {
|
|
|
logger.info(`zerobuy_join_notice send fail uid: ${uid}`);
|
|
|
}
|
|
|
})
|
|
|
.catch(e => {
|
|
|
logger.error(e);
|
|
|
});
|
|
|
}
|
|
|
}; |
...
|
...
|
|