Skip to content

Commit

Permalink
修改model
Browse files Browse the repository at this point in the history
  • Loading branch information
lookingstars committed Oct 20, 2015
1 parent e067de4 commit f5fb283
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 1 deletion.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,22 @@
<Bucket
type = "0"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "nuomi/Controller/&#x9996;&#x9875;/JZHomeViewController.m"
timestampString = "467024938.099716"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "87"
endingLineNumber = "87"
landmarkName = "-viewWillDisappear:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
20 changes: 20 additions & 0 deletions nuomi/Controller/首页/JZHomeViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ - (void)viewDidLoad {
NSString *subStr = @"http%3A%2F%2Fhuodong.nuomi.com%2Factshow%2Fmobile%2Fcommon%2Fshort%2Fzhongqiu_manfan%3Fallcity%3D1%26key%3De492d73e8fed3aeac8a9321c94b77932%26cuid%3D11a2e62839f7bed05437dcb826be61a0c47a515c&hasshare=0&shareurl=http%3A%2F%2Fhuodong.nuomi.com%2Factshow%2Fmobile%2Fcommon%2Fshort%2Fzhongqiu_manfan_wap%3Fallcity%3D1";
subStr = [subStr stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
// NSLog(@"subStr :%@",subStr);

// UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(HideKeyboard)];
// [self.view addGestureRecognizer:tap];
}

-(void)HideKeyboard{
[self.view endEditing:YES];
}

- (void)didReceiveMemoryWarning {
Expand All @@ -76,6 +83,11 @@ -(void)viewWillAppear:(BOOL)animated{

}

-(void)viewWillDisappear:(BOOL)animated{
[super viewWillDisappear:animated];
[self.view endEditing:YES];
}

-(void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
self.navigationController.navigationBarHidden = YES;
Expand Down Expand Up @@ -127,6 +139,10 @@ -(void)getHotData {
__weak typeof(self) weakself = self;
[request getDataWithURL:url params:nil success:^(OPDataResponse *responseObject) {
NSLog(@"获取 首页 数据成功");
if (responseObject.error) {
NSLog(@"error: %@",responseObject.error);
return ;
}
_homepageM = responseObject.data;

_bannersArray = [[NSMutableArray alloc] initWithArray:_homepageM.banners];
Expand Down Expand Up @@ -156,6 +172,10 @@ -(void)getRecommendData {
__weak typeof(self) weakself = self;
[request getDataWithURL:url params:nil success:^(OPDataResponse *responseObject){
NSLog(@"获取 猜你喜欢 数据成功");
if (responseObject.error) {
NSLog(@"error: %@",responseObject.error);
return ;
}
if (responseObject.code == 0) {
JZHomeShopModel *homeShopM = responseObject.data;
_likeArray = homeShopM.tuan_list;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ -(void)requestData{
__weak typeof(self) weakself = self;
[request getDataWithURL:url params:nil success:^(OPDataResponse *responseObject) {
NSLog(@"请求 数据成功");
if (responseObject.error) {
NSLog(@"error: %@",responseObject.error);
return ;
}
_jingxuanM = responseObject.data;
if (_jingxuanM) {
_dataSource = [NSMutableArray arrayWithArray:_jingxuanM.list];
Expand Down
2 changes: 1 addition & 1 deletion nuomi/Model/首页/精选抢购/JZJingXuanModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
@property (nonatomic, strong) NSString *medium_title;

@property (nonatomic, strong) NSString *distance;
@property (nonatomic, strong) NSNumber *ugc_score;
@property (nonatomic, strong) NSString *ugc_score;
@property (nonatomic, strong) NSNumber *store_num;

@end

0 comments on commit f5fb283

Please sign in to comment.