Commit b326e3fb31e56c85c8b2431a95ab4a7ce0849939

Authored by iOS-Xiaowen
1 parent f39617f0

no message

CNLiveBMineModule/Classes/Setting/AboutUs/CNLiveAboutUsController.m
@@ -41,56 +41,56 @@ static const NSInteger timeValue = 1.5; @@ -41,56 +41,56 @@ static const NSInteger timeValue = 1.5;
41 41
42 NSArray *data = @[ 42 NSArray *data = @[
43 @{ 43 @{
44 - @"style":@"1", 44 + @"style":@"0",
45 @"title":@"给软件评分", 45 @"title":@"给软件评分",
46 @"height":@"51", 46 @"height":@"51",
47 @"lineHeight":@"1" 47 @"lineHeight":@"1"
48 }, 48 },
49 @{ 49 @{
50 - @"style":@"1", 50 + @"style":@"0",
51 @"title":@"应用简介", 51 @"title":@"应用简介",
52 @"height":@"60", 52 @"height":@"60",
53 @"lineHeight":@"10" 53 @"lineHeight":@"10"
54 }, 54 },
55 @{ 55 @{
56 - @"style":@"1", 56 + @"style":@"0",
57 @"title":@"隐私政策协议", 57 @"title":@"隐私政策协议",
58 @"height":@"51", 58 @"height":@"51",
59 @"lineHeight":@"1" 59 @"lineHeight":@"1"
60 }, 60 },
61 @{ 61 @{
62 - @"style":@"1", 62 + @"style":@"0",
63 @"title":@"软件许可及服务协议", 63 @"title":@"软件许可及服务协议",
64 @"height":@"51", 64 @"height":@"51",
65 @"lineHeight":@"1" 65 @"lineHeight":@"1"
66 }, 66 },
67 @{ 67 @{
68 - @"style":@"1", 68 + @"style":@"0",
69 @"title":@"版权信息", 69 @"title":@"版权信息",
70 @"height":@"51", 70 @"height":@"51",
71 @"lineHeight":@"1" 71 @"lineHeight":@"1"
72 }, 72 },
73 @{ 73 @{
74 - @"style":@"1", 74 + @"style":@"0",
75 @"title":@"资质信息", 75 @"title":@"资质信息",
76 @"height":@"51", 76 @"height":@"51",
77 @"lineHeight":@"1" 77 @"lineHeight":@"1"
78 }, 78 },
79 @{ 79 @{
80 - @"style":@"4", 80 + @"style":@"1",
81 @"title":@"当前版本", 81 @"title":@"当前版本",
82 @"content":appVersion, 82 @"content":appVersion,
83 @"height":@"51", 83 @"height":@"51",
84 @"lineHeight":@"1" 84 @"lineHeight":@"1"
85 }, 85 },
86 @{ 86 @{
87 - @"style":@"1", 87 + @"style":@"0",
88 @"title":@"联系我们", 88 @"title":@"联系我们",
89 @"height":@"51", 89 @"height":@"51",
90 @"lineHeight":@"1" 90 @"lineHeight":@"1"
91 }, 91 },
92 @{ 92 @{
93 - @"style":@"1", 93 + @"style":@"0",
94 @"title":@"投诉", 94 @"title":@"投诉",
95 @"height":@"51", 95 @"height":@"51",
96 @"lineHeight":@"1" 96 @"lineHeight":@"1"
@@ -177,8 +177,8 @@ static const NSInteger timeValue = 1.5; @@ -177,8 +177,8 @@ static const NSInteger timeValue = 1.5;
177 [CNLiveUserAgreementManager jumpToAgreementH5WithType:CNLiveUserAgreementPermission]; 177 [CNLiveUserAgreementManager jumpToAgreementH5WithType:CNLiveUserAgreementPermission];
178 } 178 }
179 else if(indexPath.row == 4){ // 版权信息 179 else if(indexPath.row == 4){ // 版权信息
180 -// [CNLiveUserAgreementManager jumpToAgreementH5WithType:CNLiveUserAgreementCopyright];  
181 - 180 +// [CNLiveUserAgreementManager jumpToAgreementH5WithType:CNLiveUserAgreementComplaints];
  181 +
182 } 182 }
183 else if(indexPath.row == 5){ // 资质信息 183 else if(indexPath.row == 5){ // 资质信息
184 [CNLiveUserAgreementManager jumpToAgreementH5WithType:CNLiveUserAgreementQualificationInfo]; 184 [CNLiveUserAgreementManager jumpToAgreementH5WithType:CNLiveUserAgreementQualificationInfo];
@@ -216,8 +216,7 @@ static const NSInteger timeValue = 1.5; @@ -216,8 +216,7 @@ static const NSInteger timeValue = 1.5;
216 [alertController showWithAnimated:YES]; 216 [alertController showWithAnimated:YES];
217 217
218 }else if (indexPath.row == 8){ // 投诉 218 }else if (indexPath.row == 8){ // 投诉
219 -  
220 - 219 + [CNLiveUserAgreementManager jumpToAgreementH5WithType:CNLiveUserAgreementComplaints];
221 } 220 }
222 221
223 } 222 }
CNLiveBMineModule/Classes/Setting/Controller/CNLiveSettingController.m
@@ -42,7 +42,7 @@ static const NSInteger timeValue = 1.5; @@ -42,7 +42,7 @@ static const NSInteger timeValue = 1.5;
42 - (void)loadData { 42 - (void)loadData {
43 NSArray *data = @[ 43 NSArray *data = @[
44 @{ 44 @{
45 - @"style":@"1", 45 + @"style":@"2",
46 @"title":@"更换手机号", 46 @"title":@"更换手机号",
47 @"content":CNUserShareModel.mobile?CNUserShareModel.mobile:@"", 47 @"content":CNUserShareModel.mobile?CNUserShareModel.mobile:@"",
48 @"height":@"60", 48 @"height":@"60",
@@ -63,7 +63,7 @@ static const NSInteger timeValue = 1.5; @@ -63,7 +63,7 @@ static const NSInteger timeValue = 1.5;
63 @"lineHeight":@"10" 63 @"lineHeight":@"10"
64 }, 64 },
65 @{ 65 @{
66 - @"style":@"1", 66 + @"style":@"2",
67 @"title":@"清除缓存", 67 @"title":@"清除缓存",
68 @"content":@"30k", 68 @"content":@"30k",
69 @"height":@"51", 69 @"height":@"51",
CNLiveBMineModule/Classes/Setting/Model/CNLiveSettingModel.h
@@ -10,8 +10,9 @@ @@ -10,8 +10,9 @@
10 10
11 NS_ASSUME_NONNULL_BEGIN 11 NS_ASSUME_NONNULL_BEGIN
12 typedef NS_ENUM(NSInteger, CNLiveSettingModelType) { 12 typedef NS_ENUM(NSInteger, CNLiveSettingModelType) {
13 - CNLiveSettingModelTypeDefault = 0,  
14 - CNLiveSettingModelTypeText = 1 13 + CNLiveSettingModelTypeDefault = 0,//箭头
  14 + CNLiveSettingModelTypeTextOnly = 1, //文字
  15 + CNLiveSettingModelTypeText = 2 //文字+箭头
15 }; 16 };
16 17
17 @interface CNLiveSettingModel : NSObject 18 @interface CNLiveSettingModel : NSObject
CNLiveBMineModule/Classes/Setting/Model/CNLiveSettingModel.m
@@ -15,8 +15,11 @@ @@ -15,8 +15,11 @@
15 return CNLiveSettingModelTypeDefault; 15 return CNLiveSettingModelTypeDefault;
16 } 16 }
17 else if([self.style isEqualToString:@"1"]){ 17 else if([self.style isEqualToString:@"1"]){
18 - return CNLiveSettingModelTypeText; 18 + return CNLiveSettingModelTypeTextOnly;
19 } 19 }
  20 + else if([self.style isEqualToString:@"2"]){
  21 + return CNLiveSettingModelTypeText;
  22 + }
20 return CNLiveSettingModelTypeDefault; 23 return CNLiveSettingModelTypeDefault;
21 } 24 }
22 25
CNLiveBMineModule/Classes/Setting/View/CNLiveSettingCell.m
@@ -41,7 +41,6 @@ static const NSInteger margin = 12; @@ -41,7 +41,6 @@ static const NSInteger margin = 12;
41 _model = model; 41 _model = model;
42 _title.text = model.title; 42 _title.text = model.title;
43 _content.text = model.content; 43 _content.text = model.content;
44 - _content.hidden = _model.type == CNLiveSettingModelTypeDefault;  
45 [self xw_layoutSubviews]; 44 [self xw_layoutSubviews];
46 45
47 } 46 }
@@ -61,7 +60,7 @@ static const NSInteger margin = 12; @@ -61,7 +60,7 @@ static const NSInteger margin = 12;
61 make.height.offset(self.model.height-self.model.lineHeight); 60 make.height.offset(self.model.height-self.model.lineHeight);
62 61
63 }]; 62 }];
64 - 63 +
65 [_front mas_updateConstraints:^(MASConstraintMaker *make) { 64 [_front mas_updateConstraints:^(MASConstraintMaker *make) {
66 make.right.equalTo(self.line.mas_right).with.offset(-margin); 65 make.right.equalTo(self.line.mas_right).with.offset(-margin);
67 make.top.equalTo(self.title.mas_top).with.offset(0); 66 make.top.equalTo(self.title.mas_top).with.offset(0);
@@ -69,14 +68,34 @@ static const NSInteger margin = 12; @@ -69,14 +68,34 @@ static const NSInteger margin = 12;
69 make.height.equalTo(self.title.mas_height); 68 make.height.equalTo(self.title.mas_height);
70 69
71 }]; 70 }];
72 -  
73 - [_content mas_updateConstraints:^(MASConstraintMaker *make) {  
74 - make.top.equalTo(self.title.mas_top).with.offset(0);  
75 - make.left.equalTo(self.title.mas_right).with.offset(0);  
76 - make.right.equalTo(self.front.mas_left).with.offset(-margin);  
77 - make.height.equalTo(self.title.mas_height);  
78 -  
79 - }]; 71 +
  72 + switch (_model.type) {
  73 + case CNLiveSettingModelTypeTextOnly:
  74 + {
  75 + _front.hidden = YES;
  76 + [_content mas_updateConstraints:^(MASConstraintMaker *make) {
  77 + make.top.equalTo(self.title.mas_top).with.offset(0);
  78 + make.left.equalTo(self.title.mas_right).with.offset(0);
  79 + make.right.equalTo(self.contentView.mas_right).with.offset(-margin);
  80 + make.height.equalTo(self.title.mas_height);
  81 +
  82 + }];
  83 +
  84 + }
  85 + break;
  86 +
  87 + default: {
  88 + _front.hidden = NO;
  89 + [_content mas_updateConstraints:^(MASConstraintMaker *make) {
  90 + make.top.equalTo(self.title.mas_top).with.offset(0);
  91 + make.left.equalTo(self.title.mas_right).with.offset(0);
  92 + make.right.equalTo(self.front.mas_left).with.offset(-margin);
  93 + make.height.equalTo(self.title.mas_height);
  94 +
  95 + }];
  96 + }
  97 + break;
  98 + }
80 99
81 } 100 }
82 101
@@ -122,6 +141,7 @@ static const NSInteger margin = 12; @@ -122,6 +141,7 @@ static const NSInteger margin = 12;
122 _content.numberOfLines = 1; 141 _content.numberOfLines = 1;
123 _content.lineBreakMode = NSLineBreakByTruncatingTail; 142 _content.lineBreakMode = NSLineBreakByTruncatingTail;
124 _content.textColor = [UIColor colorWithRed:102/255.0 green:102/255.0 blue:102/255.0 alpha:1.0]; 143 _content.textColor = [UIColor colorWithRed:102/255.0 green:102/255.0 blue:102/255.0 alpha:1.0];
  144 + _content.textAlignment = NSTextAlignmentRight;
125 _content.font = UIFontCNMake(14.0); 145 _content.font = UIFontCNMake(14.0);
126 } 146 }
127 return _content; 147 return _content;