Authored by Kennaki

Fix a bug on coupon. reviewed by Boss Kai.

... ... @@ -79,7 +79,7 @@ export function couponCenter(reload = false) {
dispatch(couponCenterSuccess(payload.floors));
dispatch(dataExposure(payload.logFloors));
couponExtraData(payload.floors ,contentCode, uid);
dispatch(couponExtraData(payload.floors ,contentCode, uid));
})
.catch(error => {
dispatch(couponCenterFailure(error));
... ... @@ -104,7 +104,9 @@ function couponExtraData(originFloors, contentCode, uid) {
originFloors.map((item, i) => {
if (item.templateName == 'getCoupon' && item.data) {
json.map((extraItem, k) => {
if (item.data.couponId == extraItem.couponId) {
let tempId = extraItem.couponId + '';
if (item.data.couponID == tempId) {
item.data.status = extraItem.status?extraItem.status:'';
item.data.hasNum = extraItem.hasNum?extraItem.hasNum:0;
}
... ...