Authored by 孙凯

add 优惠劵优化 review by chenlin

... ... @@ -75,11 +75,11 @@ export default class CouponCell extends React.Component {
frontView = {width: cellOneFront,height: 60,flexDirection: 'row'};
units = {marginLeft: 20,marginTop: 20,width: 15,height: 20};
unitsSize = {fontSize:20};
money = (Platform.OS === 'ios') ? {marginLeft: 1,marginTop: 15,width: 60,height: 25} : {marginLeft: 1,marginTop: 15,width: 60,height: 30};
money = (Platform.OS === 'ios') ? {marginLeft: 1,maxWidth: 60,marginTop: 15,height: 25} : {marginLeft: 1,marginTop: 15,width: 60,height: 30};
moneySize = {fontSize:25};
name = {marginLeft: 1,marginTop: 0,width: 160,height: 60,alignItems: 'center',justifyContent:'center',flexDirection:'row'};
name = {marginLeft: 10,marginTop: 0,width: 160,height: 60,alignItems: 'center',justifyContent:'center',flexDirection:'row'};
nameSize = {fontSize:15};
statesTitleStyle = {alignItems:'center',width: cellOneBack,height: 60};
statesTitleStyle = {alignItems:'center',marginTop: 5,width: cellOneBack,height: 60};
states = {marginTop: rowData.status==1?6:10,fontSize:9,width: 10,height: 60};
}else {
backgroundImage = require('../../../../image/coupons_s_r.png');
... ...
... ... @@ -107,10 +107,11 @@ class BrandStoreContainer extends Component {
}
_onPressCoupon(rowData, resourceId, rowID) {
if (rowData.status) {
this.props.actions.getCoupon(rowData.id);
}else {
if (rowData.status == 3) {
this.props.actions.couponHasRecived();
}else {
this.props.actions.getCoupon(rowData.id);
}
let param = {
... ...
... ... @@ -1281,7 +1281,7 @@ export function getCoupon(couponId) {
for (var i = 0; i < list.length; i++) {
let item = list[i];
if (item.id == couponId) {
item.status = false; //领取成功
item.status = 3; //领取成功
break;
}
}
... ...
... ... @@ -279,10 +279,10 @@ class RedPersonBrandContainer extends Component {
}
_onPressCoupon(rowData) {
if (rowData.status) {
this.props.actions.getCoupon(rowData.id);
}else {
if (rowData.status == 3) {
this.props.actions.couponHasRecived();
}else {
this.props.actions.getCoupon(rowData.id);
}
}
... ...
... ... @@ -1047,7 +1047,7 @@ export function getCoupon(couponId) {
for (var i = 0; i < list.length; i++) {
let item = list[i];
if (item.id == couponId) {
item.status = false; //领取成功
item.status = 3; //领取成功
break;
}
}
... ...