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
d15cff48
Commit
d15cff48
authored
Dec 17, 2015
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
保存状态
parent
50b06048
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
54 additions
and
10 deletions
+54
-10
UserInterfaceState.xcuserstate
...userdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
SelectAreaTableCell.h
...le/Function/OnLine/SelectStore/Cell/SelectAreaTableCell.h
+2
-1
SelectAreaTableCell.m
...le/Function/OnLine/SelectStore/Cell/SelectAreaTableCell.m
+2
-6
SelectProvinceTableCell.h
...unction/OnLine/SelectStore/Cell/SelectProvinceTableCell.h
+3
-0
SelectStoreTableCell.h
...e/Function/OnLine/SelectStore/Cell/SelectStoreTableCell.h
+2
-1
SelectStoreViewController.m
...ne/SelectStore/ViewController/SelectStoreViewController.m
+33
-1
RankingListViewController.m
...ng/RankingList/ViewController/RankingListViewController.m
+3
-0
HomeViewController.m
...r/Classes/Module/Home/ViewController/HomeViewController.m
+9
-1
No files found.
redstar.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate
View file @
d15cff48
No preview for this file type
redstar/Classes/Module/Function/OnLine/SelectStore/Cell/SelectAreaTableCell.h
View file @
d15cff48
...
@@ -8,9 +8,10 @@
...
@@ -8,9 +8,10 @@
#import <UIKit/UIKit.h>
#import <UIKit/UIKit.h>
#import "CheckBoxButton.h"
#import "CheckBoxButton.h"
#import "AreaModel.h"
@interface
SelectAreaTableCell
:
UITableViewCell
@interface
SelectAreaTableCell
:
UITableViewCell
@property
(
nonatomic
,
strong
)
CheckBoxButton
*
checkBoxButton
;
@property
(
nonatomic
,
strong
)
CheckBoxButton
*
checkBoxButton
;
@property
(
nonatomic
,
strong
)
UIImageView
*
iconImageView
;
@property
(
nonatomic
,
strong
)
UIImageView
*
iconImageView
;
@property
(
nonatomic
,
strong
)
AreaModel
*
areaModel
;
@end
@end
redstar/Classes/Module/Function/OnLine/SelectStore/Cell/SelectAreaTableCell.m
View file @
d15cff48
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
if
(
!
_checkBoxButton
)
{
if
(
!
_checkBoxButton
)
{
_checkBoxButton
=
[[
CheckBoxButton
alloc
]
init
];
_checkBoxButton
=
[[
CheckBoxButton
alloc
]
init
];
[
_checkBoxButton
setTitleColor
:
kLightBlack
forState
:
UIControlStateNormal
];
[
_checkBoxButton
setTitleColor
:
kLightBlack
forState
:
UIControlStateNormal
];
[
_checkBoxButton
setTitleColor
:
kSelectStoreColor
forState
:
UIControlStateSelected
];
//
[_checkBoxButton setTitleColor:kSelectStoreColor forState:UIControlStateSelected];
_checkBoxButton
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
17
.
0
];
_checkBoxButton
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
17
.
0
];
_checkBoxButton
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
_checkBoxButton
.
translatesAutoresizingMaskIntoConstraints
=
NO
;
[
_checkBoxButton
setImage
:[
UIImage
imageNamed
:
@"uncheck_box"
]
forState
:
UIControlStateNormal
];
[
_checkBoxButton
setImage
:[
UIImage
imageNamed
:
@"uncheck_box"
]
forState
:
UIControlStateNormal
];
...
@@ -24,7 +24,6 @@
...
@@ -24,7 +24,6 @@
_checkBoxButton
.
titleEdgeInsets
=
UIEdgeInsetsMake
(
0
,
5
,
0
,
0
);
_checkBoxButton
.
titleEdgeInsets
=
UIEdgeInsetsMake
(
0
,
5
,
0
,
0
);
_checkBoxButton
.
imageView
.
contentMode
=
UIViewContentModeRight
;
_checkBoxButton
.
imageView
.
contentMode
=
UIViewContentModeRight
;
_checkBoxButton
.
titleLabel
.
contentMode
=
UIViewContentModeLeft
;
_checkBoxButton
.
titleLabel
.
contentMode
=
UIViewContentModeLeft
;
[
_checkBoxButton
addTarget
:
self
action
:
@selector
(
click
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
contentView
addSubview
:
_checkBoxButton
];
[
self
.
contentView
addSubview
:
_checkBoxButton
];
// 顶端
// 顶端
...
@@ -45,10 +44,7 @@
...
@@ -45,10 +44,7 @@
}
}
return
_checkBoxButton
;
return
_checkBoxButton
;
}
}
-
(
void
)
click
:
(
CheckBoxButton
*
)
sender
{
sender
.
selected
=
!
sender
.
selected
;
}
-
(
UIImageView
*
)
iconImageView
-
(
UIImageView
*
)
iconImageView
{
{
...
...
redstar/Classes/Module/Function/OnLine/SelectStore/Cell/SelectProvinceTableCell.h
View file @
d15cff48
...
@@ -8,8 +8,11 @@
...
@@ -8,8 +8,11 @@
#import <UIKit/UIKit.h>
#import <UIKit/UIKit.h>
#import "CheckBoxButton.h"
#import "CheckBoxButton.h"
#import "ProvinceModel.h"
@interface
SelectProvinceTableCell
:
UITableViewCell
@interface
SelectProvinceTableCell
:
UITableViewCell
@property
(
nonatomic
,
strong
)
CheckBoxButton
*
checkBoxButton
;
@property
(
nonatomic
,
strong
)
CheckBoxButton
*
checkBoxButton
;
@property
(
nonatomic
,
strong
)
UIImageView
*
iconImageView
;
@property
(
nonatomic
,
strong
)
UIImageView
*
iconImageView
;
@property
(
nonatomic
,
strong
)
ProvinceModel
*
provinceModel
;
@end
@end
redstar/Classes/Module/Function/OnLine/SelectStore/Cell/SelectStoreTableCell.h
View file @
d15cff48
...
@@ -8,11 +8,12 @@
...
@@ -8,11 +8,12 @@
#import <UIKit/UIKit.h>
#import <UIKit/UIKit.h>
#import "CheckBoxButton.h"
#import "CheckBoxButton.h"
#import "StoreModel.h"
@interface
SelectStoreTableCell
:
UITableViewCell
@interface
SelectStoreTableCell
:
UITableViewCell
//@property (nonatomic, strong) UIButton *storeButton1;
//@property (nonatomic, strong) UIButton *storeButton1;
//@property (nonatomic, strong) UIButton *storeButton2;
//@property (nonatomic, strong) UIButton *storeButton2;
@property
(
nonatomic
,
strong
)
CheckBoxButton
*
checkBoxButton
;
@property
(
nonatomic
,
strong
)
CheckBoxButton
*
checkBoxButton
;
@property
(
nonatomic
,
strong
)
StoreModel
*
storeModel
;
@end
@end
redstar/Classes/Module/Function/OnLine/SelectStore/ViewController/SelectStoreViewController.m
View file @
d15cff48
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
#import "StoreModel.h"
#import "StoreModel.h"
#import "SelectStoreHeadView.h"
#import "SelectStoreHeadView.h"
#import "CheckBoxButton.h"
@interface
SelectStoreViewController
()
<
RATreeViewDelegate
,
RATreeViewDataSource
>
@interface
SelectStoreViewController
()
<
RATreeViewDelegate
,
RATreeViewDataSource
>
@property
(
nonatomic
,
strong
)
RATreeView
*
treeView
;
@property
(
nonatomic
,
strong
)
RATreeView
*
treeView
;
...
@@ -106,6 +107,27 @@
...
@@ -106,6 +107,27 @@
}
}
-
(
void
)
areaClick
:
(
CheckBoxButton
*
)
sender
{
sender
.
selected
=
!
sender
.
selected
;
SelectAreaTableCell
*
cell
=
(
SelectAreaTableCell
*
)
sender
.
superview
.
superview
;
NSArray
*
provinceArray
=
cell
.
areaModel
.
provinceArray
;
if
(
sender
.
selected
)
{
for
(
ProvinceModel
*
proVin
in
provinceArray
)
{
proVin
.
isChoose
=
YES
;
}
[
sender
setTitleColor
:
kLightBlack
forState
:
UIControlStateNormal
];
}
else
{
for
(
ProvinceModel
*
proVin
in
provinceArray
)
{
proVin
.
isChoose
=
NO
;
}
[
sender
setTitleColor
:
kSelectStoreColor
forState
:
UIControlStateNormal
];
}
[
_treeView
reloadRows
];
}
#pragma mark - RAtreeView Delegate/DataSource
#pragma mark - RAtreeView Delegate/DataSource
-
(
NSInteger
)
treeView
:
(
RATreeView
*
)
treeView
numberOfChildrenOfItem
:
(
id
)
item
-
(
NSInteger
)
treeView
:
(
RATreeView
*
)
treeView
numberOfChildrenOfItem
:
(
id
)
item
...
@@ -147,21 +169,31 @@
...
@@ -147,21 +169,31 @@
if
(
level
==
0
)
{
if
(
level
==
0
)
{
AreaModel
*
data
=
item
;
AreaModel
*
data
=
item
;
SelectAreaTableCell
*
cell
=
[
self
.
treeView
dequeueReusableCellWithIdentifier
:
kSelectAreaTableCell
];
SelectAreaTableCell
*
cell
=
[
self
.
treeView
dequeueReusableCellWithIdentifier
:
kSelectAreaTableCell
];
cell
.
areaModel
=
data
;
[
cell
.
checkBoxButton
setTitle
:
data
.
name
forState
:
UIControlStateNormal
];
[
cell
.
checkBoxButton
setTitle
:
data
.
name
forState
:
UIControlStateNormal
];
NSLog
(
@"check.select = %d"
,
(
int
)
cell
.
checkBoxButton
.
selected
)
;
[
cell
.
checkBoxButton
addTarget
:
self
action
:
@selector
(
areaClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
]
;
cell
.
iconImageView
.
image
=
[
UIImage
imageNamed
:
@"arrow_down"
];
cell
.
iconImageView
.
image
=
[
UIImage
imageNamed
:
@"arrow_down"
];
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
return
cell
;
return
cell
;
}
else
if
(
level
==
1
)
{
}
else
if
(
level
==
1
)
{
ProvinceModel
*
data
=
item
;
ProvinceModel
*
data
=
item
;
SelectProvinceTableCell
*
cell
=
[
self
.
treeView
dequeueReusableCellWithIdentifier
:
kSelectProvinceTableCell
];
SelectProvinceTableCell
*
cell
=
[
self
.
treeView
dequeueReusableCellWithIdentifier
:
kSelectProvinceTableCell
];
cell
.
provinceModel
=
data
;
if
(
data
.
isChoose
)
{
cell
.
checkBoxButton
.
selected
=
YES
;
}
else
{
cell
.
checkBoxButton
.
selected
=
NO
;
}
[
cell
.
checkBoxButton
setTitle
:
data
.
name
forState
:
UIControlStateNormal
];
[
cell
.
checkBoxButton
setTitle
:
data
.
name
forState
:
UIControlStateNormal
];
cell
.
iconImageView
.
image
=
[
UIImage
imageNamed
:
@"grey-trilateral_down"
];
cell
.
iconImageView
.
image
=
[
UIImage
imageNamed
:
@"grey-trilateral_down"
];
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
return
cell
;
return
cell
;
}
else
{
}
else
{
StoreModel
*
data
=
item
;
StoreModel
*
data
=
item
;
SelectStoreTableCell
*
cell
=
[
self
.
treeView
dequeueReusableCellWithIdentifier
:
kSelectStoreTableCell
];
SelectStoreTableCell
*
cell
=
[
self
.
treeView
dequeueReusableCellWithIdentifier
:
kSelectStoreTableCell
];
cell
.
storeModel
=
data
;
[
cell
.
checkBoxButton
setTitle
:
data
.
name
forState
:
UIControlStateNormal
];
[
cell
.
checkBoxButton
setTitle
:
data
.
name
forState
:
UIControlStateNormal
];
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
return
cell
;
return
cell
;
...
...
redstar/Classes/Module/Function/WordOfMouth/Ranking/RankingList/ViewController/RankingListViewController.m
View file @
d15cff48
...
@@ -121,6 +121,9 @@
...
@@ -121,6 +121,9 @@
__block
RankingListViewController
*
weakSelf
=
self
;
__block
RankingListViewController
*
weakSelf
=
self
;
[
httpCilent
getRankingListWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
[
httpCilent
getRankingListWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"口碑排名response = %@"
,
response
);
NSLog
(
@"口碑排名response = %@"
,
response
);
if
([(
NSArray
*
)
response
[
@"data"
]
count
]
==
0
)
{
return
;
}
NSDictionary
*
dataDict
=
response
[
@"data"
];
NSDictionary
*
dataDict
=
response
[
@"data"
];
NSArray
*
dataArray
=
dataDict
[
@"records"
];
NSArray
*
dataArray
=
dataDict
[
@"records"
];
...
...
redstar/Classes/Module/Home/ViewController/HomeViewController.m
View file @
d15cff48
...
@@ -226,6 +226,9 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
...
@@ -226,6 +226,9 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
__block
HomeViewController
*
weakSelf
=
self
;
__block
HomeViewController
*
weakSelf
=
self
;
[
httpCilent1
getRankingListWithParameters
:
parameters1
completion
:
^
(
id
response
,
NSError
*
error
)
{
[
httpCilent1
getRankingListWithParameters
:
parameters1
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"刷新!! = 口碑排名response = %@"
,
response
);
NSLog
(
@"刷新!! = 口碑排名response = %@"
,
response
);
if
([(
NSArray
*
)
response
[
@"data"
]
count
]
==
0
)
{
return
;
}
NSDictionary
*
dataDict
=
response
[
@"data"
];
NSDictionary
*
dataDict
=
response
[
@"data"
];
NSArray
*
dataArray
=
dataDict
[
@"records"
];
NSArray
*
dataArray
=
dataDict
[
@"records"
];
...
@@ -298,6 +301,9 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
...
@@ -298,6 +301,9 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
[
httpCilent
getRankingListWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
[
httpCilent
getRankingListWithParameters
:
parameters
completion
:
^
(
id
response
,
NSError
*
error
)
{
NSLog
(
@"口碑排名response = %@"
,
response
);
NSLog
(
@"口碑排名response = %@"
,
response
);
NSLog
(
@"error = %@"
,
error
);
NSLog
(
@"error = %@"
,
error
);
if
([(
NSArray
*
)
response
[
@"data"
]
count
]
==
0
)
{
return
;
}
NSDictionary
*
dataDict
=
response
[
@"data"
];
NSDictionary
*
dataDict
=
response
[
@"data"
];
NSArray
*
dataArray
=
dataDict
[
@"records"
];
NSArray
*
dataArray
=
dataDict
[
@"records"
];
...
@@ -310,7 +316,9 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
...
@@ -310,7 +316,9 @@ typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
_allRankListArray
=
(
NSMutableArray
*
)[
self
sortRankListWithRankListArray
:
tgArray
];
_allRankListArray
=
(
NSMutableArray
*
)[
self
sortRankListWithRankListArray
:
tgArray
];
[
self
.
tableView
reloadData
];
[
self
.
tableView
reloadData
];
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
[
MBProgressHUD
hideHUDForView
:
self
.
view
animated
:
YES
];
}];
}];
}
}
...
...
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