Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
Opple-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
张杰
Opple-iOS
Commits
f4261d69
Commit
f4261d69
authored
Nov 23, 2016
by
曹云霄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改项说明:
parent
169dd272
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1440 additions
and
1341 deletions
+1440
-1341
IntegralDetailsViewController.m
Class/IntegralDetailsViewController.m
+24
-16
PrizeExchangeDetailsViewController.m
Class/PrizeExchangeDetailsViewController.m
+25
-17
PrizeMainViewController.m
Class/PrizeMainViewController.m
+3
-7
prizeDetailsTableViewCell.h
Class/prizeDetailsTableViewCell.h
+13
-1
prizeDetailsTableViewCell.m
Class/prizeDetailsTableViewCell.m
+12
-5
GuideIntegral.storyboard
Lighting/GuideIntegral.storyboard
+92
-79
BaseViewController.m
Tools/BaseViewController.m
+10
-4
PrefixHeader.pch
Tools/PrefixHeader.pch
+1
-1
opple_objc_json_client.h
Tools/opple_objc_json_client.h
+971
-937
opple_objc_json_client.m
Tools/opple_objc_json_client.m
+289
-274
No files found.
Class/IntegralDetailsViewController.m
View file @
f4261d69
...
...
@@ -9,6 +9,7 @@
#import "IntegralDetailsViewController.h"
#import "IntegralDetailsTableViewCell.h"
#import "prizeDetailsTableViewCell.h"
#import "PrizeExchangeDetailsViewController.h"
@interface
IntegralDetailsViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
DZNEmptyDataSetSource
,
DZNEmptyDataSetDelegate
>
/**
...
...
@@ -16,14 +17,11 @@
*/
@property
(
nonatomic
,
strong
)
NSMutableArray
*
datasArray
;
@end
@implementation
IntegralDetailsViewController
-
(
void
)
viewDidAppear
:(
BOOL
)
animated
{
[
self
.
integralDetailsTableView
.
mj_header
beginRefreshing
];
}
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
...
...
@@ -35,10 +33,12 @@
#pragma mark - UI
-
(
void
)
uiConfigAction
{
self
.
integralDetailsTableView
.
rowHeight
=
70
;
self
.
integralDetailsTableView
.
rowHeight
=
(
self
.
cellType
==
PrizeTableView
)?
90
:
70
;
self
.
integralDetailsTableView
.
tableFooterView
=
[
UIView
new
];
if
(
self
.
cellType
==
PrizeTableView
)
{
self
.
integralDetailsTableView
.
frame
=
CGRectMake
(
0
,
64
,
ScreenWidth
,
ScreenHeight
-
64
);
self
.
integralDetailsTableView
.
separatorStyle
=
UITableViewCellSeparatorStyleNone
;
self
.
integralDetailsTableView
.
backgroundColor
=
RGB
(
237
,
238
,
239
,
1
);
}
}
...
...
@@ -68,6 +68,7 @@
headerRefresh
.
stateLabel
.
hidden
=
YES
;
headerRefresh
.
lastUpdatedTimeLabel
.
hidden
=
YES
;
self
.
integralDetailsTableView
.
mj_header
=
headerRefresh
;
[
self
.
integralDetailsTableView
.
mj_header
beginRefreshing
];
MJRefreshAutoNormalFooter
*
footer
=
[
MJRefreshAutoNormalFooter
footerWithRefreshingBlock
:
^
{
switch
(
weakSelf
.
cellType
)
{
case
IntrgralTableView
:
...
...
@@ -77,12 +78,7 @@
break
;
case
PrizeTableView
:
{
// if (++ weakSelf.drawModel.page.page > weakSelf.totalPage) {
// [weakSelf.integralDetailsTableView.mj_footer endRefreshingWithNoMoreData];
// }else
// {
// [weakSelf queryPrizeDetails:NO];
// }
[
weakSelf
.
integralDetailsTableView
.
mj_footer
endRefreshingWithNoMoreData
];
}
break
;
...
...
@@ -143,11 +139,11 @@
weakSelf
.
integralDetailsTableView
.
emptyDataSetSource
=
weakSelf
;
weakSelf
.
integralDetailsTableView
.
emptyDataSetDelegate
=
weakSelf
;
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
RsScoreDetails
*
integralDatas
=
[[
RsScoreDetails
alloc
]
initWithDictionary
:
returnValue
[
@"data"
]
error
:
nil
];
[
weakSelf
.
datasArray
addObjectsFromArray
:
integralDatas
.
recoreds
];
if
(
weakSelf
.
returnIntegralDetailsBlock
)
{
weakSelf
.
returnIntegralDetailsBlock
(
integralDatas
);
if
(
isRemove
)
{
[
weakSelf
.
datasArray
removeAllObjects
];
}
RsPrizeBillResponse
*
integralDatas
=
[[
RsPrizeBillResponse
alloc
]
initWithDictionary
:
returnValue
[
@"data"
]
error
:
nil
];
[
weakSelf
.
datasArray
addObjectsFromArray
:
integralDatas
.
bills
];
}
else
{
[
weakSelf
ErrorMBProgressView
:
returnValue
[
@"message"
]];
}
...
...
@@ -179,6 +175,8 @@
case
PrizeTableView
:
{
prizeDetailsTableViewCell
*
prizeCell
=
[
tableView
dequeueReusableCellWithIdentifier
:
@"prizeDetailsTableViewCell"
forIndexPath
:
indexPath
];
prizeCell
.
prizeListModel
=
self
.
datasArray
[
indexPath
.
row
];
prizeCell
.
backgroundColor
=
[
UIColor
clearColor
];
return
prizeCell
;
}
break
;
...
...
@@ -196,7 +194,17 @@
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
switch
(
self
.
cellType
)
{
case
PrizeTableView
:
{
PrizeExchangeDetailsViewController
*
exchangeDetails
=
[[[
self
class
]
getGuideIntegralStoryboardClass
]
instantiateViewControllerWithIdentifier
:
@"PrizeExchangeDetailsViewController"
];
[
self
.
navigationController
pushViewController
:
exchangeDetails
animated
:
YES
];
}
break
;
default
:
break
;
}
}
#pragma mark -友好界面
...
...
Class/PrizeExchangeDetailsViewController.m
View file @
f4261d69
...
...
@@ -21,6 +21,11 @@
*/
@property
(
nonatomic
,
strong
)
RsPrizeBill
*
prizeBillResult
;
/**
section title Array
*/
@property
(
nonatomic
,
strong
)
NSArray
*
sectionTitleArray
;
@end
@implementation
PrizeExchangeDetailsViewController
...
...
@@ -65,7 +70,7 @@
#pragma mark - <UITableViewDelegate,UITableViewDataSource>
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
switch
(
indexPath
.
row
)
{
switch
(
indexPath
.
section
)
{
case
ExchangeBillInformation
:
{
PrizeExchangeBillTableViewCell
*
billCell
=
[
tableView
dequeueReusableCellWithIdentifier
:
@"PrizeExchangeBillTableViewCell"
forIndexPath
:
indexPath
];
...
...
@@ -95,7 +100,7 @@
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
return
3
;
return
1
;
}
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
tableView
...
...
@@ -103,23 +108,26 @@
return
3
;
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForHeaderInSection
:
(
NSInteger
)
section
{
return
60
;
}
-
(
UIView
*
)
tableView
:
(
UITableView
*
)
tableView
viewForHeaderInSection
:
(
NSInteger
)
section
{
PrizeExchangeSectionTableViewCell
*
headerView
=
[
tableView
dequeueReusableCellWithIdentifier
:
@"PrizeExchangeSectionTableViewCell"
];
headerView
.
sectionTitleLabel
.
text
=
self
.
sectionTitleArray
[
section
];
return
headerView
;
}
#pragma mark - lazy
-
(
NSArray
*
)
sectionTitleArray
{
if
(
!
_sectionTitleArray
)
{
_sectionTitleArray
=
@[
@"兑换单信息"
,
@"收货信息"
,
@"奖励信息"
,
@"物流信息"
];
}
return
_sectionTitleArray
;
}
...
...
Class/PrizeMainViewController.m
View file @
f4261d69
...
...
@@ -198,13 +198,9 @@
#pragma mark - 兑换记录
-
(
IBAction
)
exchangeRecordButton
:
(
UIButton
*
)
sender
{
// IntegralDetailsViewController *prizeDetails = [[[self class] getGuideIntegralStoryboardClass] instantiateViewControllerWithIdentifier:@"IntegralDetailsViewController"];
// prizeDetails.cellType = PrizeTableView;
// [self.navigationController pushViewController:prizeDetails animated:YES];
PrizeExchangeDetailsViewController
*
exchangeDetails
=
[[[
self
class
]
getGuideIntegralStoryboardClass
]
instantiateViewControllerWithIdentifier
:
@"PrizeExchangeDetailsViewController"
];
[
self
.
navigationController
pushViewController
:
exchangeDetails
animated
:
YES
];
IntegralDetailsViewController
*
prizeDetails
=
[[[
self
class
]
getGuideIntegralStoryboardClass
]
instantiateViewControllerWithIdentifier
:
@"IntegralDetailsViewController"
];
prizeDetails
.
cellType
=
PrizeTableView
;
[
self
.
navigationController
pushViewController
:
prizeDetails
animated
:
YES
];
}
...
...
Class/prizeDetailsTableViewCell.h
View file @
f4261d69
...
...
@@ -12,11 +12,23 @@
/**
兑奖时间
*/
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
prizeTimeLabel
;
/**
兑奖单单号
*/
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
prizeOrderNumberLabel
;
/**
兑奖单状态
*/
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
prizeStateButton
;
/**
兑奖单列表
*/
@property
(
nonatomic
,
strong
)
RsPrizeBill
*
prizeListModel
;
@end
Class/prizeDetailsTableViewCell.m
View file @
f4261d69
...
...
@@ -12,18 +12,25 @@
-
(
void
)
awakeFromNib
{
[
super
awakeFromNib
];
// Initialization code
}
-
(
void
)
setSelected
:
(
BOOL
)
selected
animated
:
(
BOOL
)
animated
{
[
super
setSelected
:
selected
animated
:
animated
];
// Configure the view for the selected state
-
(
void
)
setPrizeListModel
:
(
RsPrizeBill
*
)
prizeListModel
{
_prizeListModel
=
prizeListModel
;
self
.
prizeTimeLabel
.
text
=
_prizeListModel
.
bill
.
createDate
;
self
.
prizeOrderNumberLabel
.
text
=
_prizeListModel
.
bill
.
billnumber
;
NSDictionary
*
textDict
=
[
BaseViewController
returnPrizeBillStateTitleColor
:
_prizeListModel
.
bill
.
state
];
[
self
.
prizeStateButton
setTitle
:
textDict
[
@"title"
]
forState
:
UIControlStateNormal
];
[
self
.
prizeStateButton
setTitleColor
:
textDict
[
@"color"
]
forState
:
UIControlStateNormal
];
}
#pragma mark - 兑奖单状态点击--->详情
-
(
IBAction
)
prizeStateButtonClickAction
:
(
UIButton
*
)
sender
{
}
@end
Lighting/GuideIntegral.storyboard
View file @
f4261d69
This diff is collapsed.
Click to expand it.
Tools/BaseViewController.m
View file @
f4261d69
...
...
@@ -425,10 +425,16 @@
#pragma mark - <##>查询兑奖单state对应文字
//+ (id)returnPrizeBillStateTitleColor:(NSString *)stateCode
//{
//
//}
+
(
id
)
returnPrizeBillStateTitleColor
:
(
NSString
*
)
stateCode
{
NSDictionary
*
dict
;
if
([
stateCode
isEqualToString
:
@"requested"
])
{
dict
=
@{
@"title"
:
@"已申请"
,
@"color"
:
RGB
(
127
,
192
,
62
,
1
)};
}
else
if
([
stateCode
isEqualToString
:
@"requested"
])
{
dict
=
@{
@"title"
:
@"已发货"
,
@"color"
:
RGB
(
245
,
185
,
74
,
1
)};
}
return
dict
;
}
#pragma mark -查询购物车数量
-
(
void
)
QueryShoppingCarNumber
...
...
Tools/PrefixHeader.pch
View file @
f4261d69
...
...
@@ -151,7 +151,7 @@
//**
// * 服务器正式地址
// */
#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://dg.opple.com/opple-web/app%@",URL]
//
#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://dg.opple.com/opple-web/app%@",URL]
/**
* 搜索框输入通知
...
...
Tools/opple_objc_json_client.h
View file @
f4261d69
This diff is collapsed.
Click to expand it.
Tools/opple_objc_json_client.m
View file @
f4261d69
This diff is collapsed.
Click to expand it.
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