...
|
...
|
@@ -289,6 +289,7 @@ class ActWheelSurfModelRedis extends global.yoho.BaseModel { |
|
|
sendResult.data = sendResult.data || {};
|
|
|
sendMessage(0, {}, {succeedTimes: sendResult.data.amount || 0}, 0);
|
|
|
|
|
|
logger.info(`app.redpac.addRedpac=>uid: ${uid}, ${JSON.stringify(sendResult || {})}`);
|
|
|
if (sendResult.code === 200) {
|
|
|
if (!sendResult.data.amount) {
|
|
|
sendResult.code = 201; // 重复领取
|
...
|
...
|
@@ -312,6 +313,7 @@ class ActWheelSurfModelRedis extends global.yoho.BaseModel { |
|
|
|
|
|
sendMessage(1, {}, {succeedTimes: 1}, 0);
|
|
|
|
|
|
logger.info(`app.coupons.couponsSend=>uid: ${uid}, ${JSON.stringify(sendResult || {})}`);
|
|
|
if (sendResult && sendResult.code === 200) {
|
|
|
getPrize.desc = '恭喜您获得' + getPrize.name + '优惠券';
|
|
|
}
|
...
|
...
|
@@ -331,13 +333,15 @@ class ActWheelSurfModelRedis extends global.yoho.BaseModel { |
|
|
data: {
|
|
|
method: 'ufo.coupons.send',
|
|
|
uid: uid,
|
|
|
coupon_tokens: getPrize.value
|
|
|
coupon_tokens: getPrize.value,
|
|
|
sendType: 2
|
|
|
},
|
|
|
api: UfoApi
|
|
|
});
|
|
|
|
|
|
sendMessage(1, {}, {succeedTimes: 1}, 0);
|
|
|
|
|
|
logger.info(`ufo.coupons.send=>uid: ${uid}, ${JSON.stringify(sendResult || {})}`);
|
|
|
if (sendResult && sendResult.code === 200) {
|
|
|
getPrize.desc = '恭喜您获得' + getPrize.name + '优惠券';
|
|
|
}
|
...
|
...
|
|