Commit 5e5aeefd authored by admin's avatar admin

修复上传图片排序错误 返回时刷新所有列表

parent b405c64b
......@@ -2,16 +2,4 @@
<Bucket
type = "0"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
scope = "0"
stopOnStyle = "0">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
......@@ -10,13 +10,13 @@
#define Url_h
// url 测试环境
// #define kRedStarURL @"http://218.244.151.129:7580/"
//#define kRedStarURL @"http://218.244.151.129:7580/"
// 正式环境
// #define kRedStarURL @"http://219.235.234.225:7580/"
#define kRedStarURL @"http://219.235.234.225:7580/"
// 最新正式环境
#define kRedStarURL @"http://219.235.234.212:7580/"
// #define kRedStarURL @"http://219.235.234.212:7580/"
// 检查更新
#define kCheckUpdateURL @"redstar-server/rest/ipapk?type=ipa"
......
......@@ -8,6 +8,14 @@
#import <UIKit/UIKit.h>
@protocol AddPictureDelegate <NSObject>
- (void)reloadList;
@end
@interface AddPictureViewController : UIViewController
@property (nonatomic, copy) NSString *category;
@property (nonatomic, assign) id <AddPictureDelegate>delegate;
@end
......@@ -8,7 +8,16 @@
#import <UIKit/UIKit.h>
@protocol PictureDetailDelegate <NSObject>
- (void)reloadList;
@end
@interface PictureStoryViewController : UIViewController
@property (nonatomic, copy) NSString *uuid;
@property (nonatomic, strong) NSString *titleStr;
@property (nonatomic, assign) id <PictureDetailDelegate>delegate;
@end
......@@ -78,7 +78,7 @@
self.tableView.dataSource = self;
self.imageNameArray = [NSMutableArray array];
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
[self requestPicturePraiseDetail];
}
......@@ -90,7 +90,6 @@
NSString *user_uuid = [[NSUserDefaults standardUserDefaults] objectForKey:@"user_uuid"];
NSString *url = [NSString stringWithFormat:@"%@%@%@?userUuid=%@", kRedStarURL, kPicturePraiseDetailURL, self.uuid, user_uuid];
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
HttpClient *http = [[HttpClient alloc] initWithUrl:url];
[http getPicturePraiseDetailWithCompletion:^(id response, NSError *error) {
......@@ -146,13 +145,12 @@
dispatch_async(dispatch_get_main_queue(), ^{
[self.tableView reloadData];
});
}];
}
[MBProgressHUD hideHUDForView:self.view animated:YES];
[self.tableView reloadData];
}];
}
......@@ -666,6 +664,11 @@
[MBProgressHUD hideHUDForView:self.view animated:YES];
}];
if (_delegate && [_delegate respondsToSelector:@selector(reloadList)]) {
[_delegate reloadList];
}
}
}
}
......
......@@ -27,7 +27,7 @@
#define kPictureTableViewCell @"pictureTabelViewCell"
@interface PictureViewController () <UITableViewDelegate, UITableViewDataSource, TaxisViewDelegate,ScopeTableViewDelegate, TimeTableViewDelegate >
@interface PictureViewController () <UITableViewDelegate, UITableViewDataSource, TaxisViewDelegate,ScopeTableViewDelegate, TimeTableViewDelegate , AddPictureDelegate, PictureDetailDelegate>
@property (nonatomic, strong) MenuView *menuView;
@property (nonatomic, strong) TaxisView *taxisView;
......@@ -53,14 +53,6 @@
@end
@implementation PictureViewController
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
[self requestPicturePraise];
}
- (void)viewDidLoad
{
[super viewDidLoad];
......@@ -78,6 +70,8 @@
self.navigationController.navigationBar.translucent = NO;
}
[self requestPicturePraise];
_page = 0;
}
......@@ -127,6 +121,7 @@
NSArray *permissions = [[NSUserDefaults standardUserDefaults] objectForKey:@"permissions"];
if ([permissions containsObject:@"500303"]) {
AddPictureViewController *addPic = [[AddPictureViewController alloc] init];
addPic.delegate = self;
addPic.category = self.category;
[self.navigationController pushViewController:addPic animated:YES];
......@@ -527,6 +522,11 @@
return mDate;
}
#pragma mark - AddPictureDelegate
- (void)reloadList
{
[self requestPicturePraise];
}
#pragma mark - MoreScreenDelegate
- (void)scopeTableViewClick:(NSInteger)row
......@@ -647,6 +647,7 @@
{
PictureListModel *picList = _allPraiseListArray[indexPath.row];
PictureStoryViewController *storyVC = [[PictureStoryViewController alloc] init];
storyVC.delegate = self;
storyVC.uuid = picList.uuid;
storyVC.titleStr = self.titleStr;
[self.navigationController pushViewController:storyVC animated:YES];
......
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