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
24060026
Commit
24060026
authored
Dec 23, 2015
by
AvatarC
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
https://git.oschina.net/gomoretech/RedstarIOS
into develop_avatar
parents
c622bb47
b8d1f808
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
283 additions
and
36 deletions
+283
-36
project.pbxproj
redstar.xcodeproj/project.pbxproj
+14
-0
UserInterfaceState.xcuserstate
...userdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
Url.h
redstar/Classes/Macro/Url.h
+2
-2
OnLineTableViewCell.m
...dule/Function/OnLine/AddOnLine/Cell/OnLineTableViewCell.m
+2
-2
OnLineViewController.m
...on/OnLine/AddOnLine/ViewController/OnLineViewController.m
+29
-4
LookOnLineModel.h
...Module/Function/OnLine/LookOnLine/Model/LookOnLineModel.h
+1
-1
LookOnLineViewController.m
...Line/LookOnLine/ViewController/LookOnLineViewController.m
+1
-1
LookOnLineDetailView.h
...ction/OnLine/LookOnLineDetail/View/LookOnLineDetailView.h
+2
-1
LookOnLineDetailView.m
...ction/OnLine/LookOnLineDetail/View/LookOnLineDetailView.m
+9
-1
LookOnLineDetailViewController.m
...ineDetail/ViewController/LookOnLineDetailViewController.m
+30
-3
SelectStoreViewController.m
...ne/SelectStore/ViewController/SelectStoreViewController.m
+5
-1
InspectListViewController.m
...ct/InspectList/ViewController/InspectListViewController.m
+0
-3
RankDetailViewController.m
...king/RankDetail/ViewController/RankDetailViewController.m
+0
-1
RankListHeaderView.m
...WordOfMouth/Ranking/RankingList/View/RankListHeaderView.m
+4
-1
RankingListViewController.m
...ng/RankingList/ViewController/RankingListViewController.m
+11
-7
HomeViewController.m
...r/Classes/Module/Home/ViewController/HomeViewController.m
+2
-2
LoginViewController.m
...Classes/Module/Login/ViewController/LoginViewController.m
+8
-4
AboutMeViewController.h
.../Module/Mine/ViewController/About/AboutMeViewController.h
+13
-0
AboutMeViewController.m
.../Module/Mine/ViewController/About/AboutMeViewController.m
+141
-0
MineViewController.m
...r/Classes/Module/Mine/ViewController/MineViewController.m
+5
-0
HttpClient.m
redstar/Classes/Tools/HttpClient/HttpClient.m
+4
-2
No files found.
redstar.xcodeproj/project.pbxproj
View file @
24060026
...
...
@@ -61,6 +61,7 @@
8490C4D31BF9DEF0006B6569
/* PictureTableCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
8490C4CE1BF9DEF0006B6569
/* PictureTableCell.m */
;
};
8490C4D41BF9DEF0006B6569
/* PictureViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
8490C4D21BF9DEF0006B6569
/* PictureViewController.m */
;
};
8490C4D71BF9DF1D006B6569
/* PictureStoryViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
8490C4D61BF9DF1D006B6569
/* PictureStoryViewController.m */
;
};
84945F1B1C2A6A6300C1793C
/* AboutMeViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84945F1A1C2A6A6300C1793C
/* AboutMeViewController.m */
;
};
84970DEF1BD8DD8A00C1728A
/* main.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84970DEE1BD8DD8A00C1728A
/* main.m */
;
};
84970DFA1BD8DD8A00C1728A
/* Assets.xcassets in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84970DF91BD8DD8A00C1728A
/* Assets.xcassets */
;
};
84970DFD1BD8DD8A00C1728A
/* LaunchScreen.storyboard in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
84970DFB1BD8DD8A00C1728A
/* LaunchScreen.storyboard */
;
};
...
...
@@ -284,6 +285,8 @@
8490C4D21BF9DEF0006B6569
/* PictureViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
PictureViewController.m
;
sourceTree
=
"<group>"
;
};
8490C4D51BF9DF1D006B6569
/* PictureStoryViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
PictureStoryViewController.h
;
sourceTree
=
"<group>"
;
};
8490C4D61BF9DF1D006B6569
/* PictureStoryViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
PictureStoryViewController.m
;
sourceTree
=
"<group>"
;
};
84945F191C2A6A6300C1793C
/* AboutMeViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
AboutMeViewController.h
;
sourceTree
=
"<group>"
;
};
84945F1A1C2A6A6300C1793C
/* AboutMeViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
AboutMeViewController.m
;
sourceTree
=
"<group>"
;
};
84970DEA1BD8DD8A00C1728A
/* redstar.app */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.application
;
includeInIndex
=
0
;
path
=
redstar.app
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
84970DEE1BD8DD8A00C1728A
/* main.m */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
main.m
;
sourceTree
=
"<group>"
;
};
84970DF91BD8DD8A00C1728A
/* Assets.xcassets */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
folder.assetcatalog
;
path
=
Assets.xcassets
;
sourceTree
=
"<group>"
;
};
...
...
@@ -1171,6 +1174,15 @@
path
=
ViewController
;
sourceTree
=
"<group>"
;
};
84945F181C2A6A4A00C1793C
/* About */
=
{
isa
=
PBXGroup
;
children
=
(
84945F191C2A6A6300C1793C
/* AboutMeViewController.h */
,
84945F1A1C2A6A6300C1793C
/* AboutMeViewController.m */
,
);
path
=
About
;
sourceTree
=
"<group>"
;
};
84970DE11BD8DD8A00C1728A
=
{
isa
=
PBXGroup
;
children
=
(
...
...
@@ -2023,6 +2035,7 @@
children
=
(
84FD8A081BDA01D1006E442A
/* MineViewController.h */
,
84FD8A091BDA01D1006E442A
/* MineViewController.m */
,
84945F181C2A6A4A00C1793C
/* About */
,
);
path
=
ViewController
;
sourceTree
=
"<group>"
;
...
...
@@ -2246,6 +2259,7 @@
84BB16A21C191A7F00383A64
/* OnLineResultFootView.m in Sources */
,
84846E971BE069BC0010550A
/* DateButton.m in Sources */
,
84CC34CC1C093C2F002F10E2
/* OnLineTableViewCell.m in Sources */
,
84945F1B1C2A6A6300C1793C
/* AboutMeViewController.m in Sources */
,
84E363D21BFAC5200061547E
/* TaskListModel.m in Sources */
,
84C9574E1BDB344900083584
/* UIView+Frame.m in Sources */
,
848699B01BDF810900859DFE
/* InspectListCell.m in Sources */
,
...
...
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
View file @
24060026
No preview for this file type
redstar/Classes/Macro/Url.h
View file @
24060026
...
...
@@ -10,11 +10,11 @@
#define Url_h
// url
#define kRedStarURL @"http://218.244.151.129:7580/"
//
#define kRedStarURL @"http://218.244.151.129:7580/"
// #define kRedStarURL @"http://172.16.3.12
:7580/"
#define kRedStarURL @"http://219.235.234.225
:7580/"
// 检查更新
...
...
redstar/Classes/Module/Function/OnLine/AddOnLine/Cell/OnLineTableViewCell.m
View file @
24060026
...
...
@@ -79,11 +79,11 @@
[
self
.
contentView
addConstraint
:
selectTop
];
// 左边
NSLayoutConstraint
*
selectRight
=
[
NSLayoutConstraint
constraintWithItem
:
_selectLabel
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
NSLayoutConstraint
*
selectRight
=
[
NSLayoutConstraint
constraintWithItem
:
_selectLabel
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
contentView
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
-
1
0
];
[
self
.
contentView
addConstraint
:
selectRight
];
// 右边
NSLayoutConstraint
*
selectWidth
=
[
NSLayoutConstraint
constraintWithItem
:
_selectLabel
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
titleLabel
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
5
];
NSLayoutConstraint
*
selectWidth
=
[
NSLayoutConstraint
constraintWithItem
:
_selectLabel
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
titleLabel
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
10
];
[
self
.
contentView
addConstraint
:
selectWidth
];
//
// 高度
...
...
redstar/Classes/Module/Function/OnLine/AddOnLine/ViewController/OnLineViewController.m
View file @
24060026
...
...
@@ -12,14 +12,16 @@
#import "SpotCheckOnLineViewController.h"
#import "SelectStoreViewController.h"
#import "HttpClient.h"
#import "TreeNodeModel.h"
#define kOnLineTableViewCell @"onlineTableViewCell"
@interface
OnLineViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
UIAlertViewDelegate
>
@interface
OnLineViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
UIAlertViewDelegate
,
SelectStoreDelegate
>
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
strong
)
NSArray
*
titleArray
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
uuidArray
;
@property
(
nonatomic
,
strong
)
OnLineFooterView
*
footView
;
@property
(
nonatomic
,
strong
)
NSString
*
storeName
;
@end
@implementation
OnLineViewController
...
...
@@ -46,6 +48,8 @@
UIBarButtonItem
*
backItem
=
[[
UIBarButtonItem
alloc
]
initWithCustomView
:
backBtn
];
self
.
navigationItem
.
leftBarButtonItem
=
backItem
;
_storeName
=
@"全部"
;
}
-
(
void
)
doBack
:
(
id
)
sender
...
...
@@ -78,6 +82,20 @@
[
alert
show
];
}
#pragma mark - SelectStoreDelegate
-
(
void
)
deliverWithArray
:
(
NSMutableArray
*
)
array
{
NSString
*
nameStr
=
@""
;
_uuidArray
=
[
NSMutableArray
array
];
for
(
TreeNodeModel
*
model
in
array
)
{
nameStr
=
[
nameStr
stringByAppendingString
:[
NSString
stringWithFormat
:
@"%@,"
,
model
.
name
]];
[
_uuidArray
addObject
:
model
.
uuid
];
}
NSIndexPath
*
indexPath
=
[
NSIndexPath
indexPathForRow
:
0
inSection
:
0
];
_storeName
=
nameStr
;
[
self
.
tableView
reloadRowsAtIndexPaths
:@[
indexPath
]
withRowAnimation
:
UITableViewRowAnimationFade
];
}
#pragma mark - TableView Delegate/DateSource
-
(
void
)
alertView
:
(
UIAlertView
*
)
alertView
clickedButtonAtIndex
:
(
NSInteger
)
buttonIndex
{
...
...
@@ -102,12 +120,17 @@
@"title"
:
self
.
footView
.
titleTextView
.
text
,
@"content"
:
self
.
footView
.
contentTextView
.
text
,
@"endDate"
:
dateString
,
@"state"
:
@"initial"
@"state"
:
@"initial"
,
// @"stores":_uuidArray
};
NSLog
(
@"发起抽查par = %@"
,
parameters
);
[
httpClient
saveSportCheckWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"发起抽查 response = %@"
,
response
);
NSLog
(
@"发起抽查 error = %@"
,
error
);
if
([
response
[
@"message"
]
isEqualToString
:
@"ok"
])
{
[
self
.
navigationController
popViewControllerAnimated
:
YES
];
}
}];
}
}
...
...
@@ -129,6 +152,7 @@
}
cell
.
titleLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
_titleArray
[
indexPath
.
row
]];
cell
.
accessoryType
=
UITableViewCellAccessoryDisclosureIndicator
;
cell
.
selectLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
_storeName
];
return
cell
;
...
...
@@ -143,6 +167,7 @@
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
SelectStoreViewController
*
select
=
[[
SelectStoreViewController
alloc
]
init
];
select
.
delegate
=
self
;
[
self
.
navigationController
pushViewController
:
select
animated
:
YES
];
}
...
...
redstar/Classes/Module/Function/OnLine/LookOnLine/Model/LookOnLineModel.h
View file @
24060026
...
...
@@ -26,5 +26,5 @@
@property
(
nonatomic
,
copy
)
NSString
*
store_name
;
@property
(
nonatomic
,
copy
)
NSString
*
store_uuid
;
@property
(
nonatomic
,
copy
)
NSString
*
title
;
@property
(
nonatomic
,
copy
)
NSString
*
uuid
;
@end
redstar/Classes/Module/Function/OnLine/LookOnLine/ViewController/LookOnLineViewController.m
View file @
24060026
...
...
@@ -491,7 +491,7 @@
{
LookOnLineModel
*
lookOnLine
=
_allLookOnLineList
[
indexPath
.
row
];
LookOnLineDetailViewController
*
lookDetailVC
=
[[
LookOnLineDetailViewController
alloc
]
init
];
lookDetailVC
.
uuid
=
lookOnLine
.
attachmentI
d
;
lookDetailVC
.
uuid
=
lookOnLine
.
uui
d
;
[
self
.
navigationController
pushViewController
:
lookDetailVC
animated
:
YES
];
}
...
...
redstar/Classes/Module/Function/OnLine/LookOnLineDetail/View/LookOnLineDetailView.h
View file @
24060026
...
...
@@ -7,6 +7,7 @@
//
#import <UIKit/UIKit.h>
@class
OnLineDetailModel
;
@interface
LookOnLineDetailView
:
UIView
@property
(
nonatomic
,
strong
)
UILabel
*
titleLabel
;
...
...
@@ -20,5 +21,5 @@
@property
(
nonatomic
,
strong
)
UILabel
*
dayLabel
;
// 剩余天数
@property
(
nonatomic
,
strong
)
OnLineDetailModel
*
onLineDetail
;
@end
redstar/Classes/Module/Function/OnLine/LookOnLineDetail/View/LookOnLineDetailView.m
View file @
24060026
...
...
@@ -38,6 +38,13 @@
-
(
void
)
setup
{
}
-
(
void
)
setOnLineDetail
:
(
OnLineDetailModel
*
)
onLineDetail
{
_onLineDetail
=
onLineDetail
;
self
.
bgView
.
backgroundColor
=
[
UIColor
whiteColor
];
self
.
shopname
.
text
=
@"商场名称"
;
self
.
overDate
.
text
=
@"截止时间"
;
...
...
@@ -60,10 +67,11 @@
self
.
day
.
text
=
@"天"
;
self
.
number
.
image
=
[
UIImage
imageNamed
:
@"figure_bg"
];
self
.
surplus
.
text
=
@"剩余"
;
self
.
dayLabel
.
text
=
@"2"
;
self
.
pictureLabel
.
text
=
@"现场照片"
;
}
-
(
UILabel
*
)
titleLabel
...
...
redstar/Classes/Module/Function/OnLine/LookOnLineDetail/ViewController/LookOnLineDetailViewController.m
View file @
24060026
...
...
@@ -10,6 +10,8 @@
#import "LookOnLineDetailView.h"
#import "LookOnLineFootView.h"
#import "HttpClient.h"
#import "CommonFunc.h"
#import "OnLineDetailModel.h"
#import "InspectAddCell.h"
#define kOnLineInspectAddCell @"onLineInspectAddCell"
...
...
@@ -27,7 +29,7 @@
@property
(
nonatomic
,
strong
)
LookOnLineFootView
*
footView
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
imageNameArray
;
@property
(
nonatomic
,
strong
)
OnLineDetailModel
*
onLineDetail
;
@property
(
nonatomic
,
assign
)
int
rowNumber
;
@end
...
...
@@ -83,6 +85,14 @@
[
httpClient
getSportCheckDetailWithCompletion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"5.4 抽查明细 response = %@, error = %@"
,
response
,
error
);
NSDictionary
*
dataDict
=
response
[
@"data"
];
OnLineDetailModel
*
onlineDetail
=
[[
OnLineDetailModel
alloc
]
init
];
[
onlineDetail
setValuesForKeysWithDictionary
:
dataDict
];
_onLineDetail
=
onlineDetail
;
self
.
tableView
.
delegate
=
self
;
self
.
tableView
.
dataSource
=
self
;
[
self
.
tableView
reloadData
];
}];
}
...
...
@@ -125,7 +135,8 @@
-
(
void
)
saveImage
:
(
UIImage
*
)
currentImage
{
NSData
*
imageData
=
UIImageJPEGRepresentation
(
currentImage
,
0
.
5
);
NSString
*
imageName
=
[
NSString
stringWithFormat
:
@"imageName%d"
,
(
int
)
_imageNameArray
.
count
];
// NSString *imageName = [NSString stringWithFormat:@"%d", (int)_imageNameArray.count];
NSString
*
imageName
=
[
CommonFunc
md5Data
:
imageData
];
[
_imageNameArray
addObject
:
imageName
];
...
...
@@ -155,10 +166,25 @@
NSLog
(
@"上报抽检结果 url = %@"
,
url
);
HttpClient
*
httpClient
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
NSMutableArray
*
imageArray
=
[
NSMutableArray
array
];
for
(
int
i
=
0
;
i
<
_imageNameArray
.
count
;
i
++
)
{
NSString
*
imageName
=
_imageNameArray
[
i
];
NSString
*
fullPath
=
[[
NSHomeDirectory
()
stringByAppendingPathComponent
:
@"Documents"
]
stringByAppendingPathComponent
:
imageName
];
UIImage
*
image
=
[
UIImage
imageWithContentsOfFile
:
fullPath
];
NSData
*
imageData
=
UIImageJPEGRepresentation
(
image
,
0
.
5
);
NSString
*
imageBase64
=
[
imageData
base64EncodedStringWithOptions
:
0
];
NSMutableDictionary
*
dict
=
[
NSMutableDictionary
dictionary
];
[
dict
setObject
:
imageBase64
forKey
:
@"fileContent"
];
[
dict
setObject
:
imageName
forKey
:
@"fileName"
];
[
dict
setObject
:
@
(
i
)
forKey
:
@"index"
];
[
imageArray
addObject
:
dict
];
}
NSDictionary
*
parameters
=
@{
@"storeUuid"
:
@""
,
@"processNote"
:
self
.
footView
.
contentTextView
.
text
,
@"attachments"
:
@[]
,
@"attachments"
:
imageArray
,
};
[
httpClient
reportCheckResultWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
...
...
@@ -281,6 +307,7 @@
if
(
!
_headerView
)
{
_headerView
=
[[
LookOnLineDetailView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
kScreenWidth
,
295
)];
_headerView
.
titleLabel
.
text
=
@"2015年十一促销临时抽查"
;
_headerView
.
onLineDetail
=
_onLineDetail
;
}
return
_headerView
;
}
...
...
redstar/Classes/Module/Function/OnLine/SelectStore/ViewController/SelectStoreViewController.m
View file @
24060026
...
...
@@ -91,6 +91,7 @@
@"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
);
...
...
@@ -115,7 +116,11 @@
[
fourTree
addObject
:
tree
];
}
}
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
if
(
oneTree
.
count
==
0
)
{
return
;
}
TreeNodeModel
*
tree1
=
oneTree
[
0
];
for
(
int
k
=
0
;
k
<
twoTree
.
count
;
k
++
)
{
...
...
@@ -147,7 +152,6 @@
}
self
.
treeView
.
nodeData
=
tree1
;
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
}];
}
...
...
redstar/Classes/Module/Function/WordOfMouth/Inspect/InspectList/ViewController/InspectListViewController.m
View file @
24060026
...
...
@@ -136,8 +136,6 @@
for
(
NSDictionary
*
dict
in
dataArray
)
{
TaskListModel
*
taskList
=
[[
TaskListModel
alloc
]
init
];
[
taskList
setValuesForKeysWithDictionary
:
dict
];
NSLog
(
@"taskList state = %@"
,
taskList
.
state
);
[
taskArray
addObject
:
taskList
];
}
[
_taskListDataArray
addObjectsFromArray
:
taskArray
];
...
...
@@ -231,7 +229,6 @@
for
(
NSDictionary
*
dict
in
dataArray
)
{
TaskListModel
*
taskList
=
[[
TaskListModel
alloc
]
init
];
[
taskList
setValuesForKeysWithDictionary
:
dict
];
NSLog
(
@"taskList state = %@"
,
taskList
.
state
);
[
tempArray
addObject
:
taskList
];
}
_taskListDataArray
=
[
NSMutableArray
arrayWithArray
:
tempArray
];
...
...
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankDetail/ViewController/RankDetailViewController.m
View file @
24060026
...
...
@@ -497,7 +497,6 @@
{
if
(
!
_rankDetailHeaderView
)
{
_rankDetailHeaderView
=
[[
RankDetailHeaderView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
kScreenWidth
,
298
)];
NSLog
(
@"se。row= =%ld"
,
_indexRow
);
if
(
self
.
indexRow
<=
3
)
{
NSString
*
imageName
=
[
NSString
stringWithFormat
:
@"medal_0%ld"
,
(
long
)(
_indexRow
)];
_rankDetailHeaderView
.
rankDetailView
.
gradeImageView
.
image
=
[
UIImage
imageNamed
:
imageName
];
...
...
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankingList/View/RankListHeaderView.m
View file @
24060026
...
...
@@ -18,6 +18,8 @@
UIButton
*
_otherButton
;
UILabel
*
_scoreLabel
;
NSInteger
_section
;
NSInteger
_index
;
UILabel
*
_gradeLabel
;
UIImageView
*
_gradeImageView
;
UIView
*
_lineView
;
...
...
@@ -92,6 +94,7 @@
_gradeLabel
=
gradeLabel
;
}
_section
=
section
;
_index
=
index
;
UIButton
*
pushButton
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
pushButton
.
tag
=
kPushTag
+
section
;
...
...
@@ -159,7 +162,7 @@
_bgButton
.
frame
=
CGRectMake
(
30
,
0
,
0
.
35
*
kScreenWidth
,
self
.
bounds
.
size
.
height
);
_arrowImageView
.
frame
=
CGRectMake
(
20
,
(
self
.
frame
.
size
.
height
-
11
)
/
2
,
9
,
10
);
_scoreLabel
.
frame
=
CGRectMake
(
0
.
4
*
kScreenWidth
,
0
,
0
.
25
*
kScreenWidth
,
50
);
if
(
_
section
<
3
)
{
if
(
_
index
<=
3
)
{
_gradeImageView
.
frame
=
CGRectMake
(
0
.
8
*
kScreenWidth
,
9
,
36
,
33
);
}
else
{
_gradeLabel
.
frame
=
CGRectMake
(
0
.
7
*
kScreenWidth
,
0
,
0
.
3
*
kScreenWidth
,
50
);
...
...
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankingList/ViewController/RankingListViewController.m
View file @
24060026
...
...
@@ -57,6 +57,8 @@
@property
(
nonatomic
,
strong
)
NSMutableArray
*
uuidArray
;
@property
(
nonatomic
,
assign
)
NSInteger
statisMode
;
@property
(
nonatomic
,
strong
)
NSString
*
selectName
;
@property
(
nonatomic
)
BOOL
isChoose
;
@end
...
...
@@ -106,6 +108,9 @@
self
.
gradeLabel
.
text
=
@"排名"
;
_isChoose
=
YES
;
_selectName
=
@"全部"
;
_selectButton
=
[[
UIButton
alloc
]
init
];
_selectButton
.
tag
=
323228
;
}
...
...
@@ -211,7 +216,7 @@
NSLog
(
@"parrrrrters = %@"
,
parameters
);
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
animated
:
YES
];
[
httpCilent
getRankingListWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"分区域 口碑排名response = %@
"
,
response
);
NSLog
(
@"分区域 口碑排名response = %@
error = %@"
,
response
,
error
);
NSArray
*
dataArray
=
response
[
@"data"
];
...
...
@@ -242,8 +247,6 @@
-
(
NSArray
*
)
sortRankListWithRankListArray
:
(
NSMutableArray
*
)
allRanking
{
NSArray
*
sortedArray
=
[
allRanking
sortedArrayUsingComparator
:
^
NSComparisonResult
(
RankListModel
*
p1
,
RankListModel
*
p2
){
//return [@(p2.score) compare:@(p1.score)];
return
[
@
(
p2
.
score
)
compare
:
@
(
p1
.
score
)];
}];
return
sortedArray
;
...
...
@@ -296,16 +299,17 @@
}
#pragma mark - SelectStoreDelegate
-
(
void
)
deliverWithArray
:
(
NSMutableArray
*
)
array
{
NSString
*
nameStr
=
@""
;
for
(
TreeNodeModel
*
model
in
array
)
{
nameStr
=
[
nameStr
stringByAppendingString
:
model
.
name
];
nameStr
=
[
nameStr
stringByAppendingString
:
[
NSString
stringWithFormat
:
@"%@,"
,
model
.
name
]
];
[
_uuidArray
addObject
:
model
.
uuid
];
}
NSIndexPath
*
indexPath
=
[
NSIndexPath
indexPathForRow
:
1
inSection
:
0
];
OnLineTableViewCell
*
cell
=
(
OnLineTableViewCell
*
)[
_tableView
cellForRowAtIndexPath
:
indexPath
]
;
cell
.
selectLabel
.
text
=
nameStr
;
_selectName
=
nameStr
;
[
self
.
tableView
reloadRowsAtIndexPaths
:@[
indexPath
]
withRowAnimation
:
UITableViewRowAnimationFade
]
;
}
#pragma mark - UITableView DataSource/Delegate
...
...
@@ -344,7 +348,7 @@
cell
.
selectLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@"
,
dict
[
@"name"
]];
}
}
else
{
cell
.
selectLabel
.
text
=
@"全部"
;
cell
.
selectLabel
.
text
=
_selectName
;
}
cell
.
accessoryType
=
UITableViewCellAccessoryDisclosureIndicator
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
...
...
redstar/Classes/Module/Home/ViewController/HomeViewController.m
View file @
24060026
...
...
@@ -294,8 +294,8 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@"
,
kRedStarURL
,
kRankingListURL
];
HttpClient
*
httpCilent
=
[[
HttpClient
alloc
]
initWithUrl
:
url
];
NSDictionary
*
parameters
=
@{
@"praiseUuid"
:
@"
5a7417015157efa6015158f52be8004e
"
,
@"statisMode"
:
@
(
0
)
,
NSDictionary
*
parameters
=
@{
@"praiseUuid"
:
@""
,
@"statisMode"
:
@
(
0
)
};
[
httpCilent
getRankingListWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
...
...
redstar/Classes/Module/Login/ViewController/LoginViewController.m
View file @
24060026
...
...
@@ -159,16 +159,18 @@
NSString
*
user_name
=
dict
[
@"user_name"
];
NSString
*
user_uuid
=
dict
[
@"user_uuid"
];
NSString
*
enterprise_name
=
dict
[
@"enterprise_name"
];
NSString
*
enterprise_uuid
=
dict
[
@"enterprise_uuid"
];
NSString
*
org_name
=
dict
[
@"org_name"
];
NSString
*
authenticode
=
dict
[
@"authenticode"
];
NSArray
*
permissions
=
dict
[
@"permissions"
];
[
userDefault
setObject
:
enterprise_uuid
forKey
:
@"enterprise_uuid"
];
[
userDefault
setObject
:
user_code
forKey
:
@"user_code"
];
[
userDefault
setObject
:
user_name
forKey
:
@"user_name"
];
[
userDefault
setObject
:
user_uuid
forKey
:
@"user_uuid"
];
[
userDefault
setObject
:
enterprise_name
forKey
:
@"enterprise_name"
];
[
userDefault
setObject
:
org_name
forKey
:
@"org_name"
];
[
userDefault
setObject
:
authenticode
forKey
:
@"authenticode"
];
[
userDefault
setObject
:
permissions
forKey
:
@"permissions"
];
self
.
rootTBC
=
[[
RootTabBarController
alloc
]
init
];
...
...
@@ -223,9 +225,11 @@
NSString
*
user_uuid
=
dict
[
@"user_uuid"
];
NSArray
*
permissions
=
dict
[
@"permissions"
];
NSString
*
enterprise_name
=
dict
[
@"enterprise_name"
];
NSString
*
enterprise_uuid
=
dict
[
@"enterprise_uuid"
];
NSString
*
authenticode
=
dict
[
@"authenticode"
];
NSString
*
org_name
=
dict
[
@"org_name"
];
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
enterprise_uuid
forKey
:
@"enterprise_uuid"
];
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
enterprise_name
forKey
:
@"enterprise_name"
];
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
org_name
forKey
:
@"org_name"
];
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
permissions
forKey
:
@"permissions"
];
...
...
@@ -233,7 +237,7 @@
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
user_name
forKey
:
@"user_name"
];
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
user_uuid
forKey
:
@"user_uuid"
];
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
permissions
forKey
:
@"permissions"
];
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
authenticode
forKey
:
@"authenticode"
];
// 进入RootTabBar
self
.
rootTBC
=
[[
RootTabBarController
alloc
]
init
];
[
MBProgressHUD
hideHUDForView
:
window
animated
:
YES
];
...
...
redstar/Classes/Module/Mine/ViewController/About/AboutMeViewController.h
0 → 100644
View file @
24060026
//
// AboutMeViewController.h
// redstar
//
// Created by admin on 15/12/23.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
AboutMeViewController
:
UIViewController
@end
redstar/Classes/Module/Mine/ViewController/About/AboutMeViewController.m
0 → 100644
View file @
24060026
//
// AboutMeViewController.m
// redstar
//
// Created by admin on 15/12/23.
// Copyright © 2015年 ZWF. All rights reserved.
//
#import "AboutMeViewController.h"
#import "OnLineTableViewCell.h"
@interface
AboutMeViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
>
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
titleArray
;
@end
@implementation
AboutMeViewController
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
view
.
backgroundColor
=
kSectionBackGroundColor
;
UILabel
*
customLab
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
40
,
30
)];
[
customLab
setTextColor
:[
UIColor
whiteColor
]];
[
customLab
setText
:
@"关于"
];
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
;
self
.
titleArray
=
[
NSMutableArray
arrayWithObjects
:
@"版本"
,
@"联系电话"
,
nil
];
[
self
setupTableView
];
}
-
(
void
)
doBack
:
(
UIBarButtonItem
*
)
sender
{
[
self
.
navigationController
popViewControllerAnimated
:
YES
];
}
-
(
void
)
setupTableView
{
[
self
.
tableView
registerClass
:[
OnLineTableViewCell
class
]
forCellReuseIdentifier
:
@"abountMeCell"
];
UIView
*
headView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
kScreenWidth
,
200
)];
UIImageView
*
imageView
=
[[
UIImageView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
100
,
100
)];
imageView
.
backgroundColor
=
[
UIColor
lightGrayColor
];
imageView
.
center
=
CGPointMake
(
headView
.
center
.
x
,
headView
.
center
.
y
-
25
);
[
headView
addSubview
:
imageView
];
self
.
tableView
.
tableHeaderView
=
headView
;
}
#pragma mark - TableView Delegate/DataSource
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
return
_titleArray
.
count
;
}
// cell显示的内容
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
OnLineTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
@"abountMeCell"
];
if
(
!
cell
)
{
cell
=
[[
OnLineTableViewCell
alloc
]
initWithStyle
:
UITableViewCellStyleValue1
reuseIdentifier
:
@"abountMeCell"
];
}
// 设置cell右边有个小箭头
cell
.
titleLabel
.
text
=
_titleArray
[
indexPath
.
row
];
if
(
indexPath
.
row
==
0
)
{
NSDictionary
*
infoDic
=
[[
NSBundle
mainBundle
]
infoDictionary
];
NSString
*
currentVersion
=
[
NSString
stringWithFormat
:
@"%@"
,
infoDic
[
@"CFBundleShortVersionString"
]];
cell
.
selectLabel
.
text
=
currentVersion
;
}
else
{
cell
.
selectLabel
.
text
=
@"400-400-4000"
;
}
return
cell
;
}
// cell的高度
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
return
45
;
}
// section高度
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForHeaderInSection
:
(
NSInteger
)
section
{
return
CGFLOAT_MIN
;
}
#pragma mark - lazy loading
-
(
UITableView
*
)
tableView
{
if
(
!
_tableView
)
{
_tableView
=
[[
UITableView
alloc
]
init
];
}
_tableView
.
delegate
=
self
;
_tableView
.
dataSource
=
self
;
_tableView
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_tableView
.
backgroundColor
=
kMineBackGroundColor
;
_tableView
.
tableFooterView
=
[[
UIView
alloc
]
init
];
[
self
.
view
addSubview
:
_tableView
];
NSLayoutConstraint
*
tableTop
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeTop
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeTop
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
tableTop
];
NSLayoutConstraint
*
tableLeft
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeLeft
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeLeft
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
tableLeft
];
NSLayoutConstraint
*
tableRight
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeRight
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeRight
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
tableRight
];
NSLayoutConstraint
*
tableBottom
=
[
NSLayoutConstraint
constraintWithItem
:
_tableView
attribute
:
NSLayoutAttributeBottom
relatedBy
:
NSLayoutRelationEqual
toItem
:
self
.
view
attribute
:
NSLayoutAttributeBottom
multiplier
:
1
.
0
constant
:
0
];
[
self
.
view
addConstraint
:
tableBottom
];
return
_tableView
;
}
/*
#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
redstar/Classes/Module/Mine/ViewController/MineViewController.m
View file @
24060026
...
...
@@ -11,6 +11,8 @@
#import "MineTableFooterView.h"
#define kMineTableViewCell @"mineTableViewCell"
#import "AboutMeViewController.h"
#import "HttpClient.h"
@interface
MineViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
UIAlertViewDelegate
>
...
...
@@ -189,6 +191,9 @@
{
if
(
indexPath
.
row
==
4
)
{
[
self
getVersion
];
}
else
if
(
indexPath
.
row
==
3
)
{
AboutMeViewController
*
about
=
[[
AboutMeViewController
alloc
]
init
];
[
self
.
navigationController
pushViewController
:
about
animated
:
YES
];
}
}
...
...
redstar/Classes/Tools/HttpClient/HttpClient.m
View file @
24060026
...
...
@@ -27,10 +27,12 @@
_manager
.
requestSerializer
=
[
AFJSONRequestSerializer
serializer
];
_manager
.
responseSerializer
=
[
AFJSONResponseSerializer
serializer
];
// 设置请求头
[
_manager
.
requestSerializer
setValue
:
@"application/json;charset=utf-8"
forHTTPHeaderField
:
@"Content-Type"
];
[
_manager
.
requestSerializer
setValue
:
@"5a74170150b940ae0150b940f7db0082"
forHTTPHeaderField
:
@"enterprise"
];
//
[_manager.requestSerializer setValue:@"5a74170150b940ae0150b940f7db0082" forHTTPHeaderField:@"enterprise"];
[
_manager
.
requestSerializer
setValue
:[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"enterprise_uuid"
]
forHTTPHeaderField
:
@"enterprise"
];
}
return
self
;
}
...
...
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