Authored by 陈林

增加显示已抢光优惠券。review by 孙凯。

@@ -56,9 +56,11 @@ export default class CouponCell extends React.Component { @@ -56,9 +56,11 @@ export default class CouponCell extends React.Component {
56 if (rowData.status == 1) { 56 if (rowData.status == 1) {
57 statesTitle = '立即领取'; 57 statesTitle = '立即领取';
58 }else if (rowData.status == 2) { 58 }else if (rowData.status == 2) {
59 - statesTitle = '已领取';  
60 - }else {  
61 statesTitle = '已抢光'; 59 statesTitle = '已抢光';
  60 + }else if (rowData.status == 3) {
  61 + statesTitle = '已领取';
  62 + }else if (rowData.status == 4){
  63 + statesTitle = '已过期';
62 } 64 }
63 if (yh_exposureData) { 65 if (yh_exposureData) {
64 yh_exposureData = { 66 yh_exposureData = {
@@ -396,14 +396,14 @@ function parseCouponList(json) { @@ -396,14 +396,14 @@ function parseCouponList(json) {
396 _.forEach(json, value => { 396 _.forEach(json, value => {
397 let couPonstatus = parseInt(value.status, 10); 397 let couPonstatus = parseInt(value.status, 10);
398 398
399 - if (couPonstatus === 1 || couPonstatus === 3) { 399 + if (couPonstatus === 1 || couPonstatus === 2 || couPonstatus === 3) {
400 shopCoupons.push({ 400 shopCoupons.push({
401 validity: value.couponValidity, 401 validity: value.couponValidity,
402 id: value.coupon_id, 402 id: value.coupon_id,
403 name: value.coupon_name, 403 name: value.coupon_name,
404 pic: value.coupon_pic, 404 pic: value.coupon_pic,
405 money: parseInt(value.money, 10), 405 money: parseInt(value.money, 10),
406 - status: couPonstatus === 1 406 + status: couPonstatus
407 }); 407 });
408 408
409 logShopCoupons.push({ 409 logShopCoupons.push({
@@ -984,14 +984,14 @@ function parseCouponList(json) { @@ -984,14 +984,14 @@ function parseCouponList(json) {
984 _.forEach(json, value => { 984 _.forEach(json, value => {
985 let couPonstatus = parseInt(value.status, 10); 985 let couPonstatus = parseInt(value.status, 10);
986 986
987 - if (couPonstatus === 1 || couPonstatus === 3) { 987 + if (couPonstatus === 1 || couPonstatus === 2 || couPonstatus === 3) {
988 shopCoupons.push({ 988 shopCoupons.push({
989 validity: value.couponValidity, 989 validity: value.couponValidity,
990 id: value.coupon_id, 990 id: value.coupon_id,
991 name: value.coupon_name, 991 name: value.coupon_name,
992 pic: value.coupon_pic, 992 pic: value.coupon_pic,
993 money: parseInt(value.money, 10), 993 money: parseInt(value.money, 10),
994 - status: couPonstatus === 1 994 + status: couPonstatus
995 }); 995 });
996 } 996 }
997 }); 997 });