Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
红
红星美凯龙管理在线APP IOS
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张杰
红星美凯龙管理在线APP IOS
Commits
e4100e20
Commit
e4100e20
authored
Dec 02, 2015
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加查询的viewcontroller
parent
97ac91c6
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
659 additions
and
564 deletions
+659
-564
project.pbxproj
Pods/Pods.xcodeproj/project.pbxproj
+472
-472
AFNetworking.xcscheme
...serdata/admin.xcuserdatad/xcschemes/AFNetworking.xcscheme
+1
-1
Pods.xcscheme
...proj/xcuserdata/admin.xcuserdatad/xcschemes/Pods.xcscheme
+1
-1
SDWebImage.xcscheme
...cuserdata/admin.xcuserdatad/xcschemes/SDWebImage.xcscheme
+1
-1
xcschememanagement.plist
...data/admin.xcuserdatad/xcschemes/xcschememanagement.plist
+4
-4
project.pbxproj
redstar.xcodeproj/project.pbxproj
+6
-0
UserInterfaceState.xcuserstate
...userdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
HomeViewController.m
...r/Classes/Module/Home/ViewController/HomeViewController.m
+94
-85
SearchViewController.h
...Classes/Module/Home/ViewController/SearchViewController.h
+13
-0
SearchViewController.m
...Classes/Module/Home/ViewController/SearchViewController.m
+67
-0
No files found.
Pods/Pods.xcodeproj/project.pbxproj
View file @
e4100e20
This source diff could not be displayed because it is too large. You can
view the blob
instead.
Pods/Pods.xcodeproj/xcuserdata/admin.xcuserdatad/xcschemes/AFNetworking.xcscheme
View file @
e4100e20
...
...
@@ -14,7 +14,7 @@
buildForAnalyzing =
"YES"
>
<BuildableReference
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"
AE900CC8E6ED3E19DFF18311
"
BlueprintIdentifier =
"
17AE95F7A9A9C3B92C332D3E
"
BuildableName =
"libAFNetworking.a"
BlueprintName =
"AFNetworking"
ReferencedContainer =
"container:Pods.xcodeproj"
>
...
...
Pods/Pods.xcodeproj/xcuserdata/admin.xcuserdatad/xcschemes/Pods.xcscheme
View file @
e4100e20
...
...
@@ -14,7 +14,7 @@
buildForAnalyzing =
"YES"
>
<BuildableReference
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"
747D7E0958082D17803EDDAC
"
BlueprintIdentifier =
"
199D7984E4C79F2FE827B9F7
"
BuildableName =
"libPods.a"
BlueprintName =
"Pods"
ReferencedContainer =
"container:Pods.xcodeproj"
>
...
...
Pods/Pods.xcodeproj/xcuserdata/admin.xcuserdatad/xcschemes/SDWebImage.xcscheme
View file @
e4100e20
...
...
@@ -14,7 +14,7 @@
buildForAnalyzing =
"YES"
>
<BuildableReference
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"
2BC52E53FCF0B8169EC62C4C
"
BlueprintIdentifier =
"
16353C21856B847C437DDF61
"
BuildableName =
"libSDWebImage.a"
BlueprintName =
"SDWebImage"
ReferencedContainer =
"container:Pods.xcodeproj"
>
...
...
Pods/Pods.xcodeproj/xcuserdata/admin.xcuserdatad/xcschemes/xcschememanagement.plist
View file @
e4100e20
...
...
@@ -32,12 +32,12 @@
<
/
d
i
c
t
>
<
k
e
y
>
SuppressBuildableAutocreation
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
093DA7459B26B3BB6EA2FAB386E04977
<
/k
e
y
>
<
k
e
y
>
4082B3C59B8C69587CDAABCA983AFFE3
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
primary
<
/k
e
y
>
<
tru
e
/
>
<
/
d
i
c
t
>
<
k
e
y
>
4
082B3C59B8C69587CDAABCA983AFFE3
<
/k
e
y
>
<
k
e
y
>
4
150E8A3021008E6683A19FD6B05DAA6
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
primary
<
/k
e
y
>
<
tru
e
/
>
...
...
@@ -47,12 +47,12 @@
<
k
e
y
>
primary
<
/k
e
y
>
<
tru
e
/
>
<
/
d
i
c
t
>
<
k
e
y
>
641530337E97CC5094B7B5005825BE9E
<
/k
e
y
>
<
k
e
y
>
933B39CD36B6FAC0DA6DDB684400CB16
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
primary
<
/k
e
y
>
<
tru
e
/
>
<
/
d
i
c
t
>
<
k
e
y
>
89FEAF84E8C8693D1BADE75876809E36
<
/k
e
y
>
<
k
e
y
>
977186E6F9960A96887076F1E839B1A1
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
primary
<
/k
e
y
>
<
tru
e
/
>
...
...
redstar.xcodeproj/project.pbxproj
View file @
e4100e20
...
...
@@ -92,6 +92,7 @@
84D3E5F31C04BCD3001FF1DD
/* InspectNotUploadViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D3E5F21C04BCD3001FF1DD
/* InspectNotUploadViewController.m */
;
};
84D3E5F91C04BD8E001FF1DD
/* InspectNotUpLoadCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D3E5F81C04BD8E001FF1DD
/* InspectNotUpLoadCell.m */
;
};
84D3E6021C04DA85001FF1DD
/* InspectUpLoadFootView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D3E6011C04DA85001FF1DD
/* InspectUpLoadFootView.m */
;
};
84D554EE1C0EDFB8006C9AD0
/* SearchViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D554ED1C0EDFB8006C9AD0
/* SearchViewController.m */
;
};
84D80EB51BF714BE00A10EA4
/* GroupItems.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D80EB21BF714BE00A10EA4
/* GroupItems.m */
;
};
84D80EB61BF714BE00A10EA4
/* GroupTabBar.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D80EB41BF714BE00A10EA4
/* GroupTabBar.m */
;
};
84D8257F1BDD2F7E00CC61F7
/* MineTableFooterView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84D8257E1BDD2F7E00CC61F7
/* MineTableFooterView.m */
;
};
...
...
@@ -311,6 +312,8 @@
84D3E5F81C04BD8E001FF1DD
/* InspectNotUpLoadCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
InspectNotUpLoadCell.m
;
sourceTree
=
"<group>"
;
};
84D3E6001C04DA85001FF1DD
/* InspectUpLoadFootView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
InspectUpLoadFootView.h
;
sourceTree
=
"<group>"
;
};
84D3E6011C04DA85001FF1DD
/* InspectUpLoadFootView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
InspectUpLoadFootView.m
;
sourceTree
=
"<group>"
;
};
84D554EC1C0EDFB8006C9AD0
/* SearchViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
SearchViewController.h
;
sourceTree
=
"<group>"
;
};
84D554ED1C0EDFB8006C9AD0
/* SearchViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
SearchViewController.m
;
sourceTree
=
"<group>"
;
};
84D80EB11BF714BE00A10EA4
/* GroupItems.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
GroupItems.h
;
sourceTree
=
"<group>"
;
};
84D80EB21BF714BE00A10EA4
/* GroupItems.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
GroupItems.m
;
sourceTree
=
"<group>"
;
};
84D80EB31BF714BE00A10EA4
/* GroupTabBar.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
GroupTabBar.h
;
sourceTree
=
"<group>"
;
};
...
...
@@ -1670,6 +1673,8 @@
children
=
(
84FD89F01BD9FC71006E442A
/* HomeViewController.h */
,
84FD89F11BD9FC71006E442A
/* HomeViewController.m */
,
84D554EC1C0EDFB8006C9AD0
/* SearchViewController.h */
,
84D554ED1C0EDFB8006C9AD0
/* SearchViewController.m */
,
);
path
=
ViewController
;
sourceTree
=
"<group>"
;
...
...
@@ -1974,6 +1979,7 @@
8474C5991BE78BBC007DCF19
/* QuestionDetailCell.m in Sources */
,
8474C5911BE78A85007DCF19
/* QuestionListTableCell.m in Sources */
,
8490C4D71BF9DF1D006B6569
/* PictureStoryViewController.m in Sources */
,
84D554EE1C0EDFB8006C9AD0
/* SearchViewController.m in Sources */
,
84A673C01C0C7AEB000F828E
/* FuncItem.m in Sources */
,
84F1669B1BE715E40061D350
/* ZanButton.m in Sources */
,
84CC34DF1C0953C3002F10E2
/* HandOutViewController.m in Sources */
,
...
...
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
View file @
e4100e20
No preview for this file type
redstar/Classes/Module/Home/ViewController/HomeViewController.m
View file @
e4100e20
...
...
@@ -51,6 +51,7 @@
#import <MBProgressHUD.h>
#import <MJRefresh.h>
#import "SearchViewController.h"
@interface
HomeViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
UIScrollViewDelegate
,
UITextFieldDelegate
,
RankListHeaderDelegate
>
@property
(
nonatomic
,
strong
)
UIImageView
*
bgImageView
;
// 背景
...
...
@@ -1002,95 +1003,103 @@
return
_tableView
;
}
-
(
void
)
searchClick
:
(
UIButton
*
)
sender
{
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
// 口碑巡检
NSString
*
url1
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kRankingListURL
];
HttpClient
*
httpCilent1
=
[[
HttpClient
alloc
]
initWithUrl
:
url1
];
NSDictionary
*
parameters1
=
@{
@"keyword"
:
_searchTextField
.
text
,
@"queryOrders"
:
@[@{
@"direction"
:
@"asc"
}],
@"pageNumber"
:
@
(
0
),
@"pageSize"
:
@
(
3
)
};
__block
HomeViewController
*
weakSelf
=
self
;
[
httpCilent1
getRankingListWithParameters
:
parameters1
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"口碑排名response = %@"
,
response
);
NSDictionary
*
dataDict
=
response
[
@"data"
];
NSArray
*
dataArray
=
dataDict
[
@"records"
];
NSMutableArray
*
rankTempArr
=
[
NSMutableArray
array
];
for
(
NSDictionary
*
ListDict
in
dataArray
)
{
RankListModel
*
rankList
=
[
RankListModel
rankListModelWithDict
:
ListDict
];
[
rankTempArr
addObject
:
rankList
];
}
weakSelf
.
allRankListArray
=
rankTempArr
;
[
self
.
tableView
reloadData
];
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
}];
SearchViewController
*
searchVC
=
[[
SearchViewController
alloc
]
init
];
searchVC
.
customStr
=
_searchTextField
.
text
;
[
self
.
navigationController
pushViewController
:
searchVC
animated
:
YES
];
// 问题与知识
NSString
*
url2
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kQuestionListURL
];
NSString
*
user_uuid
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"user_uuid"
];
NSDictionary
*
parameters2
=
@{
@"keyword"
:
_searchTextField
.
text
,
@"user"
:
user_uuid
,
@"scope"
:
@"all"
,
@"pageNumber"
:
@
(
0
),
@"pageSize"
:
@
(
2
)
};
HttpClient
*
httpClient2
=
[[
HttpClient
alloc
]
initWithUrl
:
url2
];
[
httpClient2
getQuestionListWithParameters
:
parameters2
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSDictionary
*
dataDict
=
(
NSDictionary
*
)
response
[
@"data"
];
NSDictionary
*
recordsDict
=
(
NSDictionary
*
)
dataDict
[
@"records"
];
NSLog
(
@"问题与知识列表recods = %@"
,
response
);
NSMutableArray
*
questionTempArr
=
[
NSMutableArray
array
];
for
(
NSDictionary
*
questionDict
in
recordsDict
)
{
QuestionModel
*
question
=
[[
QuestionModel
alloc
]
init
];
[
question
setValuesForKeysWithDictionary
:
questionDict
];
[
questionTempArr
addObject
:
question
];
}
weakSelf
.
allQuestionArray
=
questionTempArr
;
[
self
.
tableView
reloadData
];
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
}];
// 口碑任务
NSString
*
url3
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kInspectListURL
];
HttpClient
*
httpCilent3
=
[[
HttpClient
alloc
]
initWithUrl
:
url3
];
NSDictionary
*
parameters3
=
@{
@"keyword"
:
_searchTextField
.
text
,
@"userUuid"
:
@""
,
@"queryOrders"
:
@[@{
@"field"
:
@"lastModifyInfo"
}],
@"pageNumber"
:
@
(
0
),
@"pageSize"
:
@
(
2
)
};
[
httpCilent3
getInspectListWithParameters
:
parameters3
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"巡检列表%@"
,
response
);
NSDictionary
*
dataDict
=
response
[
@"data"
];
NSArray
*
dataArray
=
dataDict
[
@"records"
];
NSMutableArray
*
inspectTempArr
=
[
NSMutableArray
array
];
for
(
NSDictionary
*
dict
in
dataArray
)
{
TaskListModel
*
taskList
=
[[
TaskListModel
alloc
]
init
];
[
taskList
setValuesForKeysWithDictionary
:
dict
];
[
inspectTempArr
addObject
:
taskList
];
}
_taskListDataArray
=
inspectTempArr
;
[
self
.
tableView
reloadData
];
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
}];
[
self
.
searchTextField
resignFirstResponder
];
}
//- (void)searchClick:(UIButton *)sender
//{
// [MBProgressHUD showHUDAddedTo:self.view animated:YES];
// // 口碑巡检
// NSString *url1 = [NSString stringWithFormat:@"%@%@", kRedStarURL, kRankingListURL];
// HttpClient *httpCilent1 = [[HttpClient alloc] initWithUrl:url1];
// NSDictionary *parameters1 = @{
// @"keyword":_searchTextField.text,
// @"queryOrders":@[@{@"direction":@"asc"}],
// @"pageNumber":@(0),
// @"pageSize":@(3)
// };
// __block HomeViewController *weakSelf = self;
// [httpCilent1 getRankingListWithParameters:parameters1 completion:^(id response, NSError *error) {
// NSLog(@"口碑排名response = %@", response);
// NSDictionary *dataDict = response[@"data"];
// NSArray *dataArray = dataDict[@"records"];
//
// NSMutableArray *rankTempArr = [NSMutableArray array];
// for (NSDictionary *ListDict in dataArray) {
// RankListModel *rankList = [RankListModel rankListModelWithDict:ListDict];
// [rankTempArr addObject:rankList];
// }
// weakSelf.allRankListArray = rankTempArr;
// [self.tableView reloadData];
// [MBProgressHUD hideHUDForView:self.view animated:YES];
// }];
//
//
// // 问题与知识
// NSString *url2 = [NSString stringWithFormat:@"%@%@", kRedStarURL, kQuestionListURL];
// NSString *user_uuid = [[NSUserDefaults standardUserDefaults] objectForKey:@"user_uuid"];
// NSDictionary *parameters2 = @{
// @"keyword":_searchTextField.text,
// @"user":user_uuid,
// @"scope":@"all",
// @"pageNumber":@(0),
// @"pageSize":@(2)
// };
//
// HttpClient *httpClient2 = [[HttpClient alloc] initWithUrl:url2];
// [httpClient2 getQuestionListWithParameters:parameters2 completion:^(id response, NSError *error) {
// NSDictionary *dataDict = (NSDictionary *)response[@"data"];
// NSDictionary *recordsDict = (NSDictionary *)dataDict[@"records"];
// NSLog(@"问题与知识列表recods = %@", response);
//
// NSMutableArray *questionTempArr = [NSMutableArray array];
//
// for (NSDictionary *questionDict in recordsDict) {
// QuestionModel *question = [[QuestionModel alloc] init];
// [question setValuesForKeysWithDictionary:questionDict];
// [questionTempArr addObject:question];
// }
// weakSelf.allQuestionArray = questionTempArr;
// [self.tableView reloadData];
// [MBProgressHUD hideHUDForView:self.view animated:YES];
// }];
//
//
// // 口碑任务
// NSString *url3 = [NSString stringWithFormat:@"%@%@", kRedStarURL, kInspectListURL];
// HttpClient *httpCilent3 = [[HttpClient alloc] initWithUrl:url3];
// NSDictionary *parameters3 = @{
// @"keyword":_searchTextField.text,
// @"userUuid":@"",
// @"queryOrders":@[@{@"field":@"lastModifyInfo"}],
// @"pageNumber":@(0),
// @"pageSize":@(2)
// };
//
// [httpCilent3 getInspectListWithParameters:parameters3 completion:^(id response, NSError *error) {
// NSLog(@"巡检列表%@", response);
// NSDictionary *dataDict = response[@"data"];
// NSArray *dataArray = dataDict[@"records"];
// NSMutableArray *inspectTempArr = [NSMutableArray array];
// for (NSDictionary *dict in dataArray) {
// TaskListModel *taskList = [[TaskListModel alloc] init];
// [taskList setValuesForKeysWithDictionary:dict];
// [inspectTempArr addObject:taskList];
// }
// _taskListDataArray = inspectTempArr;
// [self.tableView reloadData];
// [MBProgressHUD hideHUDForView:self.view animated:YES];
//
// }];
//
// [self.searchTextField resignFirstResponder];
//
//}
-
(
void
)
touchesEnded
:
(
NSSet
*
)
touches
withEvent
:
(
UIEvent
*
)
event
{
[
self
.
view
endEditing
:
YES
];
...
...
redstar/Classes/Module/Home/ViewController/SearchViewController.h
0 → 100644
View file @
e4100e20
//
// SearchViewController.h
// redstar
//
// Created by admin on 15/12/2.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
SearchViewController
:
UIViewController
@property
(
nonatomic
,
copy
)
NSString
*
customStr
;
@end
redstar/Classes/Module/Home/ViewController/SearchViewController.m
0 → 100644
View file @
e4100e20
//
// SearchViewController.m
// redstar
//
// Created by admin on 15/12/2.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "SearchViewController.h"
@interface
SearchViewController
()
@end
@implementation
SearchViewController
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
UILabel
*
customLab
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
100
,
30
)];
[
customLab
setTextColor
:[
UIColor
whiteColor
]];
[
customLab
setText
:
self
.
customStr
];
customLab
.
textAlignment
=
NSTextAlignmentCenter
;
customLab
.
font
=
[
UIFont
boldSystemFontOfSize
:
19
];
self
.
navigationItem
.
titleView
=
customLab
;
UIButton
*
backBtn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
backBtn
.
frame
=
CGRectMake
(
0
,
0
,
30
,
44
);
[
backBtn
setImage
:[
UIImage
imageNamed
:
@"back_btn"
]
forState
:
UIControlStateNormal
];
[
backBtn
addTarget
:
self
action
:
@selector
(
doBack
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
UIBarButtonItem
*
backItem
=
[[
UIBarButtonItem
alloc
]
initWithCustomView
:
backBtn
];
self
.
navigationItem
.
leftBarButtonItem
=
backItem
;
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
// Dispose of any resources that can be recreated.
}
-
(
void
)
viewWillAppear
:
(
BOOL
)
animated
{
[
super
viewWillAppear
:
animated
];
self
.
navigationController
.
navigationBar
.
hidden
=
NO
;
self
.
tabBarController
.
tabBar
.
hidden
=
YES
;
}
#pragma mark - Prative Methods
// 返回上一页面
-
(
void
)
doBack
:
(
UIBarButtonItem
*
)
sender
{
[
self
.
navigationController
popViewControllerAnimated
:
YES
];
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment