Skip to content

Commit 5ed4b73

Browse files
author
秦程 MacBook Pro
committed
1、更换图标;
2、修复由首页跳转下页后返回一定概率崩溃的问题; 3、首页“为你推荐”列表及任务大厅列表添加点击等待提示框; 4、领取任务页面布局调整修复列表显示不全的bug; 5、个人资料页添加等待提示框;
1 parent d81d168 commit 5ed4b73

25 files changed

+103
-84
lines changed

Podfile

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
source 'https://github.com/CocoaPods/Specs.git'
21
platform :ios,'9.0'
32
use_frameworks!
43
target'taskApp' do
+30-30
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,62 @@
11
{
22
"images" : [
33
{
4-
"size" : "20x20",
4+
"filename" : "[email protected]",
55
"idiom" : "iphone",
6-
"filename" : "[email protected]",
7-
"scale" : "2x"
6+
"scale" : "2x",
7+
"size" : "20x20"
88
},
99
{
10-
"size" : "20x20",
10+
"filename" : "[email protected]",
1111
"idiom" : "iphone",
12-
"filename" : "[email protected]",
13-
"scale" : "3x"
12+
"scale" : "3x",
13+
"size" : "20x20"
1414
},
1515
{
16-
"size" : "29x29",
16+
"filename" : "[email protected]",
1717
"idiom" : "iphone",
18-
"filename" : "[email protected]",
19-
"scale" : "2x"
18+
"scale" : "2x",
19+
"size" : "29x29"
2020
},
2121
{
22-
"size" : "29x29",
22+
"filename" : "[email protected]",
2323
"idiom" : "iphone",
24-
"filename" : "[email protected]",
25-
"scale" : "3x"
24+
"scale" : "3x",
25+
"size" : "29x29"
2626
},
2727
{
28-
"size" : "40x40",
28+
"filename" : "[email protected]",
2929
"idiom" : "iphone",
30-
"filename" : "[email protected]",
31-
"scale" : "2x"
30+
"scale" : "2x",
31+
"size" : "40x40"
3232
},
3333
{
34-
"size" : "40x40",
34+
"filename" : "[email protected]",
3535
"idiom" : "iphone",
36-
"filename" : "[email protected]",
37-
"scale" : "3x"
36+
"scale" : "3x",
37+
"size" : "40x40"
3838
},
3939
{
40-
"size" : "60x60",
40+
"filename" : "[email protected]",
4141
"idiom" : "iphone",
42-
"filename" : "[email protected]",
43-
"scale" : "2x"
42+
"scale" : "2x",
43+
"size" : "60x60"
4444
},
4545
{
46-
"size" : "60x60",
46+
"filename" : "[email protected]",
4747
"idiom" : "iphone",
48-
"filename" : "[email protected]",
49-
"scale" : "3x"
48+
"scale" : "3x",
49+
"size" : "60x60"
5050
},
5151
{
52-
"size" : "1024x1024",
52+
"filename" : "icon.png",
5353
"idiom" : "ios-marketing",
54-
"filename" : "logostore_1024pt.png",
55-
"scale" : "1x"
54+
"scale" : "1x",
55+
"size" : "1024x1024"
5656
}
5757
],
5858
"info" : {
59-
"version" : 1,
60-
"author" : "xcode"
59+
"author" : "xcode",
60+
"version" : 1
6161
}
62-
}
62+
}
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

taskApp/TaskHall任务大厅/VC/TaskViewController.m

+8-5
Original file line numberDiff line numberDiff line change
@@ -195,27 +195,30 @@ - (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectio
195195
return 1;
196196
}
197197
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
198+
[self showDGActView];
198199
ListModel * model =self.listArr[indexPath.row];
199200
[HttpTool get:API_POST_taskInfo dic:@{@"id":model.listID} success:^(id _Nonnull responce) {
200-
if ([responce[@"code"] intValue]==200) {
201+
[self stopDGActView];
202+
if ([responce[@"code"] intValue] == 200) {
201203
if ([responce[@"data"][@"cateid"] intValue]==1) {
202-
203204
RegisDetailVC * VC =[[RegisDetailVC alloc]init];
204205
VC.hidesBottomBarWhenPushed=YES;
205206
VC.homeIndex=101;
206207
VC.dataDic =responce[@"data"];
207208
[self.navigationController pushViewController:VC animated:YES];
208-
209-
}else{
209+
}else {
210210
OrdinaryVC * VC =[[OrdinaryVC alloc]init];
211211
VC.hidesBottomBarWhenPushed=YES;
212212
VC.dataDic =responce[@"data"];
213213
VC.homeIndex=101;
214214
[self.navigationController pushViewController:VC animated:YES];
215215
}
216+
}else {
217+
[self showToastInView:self.view message:responce[@"message"] duration:0.8];
216218
}
217219
} faile:^(NSError * _Nonnull erroe) {
218-
220+
[self stopDGActView];
221+
[self showToastInView:self.view message: @"网络错误" duration:0.8];
219222
}];
220223
}
221224
-(void)chuanZhiType:(int)indexType{

taskApp/TaskHall任务大厅/VC/详情/下载/RegisDetailVC.m

+3-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ - (void)viewDidLoad {
4545
make.centerX.mas_equalTo(self.view.mas_centerX);
4646
make.height.mas_equalTo(height(40));
4747
make.width.mas_equalTo(width(345));
48-
make.bottom.mas_equalTo(self.view.mas_bottom).offset(-height(80));
48+
make.bottom.mas_equalTo(self.view.mas_bottom).offset(-height(34.0) - kSafeAreaBottomHeight);
4949
}];
5050
[[sureBtn rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(__kindof UIControl * _Nullable x) {
5151

@@ -93,11 +93,12 @@ -(void)load_lingQu_drawTask{
9393
}
9494
-(UITableView*)tableView{
9595
if (!_tableView) {
96-
_tableView =[[UITableView alloc]initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight) style:UITableViewStyleGrouped];
96+
_tableView =[[UITableView alloc]initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight - NavHeight) style:UITableViewStyleGrouped];
9797
_tableView.backgroundColor =[UIColor whiteColor];
9898
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
9999
_tableView.delegate =self;
100100
_tableView.dataSource =self;
101+
_tableView.tableFooterView = [[UIView alloc] initWithFrame: CGRectMake(0.0, 0.0, kScreenWidth, height(108))];
101102
[_tableView registerClass:[TaskDetailCell0 class] forCellReuseIdentifier:@"TaskDetailCell0"];
102103
[_tableView registerClass:[TaskDetailCell2 class] forCellReuseIdentifier:@"TaskDetailCell2"];
103104
}

taskApp/home首页/VC/HomeViewController.m

+40-37
Original file line numberDiff line numberDiff line change
@@ -67,30 +67,33 @@ -(void)load_userIndex{
6767

6868
}];
6969
}
70-
-(void)load_home_index{
71-
[self.coverUrlArr removeAllObjects];
72-
[self.coverArr removeAllObjects];
73-
[self.lableArr removeAllObjects];
70+
71+
-(void)load_home_index {
7472
[HttpTool get:API_POST_Home_index dic:@{@"client":@"2"} success:^(id _Nonnull responce) {
75-
self.homenCollection.ly_emptyView =[MyDIYEmpty diyNoDataEmpty];
73+
self.homenCollection.ly_emptyView = [MyDIYEmpty diyNoDataEmpty];
7674
[self.homenCollection.mj_header endRefreshing];
7775
if ([responce[@"code"] intValue]==200) {
76+
[self.coverUrlArr removeAllObjects];
77+
[self.coverArr removeAllObjects];
78+
[self.lableArr removeAllObjects];
79+
7880
[responce[@"data"][@"banner"] enumerateObjectsUsingBlock:^(NSDictionary* obj, NSUInteger idx, BOOL * _Nonnull stop) {
7981
[self.coverArr addObject:obj[@"cover"]];
80-
[self.coverUrlArr addObject:obj[@"url"]];
82+
[self.coverUrlArr addObject:obj[@"url"]];
8183
}];
82-
self.listArr =[ListModel mj_objectArrayWithKeyValuesArray:responce[@"data"][@"list"]];
84+
self.listArr = [ListModel mj_objectArrayWithKeyValuesArray:responce[@"data"][@"list"]];
8385
[responce[@"data"][@"list"] enumerateObjectsUsingBlock:^(NSDictionary * dic, NSUInteger idx, BOOL * _Nonnull stop) {
8486
[self.lableArr addObject:[LableModel mj_objectArrayWithKeyValuesArray:dic[@"label"]]];
8587
}];
86-
87-
88+
[self.homenCollection reloadData];
89+
}else {
90+
[self showToastInView:self.view message:responce[@"message"] duration:0.8];
8891
}
89-
[self.homenCollection reloadData];
9092
} faile:^(NSError * _Nonnull erroe) {
91-
93+
[self showToastInView:self.view message: @"网络错误\n请稍后下拉刷新页面" duration:0.8];
9294
}];
9395
}
96+
9497
-(UICollectionView*)homenCollection{
9598
if (!_homenCollection) {
9699
UICollectionViewFlowLayout * flow =[[UICollectionViewFlowLayout alloc]init];
@@ -138,12 +141,10 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collection
138141
else{
139142
HomeCell4 * cell4=[collectionView dequeueReusableCellWithReuseIdentifier:@"HomeCell4" forIndexPath:indexPath];
140143

141-
cell4.backgroundColor =BassColor(255,255,255);
142-
if (self.listArr.count==0) {
143-
144-
}else{
144+
cell4.backgroundColor = BassColor(255,255,255);
145+
if (indexPath.row < self.lableArr.count) {
145146
ListModel * model =self.listArr[indexPath.row];
146-
cell4.numLable.text =[NSString stringWithFormat:@"%ld",indexPath.row+1];
147+
cell4.numLable.text =[NSString stringWithFormat:@"%ld",indexPath.row + 1];
147148
[cell4 chuanZhiListModel:model modelArr:self.lableArr[indexPath.row]];
148149
}
149150

@@ -223,47 +224,49 @@ -(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPat
223224
VC.mmodel=self.cellModel;
224225
[self.navigationController pushViewController:VC animated:YES];
225226
}else if (self.listArr.count > indexPath.row) {
227+
[self showDGActView];
226228
ListModel * model = self.listArr[indexPath.row];
227229
[HttpTool get:API_POST_taskInfo dic:@{@"id":model.listID} success:^(id _Nonnull responce) {
230+
[self stopDGActView];
228231
if ([responce[@"code"] intValue]==200) {
229232
if ([responce[@"data"][@"cateid"] intValue]==1) {
230-
231233
RegisDetailVC * VC =[[RegisDetailVC alloc]init];
232234
VC.hidesBottomBarWhenPushed=YES;
233-
VC.dataDic =responce[@"data"];
234-
VC.homeIndex=102;
235+
VC.dataDic = responce[@"data"];
236+
VC.homeIndex = 102;
235237
[self.navigationController pushViewController:VC animated:YES];
236-
237-
}else{
238+
}else {
238239
OrdinaryVC * VC =[[OrdinaryVC alloc]init];
239240
VC.hidesBottomBarWhenPushed=YES;
240241
VC.homeIndex=102;
241242
VC.dataDic =responce[@"data"];
242243
[self.navigationController pushViewController:VC animated:YES];
243244
}
245+
}else {
246+
[self showToastInView:self.view message: @"暂时无法查看" duration:0.8];
244247
}
245248
} faile:^(NSError * _Nonnull erroe) {
246-
249+
[self stopDGActView];
250+
[self showToastInView:self.view message: @"网络错误,暂时无法查看" duration:0.8];
247251
}];
248252
}
249253
}
250-
-(void)clickBtn{
254+
255+
-(void)clickBtn {
251256

252257
}
253-
/*
254-
#pragma mark - Navigation
255258

256-
// In a storyboard-based application, you will often want to do a little preparation before navigation
257-
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
258-
// Get the new view controller using [segue destinationViewController].
259-
// Pass the selected object to the new view controller.
260-
}
261-
*/
262-
-(void)goToWeb:(NSInteger)index{
263-
HomeWebViC * webVC =[[HomeWebViC alloc]init];
264-
// webVC.name = @"用户协议";
265-
webVC.urlStr = self.coverUrlArr[index];
266-
webVC.hidesBottomBarWhenPushed =YES;
267-
[self.navigationController pushViewController:webVC animated:YES];
259+
-(void)goToWeb:(NSInteger)index {
260+
if (index < self.coverUrlArr.count) {
261+
NSString* urlStr = self.coverUrlArr[index];
262+
if ([[UIApplication sharedApplication] canOpenURL: [NSURL URLWithString: urlStr]]) {
263+
HomeWebViC * webVC =[[HomeWebViC alloc]init];
264+
webVC.urlStr = urlStr;
265+
webVC.hidesBottomBarWhenPushed = YES;
266+
[self.navigationController pushViewController:webVC animated:YES];
267+
return;
268+
}
269+
}
270+
[self showToastInView:self.view message: @"无法打开该页面" duration: 0.8];
268271
}
269272
@end

taskApp/home首页/VC/HomeWebViC.m

+3-4
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,14 @@ - (void)viewDidLoad {
2525
self.view.backgroundColor =BassColor(241, 241, 241);
2626
[self setLeftButton:@"" imgStr:@"2fanhui" selector:@selector(goToBack)];
2727
// 正文
28-
UIWebView *webView = [[UIWebView alloc] init];
29-
webView.frame = CGRectMake(0, 0, kScreenWidth, kScreenHeight);
30-
28+
UIWebView *webView = [[UIWebView alloc] init];
29+
webView.frame = CGRectMake(0, 0, kScreenWidth, kScreenHeight);
30+
3131

3232
webView.delegate = self;
3333
webView.scrollView.scrollEnabled = YES;
3434
[self.view addSubview:webView];
3535
_webView = webView;
36-
3736

3837
if (@available(iOS 11.0, *)) {
3938

taskApp/mine我的/个人资料/VC/PersonalDataVC.m

+19-5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
#import "PersinDataCell1.h"
1111
#import "PersinDataCell0.h"
1212
#import "RealNameVC.h"
13+
#import "UIView+Toast.h"
14+
1315
@interface PersonalDataVC ()<UIImagePickerControllerDelegate,UINavigationControllerDelegate,UITableViewDelegate,UITableViewDataSource,PersinDataCell0Delegate>
1416
@property(nonatomic,strong)UITableView * tableView;
1517
@property(nonatomic,strong)NSDictionary * dataDic;
@@ -23,6 +25,7 @@ @implementation PersonalDataVC
2325
-(void)clickBtn{
2426
[self.navigationController popViewControllerAnimated:YES];
2527
}
28+
2629
- (void)viewDidLoad {
2730
[super viewDidLoad];
2831
self.view.backgroundColor =BassColor(241, 241, 241);
@@ -95,21 +98,32 @@ -(void)load_API_POST_userUpdate{
9598
[self showToastInView:self.view message:@"网络错误" duration:0.8];
9699
}];
97100
}
101+
98102
-(void)load_userIndex{
103+
[self showDGActView];
99104
[HttpTool get:API_POST_userIndex dic:@{} success:^(id _Nonnull responce) {
105+
[self stopDGActView];
100106
if ([responce[@"code"] intValue]==200) {
101107
self.dataDic = responce[@"data"];
102108
NSData *data = [NSData dataWithContentsOfURL:[NSURL URLWithString:responce[@"data"][@"headimg"]]];
103109
self.img=[UIImage imageWithData:data];
104-
}else{
105-
110+
[self.tableView reloadData];
111+
}else {
112+
[self.view hideAllToasts];
113+
[self.view makeToast: responce[@"message"] duration:0.8 position:CSToastPositionCenter title:nil image:nil style:nil completion:^(BOOL didTap) {
114+
[self.navigationController popViewControllerAnimated:true];
115+
}];
106116
}
107-
[self.tableView reloadData];
108117
} faile:^(NSError * _Nonnull erroe) {
109-
118+
[self stopDGActView];
119+
[self.view hideAllToasts];
120+
[self.view makeToast: @"网络错误" duration:0.8 position:CSToastPositionCenter title:nil image:nil style:nil completion:^(BOOL didTap) {
121+
[self.navigationController popViewControllerAnimated:true];
122+
}];
110123
}];
111124
}
112-
-(UITableView*)tableView{
125+
126+
-(UITableView*)tableView {
113127
if (!_tableView) {
114128
_tableView =[[UITableView alloc]initWithFrame:CGRectMake(0, 0, kScreenWidth, height(435)) style:UITableViewStyleGrouped];
115129
_tableView.backgroundColor =BassColor(241, 241, 241);

0 commit comments

Comments
 (0)