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
f7270c2c
Commit
f7270c2c
authored
Dec 30, 2015
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复首页搜索无数据页面 口碑报告选择商场bug 下载pdf附件
parent
57e30e56
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
446 additions
and
78 deletions
+446
-78
project.pbxproj
redstar.xcodeproj/project.pbxproj
+1
-1
UserInterfaceState.xcuserstate
...userdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
AnnoDetailViewController.m
.../AnnounceDetail/ViewController/AnnoDetailViewController.m
+16
-8
OnLineViewController.m
...on/OnLine/AddOnLine/ViewController/OnLineViewController.m
+10
-5
SelectStoreViewController.m
...ne/SelectStore/ViewController/SelectStoreViewController.m
+13
-2
PictureStoryViewController.m
...PictureDetail/ViewController/PictureStoryViewController.m
+66
-6
SOPViewController.m
...n/Standar/SOPCategarys/ViewController/SOPViewController.m
+27
-6
RankingListViewController.m
...ng/RankingList/ViewController/RankingListViewController.m
+10
-6
SearchViewController.m
...Classes/Module/Home/ViewController/SearchViewController.m
+303
-40
Info.plist
redstar/Info.plist
+0
-4
No files found.
redstar.xcodeproj/project.pbxproj
View file @
f7270c2c
...
...
@@ -2292,7 +2292,7 @@
CreatedOnToolsVersion
=
7.0.1
;
SystemCapabilities
=
{
com.apple.BackgroundModes
=
{
enabled
=
1
;
enabled
=
0
;
};
com.apple.Push
=
{
enabled
=
0
;
...
...
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
View file @
f7270c2c
No preview for this file type
redstar/Classes/Module/Announce/AnnounceDetail/ViewController/AnnoDetailViewController.m
View file @
f7270c2c
...
...
@@ -22,7 +22,7 @@
#define kAnnounceContentCell @"AnnoContentTableViewCell"
#define kAttachmentTableViewCell @"AttachmentTableViewCell"
@interface
AnnoDetailViewController
()
<
UITableViewDataSource
,
UITableViewDelegate
,
UIDocumentInteractionControllerDelegate
>
@interface
AnnoDetailViewController
()
<
UITableViewDataSource
,
UITableViewDelegate
,
UIDocumentInteractionControllerDelegate
,
UIAlertViewDelegate
>
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
strong
)
AnnounceDetailHeadView
*
headerView
;
...
...
@@ -125,7 +125,7 @@
docController
.
delegate
=
self
;
//设置代理
[
docController
presentPreviewAnimated
:
YES
];
}
else
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"文件不存在,请
先下载在
查看!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"文件不存在,请
下载后再
查看!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
[
alert
show
];
}
}
...
...
@@ -177,19 +177,27 @@
//已完成下载
[
operation
setCompletionBlockWithSuccess
:
^
(
AFHTTPRequestOperation
*
operation
,
id
responseObject
)
{
NSLog
(
@"下载成功"
);
[
self
.
tableView
reloadData
];
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"下载成功!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
alert
.
tag
=
66690
;
[
alert
show
];
}
failure
:
^
(
AFHTTPRequestOperation
*
operation
,
NSError
*
error
)
{
NSLog
(
@"下载失败"
);
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"警告"
message
:
@"下载失败!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
[
alert
show
];
}];
[
operation
start
];
}
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
// Dispose of any resources that can be recreated.
#pragma mark - UIAlertViewDelegate
-
(
void
)
alertView
:
(
UIAlertView
*
)
alertView
clickedButtonAtIndex
:
(
NSInteger
)
buttonIndex
{
if
(
alertView
.
tag
==
66690
)
{
if
(
buttonIndex
==
0
)
{
[
self
.
tableView
reloadData
];
}
}
}
#pragma mark - UITableView Delegate/DataSource
...
...
redstar/Classes/Module/Function/OnLine/AddOnLine/ViewController/OnLineViewController.m
View file @
f7270c2c
...
...
@@ -132,13 +132,18 @@
{
NSString
*
nameStr
=
@""
;
_uuidArray
=
[
NSMutableArray
array
];
if
(
array
.
count
==
0
)
{
_storeName
=
@"全部"
;
}
else
{
for
(
TreeNodeModel
*
model
in
array
)
{
nameStr
=
[
nameStr
stringByAppendingString
:[
NSString
stringWithFormat
:
@"%@,"
,
model
.
name
]];
NSDictionary
*
dict
=
[
NSDictionary
dictionaryWithObjectsAndKeys
:
model
.
uuid
,
@"store_uuid"
,
model
.
code
,
@"store_code"
,
model
.
name
,
@"store_name"
,
nil
];
[
_uuidArray
addObject
:
dict
];
}
NSIndexPath
*
indexPath
=
[
NSIndexPath
indexPathForRow
:
0
inSection
:
0
];
_storeName
=
nameStr
;
}
NSIndexPath
*
indexPath
=
[
NSIndexPath
indexPathForRow
:
0
inSection
:
0
];
[
self
.
tableView
reloadRowsAtIndexPaths
:@[
indexPath
]
withRowAnimation
:
UITableViewRowAnimationFade
];
}
...
...
redstar/Classes/Module/Function/OnLine/SelectStore/ViewController/SelectStoreViewController.m
View file @
f7270c2c
...
...
@@ -43,6 +43,14 @@
self
.
view
.
backgroundColor
=
kFootViewBackGroundColor
;
// UIButton *rightButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 60, 20)];
// [rightButton setTitle:@"全部重置" forState:UIControlStateNormal];
// [rightButton addTarget:self action:@selector(resetClick:) forControlEvents:UIControlEventTouchUpInside];
// [rightButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
// rightButton.titleLabel.font = [UIFont systemFontOfSize:15];
// UIBarButtonItem *rightButtonItem = [[UIBarButtonItem alloc] initWithCustomView:rightButton];
// self.navigationItem.rightBarButtonItem = rightButtonItem;
UILabel
*
customLab
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
40
,
30
)];
[
customLab
setTextColor
:[
UIColor
whiteColor
]];
[
customLab
setText
:
@"选择商场"
];
...
...
@@ -69,6 +77,11 @@
}
-
(
void
)
resetClick
:
(
UIButton
*
)
sender
{
}
-
(
void
)
sureClick
:
(
UIButton
*
)
sender
{
if
(
_delegate
&&
[
_delegate
respondsToSelector
:
@selector
(
deliverWithArray
:)])
{
...
...
@@ -91,10 +104,8 @@
@"pageNumber"
:
@
(
0
),
@"pageSize"
:
@
(
999
)
};
NSLog
(
@"url = %@"
,
url
);
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
[
httpClient
queryLowerOrgsWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"查询下级组织 reponse = %@,error = %@"
,
response
,
error
);
NSDictionary
*
data
=
response
[
@"data"
];
NSArray
*
dataArray
=
data
[
@"records"
];
NSMutableArray
*
oneTree
=
[
NSMutableArray
array
];
...
...
redstar/Classes/Module/Function/Picture/PictureDetail/ViewController/PictureStoryViewController.m
View file @
f7270c2c
...
...
@@ -20,6 +20,7 @@
#import "CommentView.h"
#import <MBProgressHUD.h>
#import "CommentModel.h"
#import "CommonFunc.h"
#import <UIImageView+WebCache.h>
#import <UIButton+WebCache.h>
...
...
@@ -41,6 +42,8 @@
@property
(
nonatomic
,
copy
)
NSString
*
pictureUuid
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
imageNameArray
;
@end
@implementation
PictureStoryViewController
...
...
@@ -55,6 +58,7 @@
[
super
viewDidLoad
];
self
.
picTextArray
=
[
NSMutableArray
array
];
self
.
imageNameArray
=
[
NSMutableArray
array
];
self
.
view
.
backgroundColor
=
[
UIColor
whiteColor
];
self
.
automaticallyAdjustsScrollViewInsets
=
NO
;
...
...
@@ -76,7 +80,6 @@
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@%@?userUuid=%@"
,
kRedStarURL
,
kPicturePraiseDetailURL
,
self
.
uuid
,
user_uuid
];
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
HttpClient
*
http
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
__block
PictureStoryViewController
*
weakSelf
=
self
;
[
http
getPicturePraiseDetailWithCompletion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"图说口碑详情 res ===%@, error = %@"
,
response
,
error
);
...
...
@@ -99,14 +102,51 @@
[
_picTextArray
addObject
:
picText
];
}
weakSelf
.
tableView
.
delegate
=
self
;
weakSelf
.
tableView
.
dataSource
=
self
;
// dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^{
// [self reloadPictureText:_picTextArray];
// });
self
.
tableView
.
delegate
=
self
;
self
.
tableView
.
dataSource
=
self
;
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
}];
}
-
(
void
)
reloadPictureText
:
(
NSMutableArray
*
)
picTextArray
{
if
(
picTextArray
.
count
==
0
)
{
return
;
}
for
(
int
i
=
0
;
i
<
picTextArray
.
count
;
i
++
)
{
PicTextModel
*
picText
=
picTextArray
[
i
];
if
(
picText
.
fileName
.
length
!=
0
)
{
NSURL
*
imageURL
=
[
NSURL
URLWithString
:
picText
.
fileUrl
];
NSData
*
imageData
=
[
NSData
dataWithContentsOfURL
:
imageURL
];
NSString
*
imageName
=
picText
.
fileName
;
[
_imageNameArray
addObject
:
imageName
];
// 获取沙盒目录
NSString
*
cachePath
=
[
NSSearchPathForDirectoriesInDomains
(
NSCachesDirectory
,
NSUserDomainMask
,
YES
)
objectAtIndex
:
0
];
NSString
*
fullPath
=
[
cachePath
stringByAppendingPathComponent
:
imageName
];
// 将图片写入文件
[
imageData
writeToFile
:
fullPath
atomically
:
NO
];
}
}
dispatch_async
(
dispatch_get_main_queue
(),
^
{
[
_tableView
reloadData
];
});
}
-
(
void
)
setupNav
{
UILabel
*
customLab
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
40
,
30
)];
...
...
@@ -326,10 +366,16 @@
cell
=
[[
PictureTextTableCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
kPictureTextTableCell
];
}
NSURL
*
imageUrl
=
[
NSURL
URLWithString
:[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
picText
.
fileUrl
]];
UIImage
*
defaultImage
=
[
UIImage
imageNamed
:
@"default_pic"
];
// defaultImage = [defaultImage resizableImageWithCapInsets:UIEdgeInsetsMake(38, 85, 22, 85) resizingMode:UIImageResizingModeStretch];
[
cell
.
bigImageView
sd_setImageWithURL
:
imageUrl
placeholderImage
:
defaultImage
];
// [cell.bigImageView sd_setImageWithURL:imageUrl placeholderImage:[UIImage imageNamed:@"default_pic"]];
[
cell
.
bigImageView
sd_setImageWithURL
:
imageUrl
];
NSLog
(
@"cell.size = %@"
,
NSStringFromCGSize
(
cell
.
bigImageView
.
image
.
size
));
// [cell.bigImageView sd_setImageWithURL:imageUrl];
UITapGestureRecognizer
*
tap
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
tapClick
:
)];
[
cell
.
bigImageView
addGestureRecognizer
:
tap
];
...
...
@@ -341,6 +387,20 @@
}
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
// if (_imageNameArray.count == 0) {
// cell.bigImageView.image = [UIImage imageNamed:@"default_pic"];
// } else {
// // 获取沙盒目录
// NSString *cachePath = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) objectAtIndex:0];
// NSString *fullPath = [cachePath stringByAppendingPathComponent:_imageNameArray[0]];
// UIImage *image = [UIImage imageWithContentsOfFile:fullPath];
// cell.bigImageView.image = image;
// //[cell ];
// }
return
cell
;
}
...
...
redstar/Classes/Module/Function/Standar/SOPCategarys/ViewController/SOPViewController.m
View file @
f7270c2c
...
...
@@ -18,7 +18,7 @@
#define SELECTED_VIEW_CONTROLLER_TAG 39998
@interface
SOPViewController
()
<
GroupTabBarDelegate
,
SOPTableViewDelegate
,
UITableViewDelegate
,
UITableViewDataSource
,
UIDocumentInteractionControllerDelegate
>
@interface
SOPViewController
()
<
UIAlertViewDelegate
,
GroupTabBarDelegate
,
SOPTableViewDelegate
,
UITableViewDelegate
,
UITableViewDataSource
,
UIDocumentInteractionControllerDelegate
>
@property
(
nonatomic
,
strong
)
GroupTabBar
*
groupTabBar
;
@property
(
nonatomic
,
strong
)
NSArray
*
titleArray
;
...
...
@@ -256,7 +256,9 @@
NSArray
*
paths
=
NSSearchPathForDirectoriesInDomains
(
NSDocumentDirectory
,
NSUserDomainMask
,
YES
);
NSString
*
path
=
paths
.
lastObject
;
[
self
downloadFileURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
atta
.
fileUrl
]
savePath
:
path
fileName
:
atta
.
fileName
];
NSString
*
fileName
=
[
NSString
stringWithFormat
:
@"%@"
,
atta
.
fileName
];
fileName
=
[
fileName
stringByAddingPercentEscapesUsingEncoding
:
NSUTF8StringEncoding
];
[
self
downloadFileURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
atta
.
fileUrl
]
savePath
:
path
fileName
:
fileName
];
}
-
(
void
)
downloadFileURL
:
(
NSString
*
)
aUrl
savePath
:
(
NSString
*
)
aSavePath
fileName
:
(
NSString
*
)
aFileName
...
...
@@ -276,8 +278,11 @@
if
(
!
[
fileManager
fileExistsAtPath
:
aSavePath
])
{
[
fileManager
createDirectoryAtPath
:
aSavePath
withIntermediateDirectories
:
YES
attributes
:
nil
error
:
nil
];
}
NSLog
(
@"aurlllll === %@"
,
aUrl
);
//下载附件
aUrl
=
[
aUrl
stringByAddingPercentEscapesUsingEncoding
:
NSUTF8StringEncoding
];
NSLog
(
@"aurlllll === %@"
,
aUrl
);
NSURL
*
url
=
[[
NSURL
alloc
]
initWithString
:
aUrl
];
NSURLRequest
*
request
=
[
NSURLRequest
requestWithURL
:
url
];
...
...
@@ -290,10 +295,15 @@
//已完成下载
[
operation
setCompletionBlockWithSuccess
:
^
(
AFHTTPRequestOperation
*
operation
,
id
responseObject
)
{
NSLog
(
@"下载成功"
);
[
self
.
tableView
reloadData
];
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"提示"
message
:
@"下载成功!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
alert
.
tag
=
66690
;
[
alert
show
];
}
failure
:
^
(
AFHTTPRequestOperation
*
operation
,
NSError
*
error
)
{
NSLog
(
@"下载失败"
);
NSLog
(
@"error ==== %@"
,
error
);
[
self
.
tableView
reloadData
];
[
self
closeRedView
];
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
@"警告"
message
:
@"下载失败!"
delegate
:
self
cancelButtonTitle
:
nil
otherButtonTitles
:
@"确定"
,
nil
];
[
alert
show
];
}];
[
operation
start
];
...
...
@@ -404,6 +414,17 @@
{
[
self
.
navigationController
dismissViewControllerAnimated
:
YES
completion
:
nil
];
}
#pragma mark - UIAlertViewDelegate
-
(
void
)
alertView
:
(
UIAlertView
*
)
alertView
clickedButtonAtIndex
:
(
NSInteger
)
buttonIndex
{
if
(
alertView
.
tag
==
66690
)
{
if
(
buttonIndex
==
0
)
{
[
self
.
tableView
reloadData
];
}
}
}
#pragma mark - UITableView Delegate/DataSource
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
tableView
{
...
...
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankingList/ViewController/RankingListViewController.m
View file @
f7270c2c
...
...
@@ -72,9 +72,8 @@
[
super
viewDidLoad
];
self
.
allTitleArray
=
[
NSArray
arrayWithObjects
:
@"口碑巡检"
,
@"选择范围"
,
@"统计方式"
,
nil
];
self
.
uuidArray
=
[
NSMutableArray
array
];
self
.
titleArray
=
[
NSMutableArray
array
];
self
.
uuidArray
=
[
NSMutableArray
array
];
self
.
tableView
.
delegate
=
self
;
self
.
tableView
.
dataSource
=
self
;
...
...
@@ -302,12 +301,17 @@
-
(
void
)
deliverWithArray
:
(
NSMutableArray
*
)
array
{
NSString
*
nameStr
=
@""
;
self
.
uuidArray
=
[
NSMutableArray
array
];
if
(
array
.
count
==
0
)
{
_selectName
=
@"全部"
;
}
else
{
for
(
TreeNodeModel
*
model
in
array
)
{
nameStr
=
[
nameStr
stringByAppendingString
:[
NSString
stringWithFormat
:
@"%@,"
,
model
.
name
]];
[
_uuidArray
addObject
:
model
.
uuid
];
}
NSIndexPath
*
indexPath
=
[
NSIndexPath
indexPathForRow
:
1
inSection
:
0
];
_selectName
=
nameStr
;
}
NSIndexPath
*
indexPath
=
[
NSIndexPath
indexPathForRow
:
1
inSection
:
0
];
[
self
.
tableView
reloadRowsAtIndexPaths
:@[
indexPath
]
withRowAnimation
:
UITableViewRowAnimationFade
];
}
...
...
redstar/Classes/Module/Home/ViewController/SearchViewController.m
View file @
f7270c2c
This diff is collapsed.
Click to expand it.
redstar/Info.plist
View file @
f7270c2c
...
...
@@ -32,10 +32,6 @@
<
k
e
y
>
NSAllowsArbitraryLoads
<
/k
e
y
>
<
tru
e
/
>
<
/
d
i
c
t
>
<
k
e
y
>
UIBackgroundModes
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
remote-notification
<
/string
>
<
/
a
rr
a
y
>
<
k
e
y
>
UILaunchStoryboardName
<
/k
e
y
>
<
string
>
LaunchScreen
<
/string
>
<
k
e
y
>
UIRequiredDeviceCapabilities
<
/k
e
y
>
...
...
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