修复兑换钻石时,本地使用了金币数判断问题
This commit is contained in:
@@ -40,9 +40,14 @@
|
||||
|
||||
}
|
||||
-(void)getExchangeDiamondInformation{
|
||||
@kWeakify(self);
|
||||
[Api getExchangeDiamondInformation:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
@kStrongify(self);
|
||||
XPExchangeDiamondsModel *model = [XPExchangeDiamondsModel modelWithDictionary:data.data];
|
||||
[[self getView]getExchangeDiamondInformation:model];
|
||||
XPExchangeDiamondsModel *tempModel = [XPExchangeDiamondsModel modelWithDictionary:data.data];
|
||||
model.golds = tempModel.diamonds;
|
||||
model.diamonds = tempModel.golds;
|
||||
[[self getView] getExchangeDiamondInformation:model];
|
||||
} showLoading:YES]];
|
||||
}
|
||||
-(void)confirmExchangeDiamondWithGoldNum:(NSString *)goldNum diamondNum:(NSString *)diamondNum currency:(NSString *)currency{
|
||||
|
@@ -37,13 +37,10 @@
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
|
||||
|
||||
|
||||
[self addSubview:self.myGoldView];
|
||||
[self addSubview:self.myDiamondsView];
|
||||
[self addSubview:self.confirmBtn];
|
||||
|
||||
|
||||
@kWeakify(self)
|
||||
self.myGoldView.inputCounthandle = ^(NSString *_Nonnull goldNum,NSString *_Nonnull diamondNum) {
|
||||
@kStrongify(self)
|
||||
@@ -228,12 +225,12 @@
|
||||
-(void)setModel:(XPExchangeDiamondsModel *)model{
|
||||
_model = model;
|
||||
if(self.type == IncomeRecord_Gold){
|
||||
_titleNumView.text = [NSString stringWithFormat:YMLocalizedString(@"XPExchangeDiamondsItemView0"),@(_model.diamonds)];
|
||||
_titleNumView.text = [NSString stringWithFormat:YMLocalizedString(@"XPExchangeDiamondsItemView0"),@(_model.golds)];
|
||||
UIImage *image = [UIImage imageNamed:@"ms_exchange_coin_icon"];
|
||||
[_iconView setImage:image forState:UIControlStateNormal];
|
||||
|
||||
}else{
|
||||
_titleNumView.text = [NSString stringWithFormat:YMLocalizedString(@"XPExchangeDiamondsItemView1"),_model.golds];
|
||||
_titleNumView.text = [NSString stringWithFormat:YMLocalizedString(@"XPExchangeDiamondsItemView1"),_model.diamonds];
|
||||
UIImage *image = [UIImage imageNamed:@"exchange_new_diamonds_icon"];
|
||||
[_iconView setImage:image forState:UIControlStateNormal];
|
||||
}
|
||||
|
Reference in New Issue
Block a user