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
bbac9510
Commit
bbac9510
authored
Nov 21, 2016
by
曹云霄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改项说明:
parent
7ba8658e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
7 deletions
+11
-7
OrderdetailsViewController.m
Class/OrderdetailsViewController.m
+8
-4
PromotionalTableViewCell.m
Class/PromotionalTableViewCell.m
+1
-1
SettlementViewController.m
Class/SettlementViewController.m
+2
-2
No files found.
Class/OrderdetailsViewController.m
View file @
bbac9510
...
...
@@ -214,6 +214,8 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
[
weakSelf
RemoveMBProgressHUDLoding
];
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
[
weakSelf
.
promotionInformationArray
removeAllObjects
];
[
weakSelf
.
guidePromotionArray
removeAllObjects
];
[
weakSelf
.
customerPromotionArray
removeAllObjects
];
NSArray
*
promotionalArray
=
returnValue
[
@"data"
][
@"actions"
];
for
(
NSDictionary
*
dict
in
promotionalArray
)
{
NSString
*
type
=
dict
[
@"type"
];
...
...
@@ -262,6 +264,8 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
[
weakSelf
RemoveMBProgressHUDLoding
];
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
[
weakSelf
.
promotionInformationArray
removeAllObjects
];
[
weakSelf
.
guidePromotionArray
removeAllObjects
];
[
weakSelf
.
customerPromotionArray
removeAllObjects
];
NSArray
*
promotion
=
returnValue
[
@"data"
];
for
(
NSDictionary
*
dict
in
promotion
)
{
TOOrderPromotionEntity
*
oldPromotion
=
[[
TOOrderPromotionEntity
alloc
]
initWithDictionary
:
dict
error
:
nil
];
...
...
@@ -295,13 +299,13 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
model
.
total
=
[
oldPromotion
.
jdecardDenomation
integerValue
];
model
.
body
=
GUIDE
;
model
.
type
=
JDECardAction
;
[
weakSelf
.
promotionInforma
tionArray
addObject
:
model
];
[
weakSelf
.
guidePromo
tionArray
addObject
:
model
];
}
else
if
(
!
[
BaseViewController
isBlankString
:[
oldPromotion
.
redPackageCount
stringValue
]])
{
// 导购抽奖数
PromotionLuckyDrawModel
*
model
=
[[
PromotionLuckyDrawModel
alloc
]
init
];
model
.
body
=
GUIDE
;
[
weakSelf
.
promotionInforma
tionArray
addObject
:
model
];
[
weakSelf
.
guidePromo
tionArray
addObject
:
model
];
}
else
if
(
!
[
BaseViewController
isBlankString
:[
oldPromotion
.
discountRate
stringValue
]])
{
// 抽奖折扣
PromotionLuckyDrawModel
*
model
=
[[
PromotionLuckyDrawModel
alloc
]
init
];
...
...
@@ -706,7 +710,7 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
-
(
void
)
queryGuideLuckyDrawChanceisTrue
:
(
void
(
^
)())
finish
{
// 查询是否有导购抽奖机会
for
(
id
object
in
self
.
promotionInforma
tionArray
)
{
for
(
id
object
in
self
.
guidePromo
tionArray
)
{
if
([
object
isKindOfClass
:[
PromotionLuckyDrawModel
class
]])
{
PromotionLuckyDrawModel
*
model
=
(
PromotionLuckyDrawModel
*
)
object
;
if
([
model
.
body
isEqualToString
:
GUIDE
])
{
...
...
@@ -750,7 +754,7 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
/// 刷新数据成功
[
weakSelf
getOrderDetailsData
:
^
{
// 先判断促销中有无京东E卡,有则认为发放成功
for
(
id
object
in
weakSelf
.
promotionInforma
tionArray
)
{
for
(
id
object
in
weakSelf
.
guidePromo
tionArray
)
{
if
([
object
isKindOfClass
:[
PromotionJDECardModel
class
]])
{
PromotionJDECardModel
*
model
=
(
PromotionJDECardModel
*
)
object
;
if
([
model
.
body
isEqualToString
:
GUIDE
]
&&
[
model
.
type
isEqualToString
:
JDECardAction
])
{
...
...
Class/PromotionalTableViewCell.m
View file @
bbac9510
...
...
@@ -29,7 +29,7 @@
}
else
if
([
promotionModel
isMemberOfClass
:[
PromotionalDeductionModel
class
]])
{
//抵扣
PromotionalDeductionModel
*
deductionModel
=
(
PromotionalDeductionModel
*
)
promotionModel
;
self
.
promotionalTitleLabel
.
text
=
[
NSString
stringWithFormat
:
@"抵扣
: %@"
,
deductionModel
.
descriptionString
];
self
.
promotionalTitleLabel
.
text
=
[
NSString
stringWithFormat
:
@"抵扣
金额: %ld元"
,
deductionModel
.
total
];
}
else
if
([
promotionModel
isMemberOfClass
:[
PromotionLuckyDrawModel
class
]])
{
//抽奖
self
.
promotionalTitleLabel
.
text
=
[
NSString
stringWithFormat
:
@"转盘抽奖: %@"
,
self
.
model
.
descriptionString
];
...
...
Class/SettlementViewController.m
View file @
bbac9510
...
...
@@ -414,8 +414,8 @@
}
}
order
.
jdCardDenomation
=
totalNumber
;
// 查询是否有
客户
抽奖
for
(
id
object
in
self
.
guidePromotion
Array
)
{
// 查询是否有
消费者
抽奖
for
(
id
object
in
self
.
consumerPromotional
Array
)
{
if
([
object
isKindOfClass
:[
PromotionLuckyDrawModel
class
]])
{
PromotionLuckyDrawModel
*
model
=
(
PromotionLuckyDrawModel
*
)
object
;
if
([
model
.
body
isEqualToString
:
CONSUMER
])
{
...
...
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