Commit bfb0b34a authored by IOS-张 博's avatar IOS-张 博

首页标签

parent d5a5bd05
......@@ -69,6 +69,9 @@ typedef NS_ENUM(NSUInteger, HomeCardHeaderType) {
*/
@property (nonatomic, strong) NSString * repayBillStatusEnumType;
/// 消费返现比率 文案:消费返1%
@property (nonatomic, strong) NSString * costReturnCashRate;
///是否有提额标识
@property (nonatomic, strong) NSString * isHasQuotaFlag;
......
......@@ -97,6 +97,9 @@
//2改变scollView展示的视图
self.segmentView.selectBlock(QGAccountSegmentViewSelectTypeSavings);
//设置标签
self.segmentView.tagString = _dataModel.blankNote.costReturnCashRate;
//设置账单和分期cell
[self resetBillAndTermWithBlankNote:_dataModel.blankNote];
......
......@@ -26,6 +26,9 @@ typedef void(^QAccountSegmentViewSelectBlock)(QGAccountSegmentViewSelectType sel
/// 选中的block
@property (nonatomic, copy) QAccountSegmentViewSelectBlock selectBlock;
/// 储蓄账户显示的标签
@property (nonatomic, strong) NSString * tagString;
/// 外部选中事件
- (void)resetSelectButton:(QGAccountSegmentViewSelectType)selectType;
@end
......
......@@ -8,6 +8,7 @@
#import "QGCardAccountSegmentView.h"
#import "QGBasicUITool.h"
#import "QGDesignatedCornerView.h"
@interface QGCardAccountSegmentView ()
......@@ -19,6 +20,13 @@
/// 选中的按钮
@property (nonatomic, strong) UIButton * selectButton;
/// 标签
@property (nonatomic, strong) QGDesignatedCornerView * tagView;
/// 标签
@property (nonatomic, strong) UILabel * tagLabel;
@end
@implementation QGCardAccountSegmentView
......@@ -56,6 +64,26 @@
//默认选中第一个
self.selectButton = self.creditButton;
//红色小标签
self.tagView = [[QGDesignatedCornerView alloc] initWithRadius:4 corner:UIRectCornerTopLeft | UIRectCornerTopRight | UIRectCornerBottomRight];
self.tagView.backgroundColor = [UIColor colorWithHexString:@"FF2121"];
[self addSubview:self.tagView];
[self.tagView mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(11);
make.right.mas_equalTo(self.savingsButton.mas_right).offset(10);
make.bottom.mas_equalTo(self.savingsButton.mas_top).offset(7);
}];
//标签label
self.tagLabel = [UILabel creatLabelWithSuperView:self.tagLabel title:nil titleFontSize:[UIFont qg_mediumFontOfSize:7] textColor:[UIColor whiteColor] alignment:NSTextAlignmentCenter];
[self.tagView addSubview:self.tagLabel];
[self.tagLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.inset(4);
make.top.bottom.inset(0);
make.width.mas_lessThanOrEqualTo(220);
}];
}
return self;
}
......@@ -76,6 +104,14 @@
}
}
///设置标签
- (void)setTagString:(NSString *)tagString
{
self.tagView.hidden = [NSString isEmpty:tagString];
self.tagLabel.text = tagString;
}
#pragma mark - Action
/// 信用账户和储蓄账户点击事件
- (void)buttonClick:(UIButton *)button
......
......@@ -115,18 +115,8 @@
[infoDic setObject:IsStringNull(self.wechatInfoModel.unionid) forKey:@"unionId"];
[infoDic setObject:IsStringNull(self.wechatInfoModel.nickname) forKey:@"nickName"];
[infoDic setObject:IsStringNull(self.wechatInfoModel.headimgurl) forKey:@"headImgUrl"];
//1 为男性,2 为女性
if (self.wechatInfoModel.sex.integerValue == 1) {
[infoDic setObject:@"M" forKey:@"sex"];
}
else if (self.wechatInfoModel.sex.integerValue == 2)
{
[infoDic setObject:@"F" forKey:@"sex"];
}
else
{
[infoDic setObject:@"N" forKey:@"sex"];
}
[infoDic setObject:IsStringNull(self.wechatInfoModel.sex) forKey:@"sex"];
[QGHUDManager showHud:nil];
[[QGTalosNetwork shareManager] POST:urlStr parameters:infoDic success:^(id _Nonnull responseObject) {
[QGHUDManager hideHud];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment