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
63f30440
Commit
63f30440
authored
Nov 11, 2016
by
曹云霄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改项说明:
parent
c896772f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
37 deletions
+34
-37
OrderdetailsViewController.m
Class/OrderdetailsViewController.m
+31
-34
NetworkRequestClassManager.m
Tools/NetworkRequestClassManager.m
+1
-1
PrefixHeader.pch
Tools/PrefixHeader.pch
+2
-2
No files found.
Class/OrderdetailsViewController.m
View file @
63f30440
...
...
@@ -328,24 +328,23 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
}
/// 默认弹出支付框
if
(
weakSelf
.
isShowPayButton
&&
[
weakSelf
.
orderDetails
.
order
.
orderState
isEqualToString
:
NOTPAY
])
{
if
(
weakSelf
.
luckyDrawAndJDECardArray
.
count
)
{
for
(
id
object
in
weakSelf
.
luckyDrawAndJDECardArray
)
{
if
([
object
isKindOfClass
:[
LuckyDrawModel
class
]]
&&
!
resultModel
)
{
[
weakSelf
queryConsumerLuckyDrawChance
:
object
];
}
else
{
[
weakSelf
payButtonClickAction
];
}
/// 区分导购抽奖和消费者抽奖
if
([
object
isKindOfClass
:[
LuckyDrawModel
class
]])
{
LuckyDrawModel
*
model
=
object
;
if
([
model
.
body
isEqualToString
:
CONSUMER
])
{
break
;
}
/// 找出客户抽奖
for
(
int
i
=
0
;
i
<
weakSelf
.
luckyDrawAndJDECardArray
.
count
;
i
++
)
{
id
object
=
weakSelf
.
luckyDrawAndJDECardArray
[
i
];
if
([
object
isKindOfClass
:[
LuckyDrawModel
class
]]
&&
!
resultModel
)
{
LuckyDrawModel
*
model
=
(
LuckyDrawModel
*
)
object
;
if
([
model
.
body
isEqualToString
:
CONSUMER
])
{
[
weakSelf
queryConsumerLuckyDrawChance
:
model
];
break
;
}
}
}
else
{
/// 无促销的情况
/// 有促销无抽奖情况
if
(
i
==
weakSelf
.
luckyDrawAndJDECardArray
.
count
-
1
)
{
[
weakSelf
payButtonClickAction
];
}
}
/// 无促销情况
if
(
!
weakSelf
.
luckyDrawAndJDECardArray
.
count
)
{
[
weakSelf
payButtonClickAction
];
}
}
...
...
@@ -469,26 +468,24 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
-
(
void
)
queryConsumerLuckyDrawChance
:
(
LuckyDrawModel
*
)
model
{
WS
(
weakSelf
);
if
([
model
.
body
isEqualToString
:
CONSUMER
])
{
UIAlertController
*
alertControl
=
[
UIAlertController
alertControllerWithTitle
:
nil
message
:
@"恭喜您获得一次大转盘抽奖机会!"
preferredStyle
:
UIAlertControllerStyleAlert
];
[
alertControl
addAction
:[
UIAlertAction
actionWithTitle
:
@"马上参与"
style
:
UIAlertActionStyleDefault
handler
:
^
(
UIAlertAction
*
_Nonnull
action
)
{
[
weakSelf
showLuckyDrawControl
:
model
.
lottery
.
uuid
andOrderNumber
:
weakSelf
.
orderCode
luckyDrawFinish
:^
(
NSDictionary
*
dict
)
{
id
json
=
[
NSJSONSerialization
JSONObjectWithData
:[
dict
[
@"body"
]
dataUsingEncoding
:
NSUTF8StringEncoding
]
options
:
NSJSONReadingMutableContainers
error
:
nil
];
if
(
json
)
{
if
([
json
isKindOfClass
:[
NSDictionary
class
]])
{
weakSelf
.
customerDrawModel
=
[[
LuckDrawResultModel
alloc
]
initWithDictionary
:
json
error
:
nil
];
if
([
BaseViewController
isBlankString
:
weakSelf
.
customerDrawModel
.
awardId
])
{
[
weakSelf
SHOWPrompttext
:
@"未中奖"
];
}
else
{
[
weakSelf
SHOWPrompttext
:[
NSString
stringWithFormat
:
@"恭喜你获得了 %@"
,
weakSelf
.
customerDrawModel
.
descriptionString
]];
}
UIAlertController
*
alertControl
=
[
UIAlertController
alertControllerWithTitle
:
nil
message
:
@"恭喜您获得一次大转盘抽奖机会!"
preferredStyle
:
UIAlertControllerStyleAlert
];
[
alertControl
addAction
:[
UIAlertAction
actionWithTitle
:
@"马上参与"
style
:
UIAlertActionStyleDefault
handler
:
^
(
UIAlertAction
*
_Nonnull
action
)
{
[
weakSelf
showLuckyDrawControl
:
model
.
lottery
.
uuid
andOrderNumber
:
weakSelf
.
orderCode
luckyDrawFinish
:^
(
NSDictionary
*
dict
)
{
id
json
=
[
NSJSONSerialization
JSONObjectWithData
:[
dict
[
@"body"
]
dataUsingEncoding
:
NSUTF8StringEncoding
]
options
:
NSJSONReadingMutableContainers
error
:
nil
];
if
(
json
)
{
if
([
json
isKindOfClass
:[
NSDictionary
class
]])
{
weakSelf
.
customerDrawModel
=
[[
LuckDrawResultModel
alloc
]
initWithDictionary
:
json
error
:
nil
];
if
([
BaseViewController
isBlankString
:
weakSelf
.
customerDrawModel
.
awardId
])
{
[
weakSelf
SHOWPrompttext
:
@"未中奖"
];
}
else
{
[
weakSelf
SHOWPrompttext
:[
NSString
stringWithFormat
:
@"恭喜你获得了 %@"
,
weakSelf
.
customerDrawModel
.
descriptionString
]];
}
}
return
;
}]
;
}]
]
;
[
self
presentViewController
:
alertControl
animated
:
YES
completion
:
nil
];
}
}
return
;
}];
}]
];
[
self
presentViewController
:
alertControl
animated
:
YES
completion
:
nil
];
}
#pragma mark - 查询导购抽奖机会
...
...
Tools/NetworkRequestClassManager.m
View file @
63f30440
...
...
@@ -48,7 +48,7 @@ static NetworkRequestClassManager *manager = nil;
AFHTTPSessionManager
*
manager
=
[
AFHTTPSessionManager
manager
];
manager
.
responseSerializer
=
[
AFJSONResponseSerializer
serializer
];
manager
.
requestSerializer
=
[
AFJSONRequestSerializer
serializer
];
manager
.
requestSerializer
.
timeoutInterval
=
1
0
.
0
f
;
manager
.
requestSerializer
.
timeoutInterval
=
6
0
.
0
f
;
[
manager
.
requestSerializer
setValue
:
@"application/json;charset=utf-8"
forHTTPHeaderField
:
@"Content-Type"
];
return
manager
;
}
...
...
Tools/PrefixHeader.pch
View file @
63f30440
...
...
@@ -118,7 +118,7 @@
/**
* 服务器开发地址
*/
//
#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://139.196.195.30:8090/opple-web/app%@",URL]
#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://139.196.195.30:8090/opple-web/app%@",URL]
/**
...
...
@@ -129,7 +129,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]
/**
* 搜索框输入通知
...
...
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