Commit e00ecea527d7c8527ae8d13c0652b7b4d7154212

Authored by zhangxiaowen
1 parent 47cff8ae

no message

CNLiveMineModule/Classes/Controller/CNLiveMineController.m
@@ -39,7 +39,6 @@ static const NSInteger kHEIGHT = 250; @@ -39,7 +39,6 @@ static const NSInteger kHEIGHT = 250;
39 @"titles":@[@"订单", @"待付款", @"待收货",@"待评价",@"售后"], 39 @"titles":@[@"订单", @"待付款", @"待收货",@"待评价",@"售后"],
40 @"images":@[@"mine_order",@"mine_pending",@"mine_received",@"mine_evaluate",@"mine_refund"] 40 @"images":@[@"mine_order",@"mine_pending",@"mine_received",@"mine_evaluate",@"mine_refund"]
41 }, 41 },
42 -  
43 @{ 42 @{
44 @"name":@"常用工具", 43 @"name":@"常用工具",
45 @"style":@"2", 44 @"style":@"2",
@@ -54,7 +53,6 @@ static const NSInteger kHEIGHT = 250; @@ -54,7 +53,6 @@ static const NSInteger kHEIGHT = 250;
54 @"margin":@"10", 53 @"margin":@"10",
55 @"titles": @[@"电子票"], 54 @"titles": @[@"电子票"],
56 @"images":@[@"mine_e-ticket"] 55 @"images":@[@"mine_e-ticket"]
57 -  
58 }, 56 },
59 @{ 57 @{
60 @"name":@"大众体育", 58 @"name":@"大众体育",
@@ -64,7 +62,6 @@ static const NSInteger kHEIGHT = 250; @@ -64,7 +62,6 @@ static const NSInteger kHEIGHT = 250;
64 @"titles": @[@"我的活动", @"我的记录"], @"images":@[@"mine_activity",@"mine_record"] 62 @"titles": @[@"我的活动", @"我的记录"], @"images":@[@"mine_activity",@"mine_record"]
65 63
66 } 64 }
67 -  
68 ]; 65 ];
69 for(NSDictionary *dic in data){ 66 for(NSDictionary *dic in data){
70 [self.data addObject:[CNLiveMineModel mj_objectWithKeyValues:dic]]; 67 [self.data addObject:[CNLiveMineModel mj_objectWithKeyValues:dic]];
CNLiveMineModule/Classes/Module/CNLiveMineModule.m
@@ -8,6 +8,9 @@ @@ -8,6 +8,9 @@
8 8
9 #import "CNLiveMineModule.h" 9 #import "CNLiveMineModule.h"
10 #import "CNLiveServices.h" 10 #import "CNLiveServices.h"
  11 +#import "CNLiveInfoUpdateController.h"
  12 +#import "CNLiveMineService.h"
  13 +#import "CNLiveMineServiceProtocol.h"
11 14
12 @BeeHiveMod(CNLiveMineModule) 15 @BeeHiveMod(CNLiveMineModule)
13 @interface CNLiveMineModule()<BHModuleProtocol> 16 @interface CNLiveMineModule()<BHModuleProtocol>
CNLiveMineModule/Classes/Module/CNLiveMineService.m
@@ -19,6 +19,7 @@ @@ -19,6 +19,7 @@
19 19
20 // 我的 20 // 我的
21 - (UIViewController *)getMineViewController { 21 - (UIViewController *)getMineViewController {
  22 +
22 return [CNLiveMineController new]; 23 return [CNLiveMineController new];
23 } 24 }
24 25
CNLiveMineModule/Classes/UserInfo/CNLiveInfoUpdateController.m
@@ -21,6 +21,8 @@ @@ -21,6 +21,8 @@
21 @end 21 @end
22 22
23 @implementation CNLiveInfoUpdateController 23 @implementation CNLiveInfoUpdateController
  24 +static const NSInteger margin = 15;
  25 +
24 #pragma mark - 初始化方法 26 #pragma mark - 初始化方法
25 - (instancetype)initWithModel:(CNLiveUserInfoModel *)model{ 27 - (instancetype)initWithModel:(CNLiveUserInfoModel *)model{
26 self = [super init]; 28 self = [super init];
@@ -89,7 +91,7 @@ @@ -89,7 +91,7 @@
89 rightBtn.frame = CGRectMake(0, 0, 50, 25); 91 rightBtn.frame = CGRectMake(0, 0, 50, 25);
90 rightBtn.backgroundColor = [UIColor lightGrayColor]; 92 rightBtn.backgroundColor = [UIColor lightGrayColor];
91 rightBtn.userInteractionEnabled = NO; 93 rightBtn.userInteractionEnabled = NO;
92 - rightBtn.titleLabel.font = [UIFont boldSystemFontOfSize:15]; 94 + rightBtn.titleLabel.font = [UIFont boldSystemFontOfSize:14];
93 [rightBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; 95 [rightBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
94 [rightBtn setTitle:@"完成" forState:UIControlStateNormal]; 96 [rightBtn setTitle:@"完成" forState:UIControlStateNormal];
95 rightBtn.adjustsImageWhenHighlighted = NO; 97 rightBtn.adjustsImageWhenHighlighted = NO;
@@ -101,16 +103,16 @@ @@ -101,16 +103,16 @@
101 self.navigationItem.rightBarButtonItem = rightItem; 103 self.navigationItem.rightBarButtonItem = rightItem;
102 } 104 }
103 - (void)textField_layoutSubViews { 105 - (void)textField_layoutSubViews {
104 - UIView *bgView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 50)]; 106 + UIView *bgView = [[UIView alloc] initWithFrame:CGRectMake(0, NavigationContentTop, SCREEN_WIDTH, 50)];
105 bgView.backgroundColor = [UIColor whiteColor]; 107 bgView.backgroundColor = [UIColor whiteColor];
106 [self.view addSubview:bgView]; 108 [self.view addSubview:bgView];
107 109
108 - UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(15, 0, SCREEN_WIDTH-30, 50)]; 110 + UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(margin, NavigationContentTop, SCREEN_WIDTH-2*margin, 50)];
109 textField.delegate = self; 111 textField.delegate = self;
110 textField.backgroundColor = [UIColor whiteColor];// 设置背景颜色 112 textField.backgroundColor = [UIColor whiteColor];// 设置背景颜色
111 textField.textColor = [UIColor blackColor]; // 设置文字的颜色 113 textField.textColor = [UIColor blackColor]; // 设置文字的颜色
112 textField.clearsOnBeginEditing = YES; // 当第二次输入的时候,清空上一次的内容 114 textField.clearsOnBeginEditing = YES; // 当第二次输入的时候,清空上一次的内容
113 - textField.font = [UIFont boldSystemFontOfSize:15.0f]; 115 + textField.font = [UIFont systemFontOfSize:15.0f];
114 textField.clearButtonMode = UITextFieldViewModeWhileEditing; // 编辑的时候会显示出删除全部的小X 116 textField.clearButtonMode = UITextFieldViewModeWhileEditing; // 编辑的时候会显示出删除全部的小X
115 [self.view addSubview:textField]; 117 [self.view addSubview:textField];
116 self.textField = textField; 118 self.textField = textField;
@@ -119,15 +121,15 @@ @@ -119,15 +121,15 @@
119 } 121 }
120 122
121 - (void)textView_layoutSubViews { 123 - (void)textView_layoutSubViews {
122 - UIView *bgView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 150)]; 124 + UIView *bgView = [[UIView alloc] initWithFrame:CGRectMake(0, NavigationContentTop, SCREEN_WIDTH, 150)];
123 bgView.backgroundColor = [UIColor whiteColor]; 125 bgView.backgroundColor = [UIColor whiteColor];
124 [self.view addSubview:bgView]; 126 [self.view addSubview:bgView];
125 127
126 - UITextView *textView = [[UITextView alloc] initWithFrame:CGRectMake(15, 0, SCREEN_WIDTH-30, 150)]; 128 + UITextView *textView = [[UITextView alloc] initWithFrame:CGRectMake(margin, NavigationContentTop, SCREEN_WIDTH-2*margin, 150)];
127 textView.delegate = self; 129 textView.delegate = self;
128 textView.backgroundColor = [UIColor whiteColor];// 设置背景颜色 130 textView.backgroundColor = [UIColor whiteColor];// 设置背景颜色
129 textView.textColor = [UIColor blackColor]; // 设置文字的颜色 131 textView.textColor = [UIColor blackColor]; // 设置文字的颜色
130 - textView.font = [UIFont boldSystemFontOfSize:15.0f]; 132 + textView.font = [UIFont systemFontOfSize:15.0f];
131 [self.view addSubview:textView]; 133 [self.view addSubview:textView];
132 self.textView = textView; 134 self.textView = textView;
133 self.textView.text = self.model.content; 135 self.textView.text = self.model.content;
@@ -158,7 +160,6 @@ @@ -158,7 +160,6 @@
158 - (BOOL)textViewShouldEndEditing:(UITextView *)textView{ 160 - (BOOL)textViewShouldEndEditing:(UITextView *)textView{
159 return YES; 161 return YES;
160 } 162 }
161 -  
162 - (void)textViewDidBeginEditing:(UITextView *)textView{ 163 - (void)textViewDidBeginEditing:(UITextView *)textView{
163 164
164 } 165 }
CNLiveMineModule/Classes/UserInfo/CNLiveUserInfoCell.m
@@ -55,7 +55,7 @@ static const NSInteger margin = 12; @@ -55,7 +55,7 @@ static const NSInteger margin = 12;
55 _pic.backgroundColor = [UIColor whiteColor]; 55 _pic.backgroundColor = [UIColor whiteColor];
56 _pic.contentMode = UIViewContentModeScaleToFill; 56 _pic.contentMode = UIViewContentModeScaleToFill;
57 _pic.layer.masksToBounds = YES; 57 _pic.layer.masksToBounds = YES;
58 - _pic.layer.cornerRadius = 2; 58 + _pic.layer.cornerRadius = 5.0;
59 UIImage *xw_image = [self xw_getImageName:model.content bundleName:@"CNLiveMineModule" targetClass:[CNLiveUserInfoCell class]]; 59 UIImage *xw_image = [self xw_getImageName:model.content bundleName:@"CNLiveMineModule" targetClass:[CNLiveUserInfoCell class]];
60 [_pic sd_setImageWithURL:[NSURL URLWithString:@"头像"] placeholderImage:xw_image]; 60 [_pic sd_setImageWithURL:[NSURL URLWithString:@"头像"] placeholderImage:xw_image];
61 61
Example/CNLiveMineModule/CNLIVEAppDelegate.m
@@ -18,7 +18,7 @@ @@ -18,7 +18,7 @@
18 CNLiveMineController *vc = [[CNLiveMineController alloc] init]; 18 CNLiveMineController *vc = [[CNLiveMineController alloc] init];
19 UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:vc]; 19 UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:vc];
20 self.window.rootViewController = nav;//设置根视图控制器 20 self.window.rootViewController = nav;//设置根视图控制器
21 - [self.window makeKeyAndVisible];//设置成为 21 + [self.window makeKeyAndVisible];
22 return YES; 22 return YES;
23 } 23 }
24 24