Authored by 陈峰

Merge branch 'feature/wheel-surf' into 'release/6.7.9'

Feature/wheel surf



See merge request !68
... ... @@ -41,7 +41,7 @@ const sendMessage = (type, tags, fields, isFail) => {
fields
});
} catch (e) {
console.error(e);
logger.error(e);
}
};
... ... @@ -244,16 +244,19 @@ class ActWheelSurfModel extends global.yoho.BaseModel {
}
});
sendMessage(0, {}, {succeedTimes: sendResult.data && sendResult.data.amount || 0}, 0);
sendResult = sendResult || {};
sendResult.data = sendResult.data || {};
sendMessage(0, {}, {succeedTimes: sendResult.data.amount || 0}, 0);
if (sendResult && sendResult.code === 200) {
if (sendResult.data.isRepReceive === 'N') {
sendResult.code = 201; // 不能重复领取
if (sendResult.code === 200) {
if (!sendResult.data.amount) {
sendResult.code = 201; // 重复领取
} else {
getPrize.desc = '恭喜您获得' + sendResult.data.amount + '元红包';
}
}
} catch (e) {
logger.error(e);
sendMessage(0, {}, {message: e.message || 'interface error', stack: e}, 1);
}
} else if (getPrize.type === 3) {
... ... @@ -273,6 +276,7 @@ class ActWheelSurfModel extends global.yoho.BaseModel {
}
} catch (e) {
logger.error(e);
sendMessage(1, {}, {message: e.message || 'interface error', stack: e}, 1);
}
} else if (getPrize.type === 4) {
... ...