|
@@ -414,7 +414,7 @@ module.exports = class extends global.yoho.BaseModel { |
|
@@ -414,7 +414,7 @@ module.exports = class extends global.yoho.BaseModel { |
414
|
})).then(response => {
|
414
|
})).then(response => {
|
415
|
if (+response.code === 200) {
|
415
|
if (+response.code === 200) {
|
416
|
if (shareUid) {
|
416
|
if (shareUid) {
|
417
|
- this.sendPrizeCode(shareUid, actPrizeId, {isShareTake: true});
|
417
|
+ this.sendPrizeCode(shareUid, actPrizeId, {isShareTake: true, channel: productInfo.channel });
|
418
|
}
|
418
|
}
|
419
|
|
419
|
|
420
|
// 参与人数满时更新活动状态
|
420
|
// 参与人数满时更新活动状态
|
|
@@ -575,8 +575,13 @@ module.exports = class extends global.yoho.BaseModel { |
|
@@ -575,8 +575,13 @@ module.exports = class extends global.yoho.BaseModel { |
575
|
* @param actPrizeId
|
575
|
* @param actPrizeId
|
576
|
* @param extra
|
576
|
* @param extra
|
577
|
* @returns {*}
|
577
|
* @returns {*}
|
|
|
578
|
+ * CHANNELTYPE: {'yoluck渠道': 0, 'UFO渠道': 1,'YOHOOD渠道': 2}
|
578
|
*/
|
579
|
*/
|
579
|
sendWechatMessage(uid, actPrizeId, extra = {}) {
|
580
|
sendWechatMessage(uid, actPrizeId, extra = {}) {
|
|
|
581
|
+ if (extra.channel === 2) {
|
|
|
582
|
+ this.sendYohoodWechatMessage(uid, actPrizeId, extra = {});
|
|
|
583
|
+ return;
|
|
|
584
|
+ }
|
580
|
let info = {};
|
585
|
let info = {};
|
581
|
let baseUri = 'pages/zeroSell/detail';
|
586
|
let baseUri = 'pages/zeroSell/detail';
|
582
|
|
587
|
|
|
@@ -601,4 +606,38 @@ module.exports = class extends global.yoho.BaseModel { |
|
@@ -601,4 +606,38 @@ module.exports = class extends global.yoho.BaseModel { |
601
|
logger.error(e);
|
606
|
logger.error(e);
|
602
|
});
|
607
|
});
|
603
|
}
|
608
|
}
|
|
|
609
|
+
|
|
|
610
|
+ /**
|
|
|
611
|
+ * 向用户发送获得抽奖码消息
|
|
|
612
|
+ * @param uid
|
|
|
613
|
+ * @param actPrizeId
|
|
|
614
|
+ * @param extra
|
|
|
615
|
+ * @returns {*}
|
|
|
616
|
+ * CHANNELTYPE: {'yoluck渠道': 0, 'UFO渠道': 1,'YOHOOD渠道': 2}
|
|
|
617
|
+ */
|
|
|
618
|
+ sendYohoodWechatMessage(uid, actPrizeId, extra = {}) {
|
|
|
619
|
+ const { actStartTime, actEndTime, actName, miniAppType } = extra;
|
|
|
620
|
+ const activityTime = `${moment(actStartTime).format('YYYY.MM.DD HH:mm:ss')} - ${moment(actEndTime).format('YYYY.MM.DD HH:mm:ss')}`;
|
|
|
621
|
+
|
|
|
622
|
+ return this.get({
|
|
|
623
|
+ data: {
|
|
|
624
|
+ method: 'wechat.message.send',
|
|
|
625
|
+ sendScene: 'MINI_ACTIVITY_JOIN',
|
|
|
626
|
+ miniAppType: +miniAppType === 63 ? +miniAppType : 29,
|
|
|
627
|
+ params: JSON.stringify({
|
|
|
628
|
+ activityTitle: actName,
|
|
|
629
|
+ activityTime,
|
|
|
630
|
+ pageUrl: `pages/zeroSell/originalPriceSell?actPrizeId=${actPrizeId}`
|
|
|
631
|
+ }),
|
|
|
632
|
+ uidList: [uid]
|
|
|
633
|
+ }
|
|
|
634
|
+ }).then(result => {
|
|
|
635
|
+ if (result.code !== 200) {
|
|
|
636
|
+ logger.info(`zerobuy_join_notice send fail uid: ${uid}`);
|
|
|
637
|
+ }
|
|
|
638
|
+ })
|
|
|
639
|
+ .catch(e => {
|
|
|
640
|
+ logger.error(e);
|
|
|
641
|
+ });
|
|
|
642
|
+ }
|
604
|
}; |
643
|
}; |