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
e6ea7308
Commit
e6ea7308
authored
Oct 27, 2016
by
曹云霄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复热门推荐数据解析错误,修复购物车输入折扣比例偶发崩溃
parent
fab2a3a8
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
190 additions
and
132 deletions
+190
-132
CardAmplificationViewController.h
Class/CardAmplificationViewController.h
+1
-1
CardAmplificationViewController.m
Class/CardAmplificationViewController.m
+3
-3
CardAmplificationViewController.xib
Class/CardAmplificationViewController.xib
+8
-6
CardDontUseViewController.m
Class/CardDontUseViewController.m
+12
-3
CustomerOrderViewController.m
Class/CustomerOrderViewController.m
+5
-11
OrderdetailsViewController.m
Class/OrderdetailsViewController.m
+49
-36
SearchViewController.m
Class/SearchViewController.m
+24
-26
AddressViewController.m
Class/Shoppingcart/AddressViewController.m
+3
-3
ShoppingViewController.m
Class/Shoppingcart/ShoppingViewController.m
+47
-8
CustomTabbarController.m
Class/Tabbar/CustomTabbarController.m
+1
-2
Info.plist
Lighting/Info.plist
+1
-1
StoryboardwithCYX.storyboard
Lighting/StoryboardwithCYX.storyboard
+25
-25
BaseViewController.m
Tools/BaseViewController.m
+4
-7
opple_objc_json_client.m
Tools/opple_objc_json_client.m
+7
-0
No files found.
Class/CardAmplificationViewController.h
View file @
e6ea7308
...
...
@@ -55,6 +55,6 @@
/**
* 改变京东卡状态后需要刷新
*/
@property
(
nonatomic
,
copy
)
void
(
^
refreshJDCardList
)(
BOOL
isComplete
);
@property
(
nonatomic
,
copy
)
void
(
^
refreshJDCardList
)(
BOOL
isComplete
,
NSString
*
cardNumber
);
@end
Class/CardAmplificationViewController.m
View file @
e6ea7308
...
...
@@ -51,17 +51,17 @@
WS
(
weakSelf
);
[
self
CreateMBProgressHUDLoding
];
[[
NetworkRequestClassManager
Manager
]
NetworkWithDictionaryRequestWithURL
:[
NSString
stringWithFormat
:
SERVERREQUESTURL
(
RECEIVEJDECARD
),
_
cardModel
.
cardNumber
]
WithRequestType
:
ZERO
WithParameter
:
nil
WithReturnValueBlock
:^
(
id
returnValue
)
{
[[
NetworkRequestClassManager
Manager
]
NetworkWithDictionaryRequestWithURL
:[
NSString
stringWithFormat
:
SERVERREQUESTURL
(
RECEIVEJDECARD
),
self
.
cardModel
.
cardNumber
]
WithRequestType
:
ZERO
WithParameter
:
nil
WithReturnValueBlock
:^
(
id
returnValue
)
{
[
weakSelf
RemoveMBProgressHUDLoding
];
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
if
(
weakSelf
.
refreshJDCardList
)
{
weakSelf
.
refreshJDCardList
(
YES
);
weakSelf
.
refreshJDCardList
(
YES
,
weakSelf
.
cardModel
.
cardNumber
);
}
}
else
{
if
(
weakSelf
.
refreshJDCardList
)
{
weakSelf
.
refreshJDCardList
(
YES
);
weakSelf
.
refreshJDCardList
(
NO
,
weakSelf
.
cardModel
.
cardNumber
);
}
}
...
...
Class/CardAmplificationViewController.xib
View file @
e6ea7308
...
...
@@ -68,12 +68,12 @@
<color
key=
"textColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
alpha=
"0.29999999999999999"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"
12362514"
textAlignment=
"natural
"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"z4q-vO-5Wt"
>
<rect
key=
"frame"
x=
"18"
y=
"265"
width=
"
110
"
height=
"26"
/>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
alpha=
"0.29999999999999999"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"
2FF0-3F9D-DCC6-D1CD"
textAlignment=
"center
"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"z4q-vO-5Wt"
>
<rect
key=
"frame"
x=
"18"
y=
"265"
width=
"
215
"
height=
"26"
/>
<color
key=
"backgroundColor"
white=
"0.33333333333333331"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"26"
id=
"
6fp-21-x2D
"
/>
<constraint
firstAttribute=
"width"
constant=
"
110"
id=
"yD7-fO-xTg
"
/>
<constraint
firstAttribute=
"height"
constant=
"26"
id=
"
QRy-tb-lRt
"
/>
<constraint
firstAttribute=
"width"
constant=
"
215"
id=
"oIE-kX-N6G
"
/>
</constraints>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"18"
/>
<color
key=
"textColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
...
...
@@ -106,14 +106,16 @@
<constraint
firstItem=
"4rL-ti-mfn"
firstAttribute=
"top"
secondItem=
"i5M-Pr-FkT"
secondAttribute=
"top"
id=
"1KA-cY-Iy4"
/>
<constraint
firstItem=
"f9T-ak-TEq"
firstAttribute=
"top"
secondItem=
"4rL-ti-mfn"
secondAttribute=
"bottom"
constant=
"14"
id=
"3UD-nV-ZGF"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"4rL-ti-mfn"
secondAttribute=
"trailing"
id=
"8cB-Ma-qfw"
/>
<constraint
firstItem=
"z4q-vO-5Wt"
firstAttribute=
"leading"
secondItem=
"i5M-Pr-FkT"
secondAttribute=
"leading"
constant=
"18"
id=
"CaL-i2-ql2"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"4rL-ti-mfn"
secondAttribute=
"bottom"
constant=
"61"
id=
"DpK-EL-Z6i"
/>
<constraint
firstItem=
"4rL-ti-mfn"
firstAttribute=
"leading"
secondItem=
"i5M-Pr-FkT"
secondAttribute=
"leading"
id=
"EAG-QZ-ddA"
/>
<constraint
firstItem=
"fSg-ii-Gn4"
firstAttribute=
"top"
secondItem=
"4rL-ti-mfn"
secondAttribute=
"bottom"
constant=
"13"
id=
"Eba-U3-xgV"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"0aw-rU-2w8"
secondAttribute=
"trailing"
constant=
"19"
id=
"FLO-73-7b1"
/>
<constraint
firstItem=
"z4q-vO-5Wt"
firstAttribute=
"leading"
secondItem=
"i5M-Pr-FkT"
secondAttribute=
"leading"
constant=
"18"
id=
"Ibg-pO-sAu"
/>
<constraint
firstItem=
"f9T-ak-TEq"
firstAttribute=
"width"
secondItem=
"fSg-ii-Gn4"
secondAttribute=
"width"
id=
"MD2-dC-LcZ"
/>
<constraint
firstItem=
"f9T-ak-TEq"
firstAttribute=
"leading"
secondItem=
"fSg-ii-Gn4"
secondAttribute=
"trailing"
constant=
"131"
id=
"O5P-bH-hPu"
/>
<constraint
firstItem=
"0aw-rU-2w8"
firstAttribute=
"leading"
secondItem=
"z4q-vO-5Wt"
secondAttribute=
"trailing"
constant=
"168"
id=
"Occ-s2-2SM"
/>
<constraint
firstItem=
"f9T-ak-TEq"
firstAttribute=
"height"
secondItem=
"fSg-ii-Gn4"
secondAttribute=
"height"
id=
"P02-TC-Nbq"
/>
<constraint
firstItem=
"z4q-vO-5Wt"
firstAttribute=
"top"
secondItem=
"14z-ZJ-5E3"
secondAttribute=
"bottom"
constant=
"91"
id=
"P2w-XZ-nvT"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"f9T-ak-TEq"
secondAttribute=
"trailing"
constant=
"65"
id=
"Ubj-HW-uUA"
/>
<constraint
firstItem=
"fSg-ii-Gn4"
firstAttribute=
"leading"
secondItem=
"i5M-Pr-FkT"
secondAttribute=
"leading"
constant=
"64"
id=
"YaH-SL-lIj"
/>
<constraint
firstItem=
"14z-ZJ-5E3"
firstAttribute=
"top"
secondItem=
"CGQ-Gi-Un9"
secondAttribute=
"bottom"
constant=
"99"
id=
"beO-os-gtb"
/>
...
...
@@ -121,7 +123,7 @@
<constraint
firstItem=
"14z-ZJ-5E3"
firstAttribute=
"top"
secondItem=
"i5M-Pr-FkT"
secondAttribute=
"top"
constant=
"134"
id=
"ccO-gx-N8z"
/>
<constraint
firstItem=
"CGQ-Gi-Un9"
firstAttribute=
"leading"
secondItem=
"i5M-Pr-FkT"
secondAttribute=
"leading"
constant=
"18"
id=
"eta-0d-eMW"
/>
<constraint
firstItem=
"14z-ZJ-5E3"
firstAttribute=
"leading"
secondItem=
"i5M-Pr-FkT"
secondAttribute=
"leading"
constant=
"19"
id=
"gad-Bc-32l"
/>
<constraint
firstItem=
"
z4q-vO-5Wt"
firstAttribute=
"top"
secondItem=
"14z-ZJ-5E3"
secondAttribute=
"bottom"
constant=
"91"
id=
"hC3-WA-xfF
"
/>
<constraint
firstItem=
"
fSg-ii-Gn4"
firstAttribute=
"top"
secondItem=
"z4q-vO-5Wt"
secondAttribute=
"bottom"
constant=
"31"
id=
"nCg-zX-rde
"
/>
<constraint
firstItem=
"0aw-rU-2w8"
firstAttribute=
"top"
secondItem=
"14z-ZJ-5E3"
secondAttribute=
"bottom"
constant=
"84"
id=
"q1e-rl-FWk"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"14z-ZJ-5E3"
secondAttribute=
"trailing"
constant=
"19"
id=
"q4q-Sl-q31"
/>
<constraint
firstItem=
"CGQ-Gi-Un9"
firstAttribute=
"top"
secondItem=
"i5M-Pr-FkT"
secondAttribute=
"top"
constant=
"11"
id=
"t35-hH-3J6"
/>
...
...
Class/CardDontUseViewController.m
View file @
e6ea7308
...
...
@@ -108,7 +108,6 @@
{
WS
(
weakSelf
);
[
self
CreateMBProgressHUDLoding
];
NSLog
(
@"%@"
,[
self
.
requestModel
toDictionary
]);
[[
NetworkRequestClassManager
Manager
]
NetworkRequestWithURL
:
SERVERREQUESTURL
(
CARDINFORMATION
)
WithRequestType
:
ZERO
WithParameter
:
self
.
requestModel
WithReturnValueBlock
:^
(
id
returnValue
)
{
[
weakSelf
RemoveMBProgressHUDLoding
];
...
...
@@ -184,9 +183,19 @@
pop
.
sourceView
=
settlement
.
view
;
settlement
.
cardModel
=
model
.
eCards
[
indexPath
.
row
];
WS
(
weakSelf
);
[
settlement
setRefreshJDCardList
:
^
(
BOOL
boolValue
)
{
[
settlement
setRefreshJDCardList
:
^
(
BOOL
boolValue
,
NSString
*
cardNumber
)
{
[
weakSelf
SHOWPrompttext
:
boolValue
?
@"领取成功"
:
@"领取失败"
];
[
weakSelf
.
dontUseCardCollectionView
.
mj_header
beginRefreshing
];
for
(
GroupByOrderNumber
*
model
in
weakSelf
.
datasArray
)
{
for
(
TOJingdongEcardEntity
*
cardModel
in
model
.
eCards
)
{
if
([
cardModel
.
cardNumber
isEqualToString
:
cardNumber
])
{
NSMutableArray
*
mutableCard
=
[
NSMutableArray
array
];
[
mutableCard
addObjectsFromArray
:
model
.
eCards
];
[
mutableCard
removeObject
:
cardModel
];
model
.
eCards
=
(
NSArray
<
TOJingdongEcardEntity
>*
)
mutableCard
;
goto
end
;
}
}
}
end:
NSLog
(
@"跳出"
);
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
VIEWPASSWORD
object
:
nil
];
}];
[
self
presentViewController
:
settlement
animated
:
YES
completion
:
nil
];
...
...
Class/CustomerOrderViewController.m
View file @
e6ea7308
...
...
@@ -308,22 +308,17 @@
#pragma mark -撤销订单
-
(
void
)
undoOrderButtonClick
:
(
NSInteger
)
cellindex
{
__weak
typeof
(
self
)
weakSelf
=
self
;
WS
(
weakSelf
)
;
UIAlertController
*
alertVC
=
[
UIAlertController
alertControllerWithTitle
:
@"提示"
message
:
@"请确认是否撤销订单"
preferredStyle
:
UIAlertControllerStyleAlert
];
[
alertVC
addAction
:[
UIAlertAction
actionWithTitle
:
@"取消"
style
:
UIAlertActionStyleCancel
handler
:
^
(
UIAlertAction
*
_Nonnull
action
)
{
[
weakSelf
dismissViewControllerAnimated
:
YES
completion
:
nil
];
}]];
[
alertVC
addAction
:[
UIAlertAction
actionWithTitle
:
@"取消"
style
:
UIAlertActionStyleCancel
handler
:
nil
]];
[
alertVC
addAction
:[
UIAlertAction
actionWithTitle
:
@"确认"
style
:
UIAlertActionStyleDestructive
handler
:
^
(
UIAlertAction
*
_Nonnull
action
)
{
[
weakSelf
CreateMBProgressHUDLoding
];
OrderBill
*
model
=
[
weakSelf
.
datasArray
objectAtIndex_opple
:
cellindex
];
[[
NetworkRequestClassManager
Manager
]
NetworkWithDictionaryRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@/%@/%@"
,
SERVERREQUESTURL
(
RESETORDER
),
model
.
order
.
orderNumber
,
model
.
order
.
orderState
,
@"005"
]
WithRequestType
:
1
WithParameter
:
nil
WithReturnValueBlock
:^
(
id
returnValue
)
{
[
weakSelf
dismissViewControllerAnimated
:
YES
completion
:
nil
];
[
weakSelf
RemoveMBProgressHUDLoding
];
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
[
weakSelf
SuccessMBProgressView
:
@"撤销成功"
];
model
.
order
.
orderState
=
@"005"
;
NSIndexPath
*
indexapath
=
[
NSIndexPath
indexPathForRow
:
cellindex
inSection
:
0
];
...
...
@@ -336,13 +331,12 @@
}
WithErrorCodeBlock
:^
(
id
errorCodeValue
)
{
[
self
RemoveMBProgressHUDLoding
];
[
self
ErrorMBProgressView
:
@"无网络"
];
}
WithFailureBlock
:^
(
id
error
)
{
[
self
ErrorMBProgressView
:
NETWORK
];
}
WithFailureBlock
:^
(
NSError
*
error
)
{
[
weakSelf
RemoveMBProgressHUDLoding
];
[
weakSelf
ErrorMBProgressView
:
error
.
localizedDescription
];
}];
}]];
[
self
presentViewController
:
alertVC
animated
:
YES
completion
:
nil
];
}
...
...
Class/OrderdetailsViewController.m
View file @
e6ea7308
...
...
@@ -138,7 +138,7 @@ NSString *const lotteryAction = @"lotteryAction";
[
super
viewDidLoad
];
[
self
uiConfigAction
];
[
self
getOrderDetailsData
:
NO
issueJDECard
:
ZERO
andGuideId
:
nil
andOrderNumber
:
nil
];
[
self
getOrderDetailsData
:
nil
];
}
#pragma mark - UI
...
...
@@ -157,7 +157,7 @@ NSString *const lotteryAction = @"lotteryAction";
}
#pragma mark -获取订单详情、查询促销信息、领取京东E卡
-
(
void
)
getOrderDetailsData
:
(
BOOL
)
isReceiveJDECard
issueJDECard
:
(
NSInteger
)
denomation
andGuideId
:
(
NSString
*
)
guideId
andOrderNumber
:
(
NSString
*
)
orderNumber
-
(
void
)
getOrderDetailsData
:
(
void
(
^
)())
finish
{
dispatch_group_t
group
=
dispatch_group_create
();
dispatch_group_enter
(
group
);
...
...
@@ -223,29 +223,12 @@ NSString *const lotteryAction = @"lotteryAction";
[
weakSelf
RemoveMBProgressHUDLoding
];
[
weakSelf
ErrorMBProgressView
:
error
.
localizedDescription
];
}];
//** 发放京东E卡 */
if
(
isReceiveJDECard
)
{
dispatch_group_enter
(
group
);
[[
NetworkRequestClassManager
Manager
]
NetworkWithDictionaryRequestWithURL
:[
NSString
stringWithFormat
:
SERVERREQUESTURL
(
JDECARD
),
denomation
,
guideId
,
orderNumber
]
WithRequestType
:
0
WithParameter
:
nil
WithReturnValueBlock
:^
(
id
returnValue
)
{
dispatch_group_leave
(
group
);
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
[
weakSelf
showJEDCard
];
}
else
{
[
weakSelf
ErrorMBProgressView
:
@"京东E卡领取失败"
];
}
}
WithErrorCodeBlock
:^
(
id
errorCodeValue
)
{
dispatch_group_leave
(
group
);
[
weakSelf
ErrorMBProgressView
:
NETWORK
];
}
WithFailureBlock
:^
(
NSError
*
error
)
{
dispatch_group_leave
(
group
);
[
weakSelf
ErrorMBProgressView
:
error
.
localizedDescription
];
}];
}
//** 完成后回调 */
dispatch_group_notify
(
group
,
dispatch_get_main_queue
(),
^
{
if
(
finish
)
{
finish
();
}
[
weakSelf
.
orderDetailsTableview
reloadData
];
//默认弹出支付框
if
(
weakSelf
.
isShowPayButton
&&
[
weakSelf
.
orderDetails
.
order
.
orderState
isEqualToString
:
@"001"
])
{
...
...
@@ -254,8 +237,31 @@ NSString *const lotteryAction = @"lotteryAction";
});
}
#pragma mark - 方法京东E卡
-
(
void
)
issueJDECard
:
(
NSInteger
)
denomation
andGuideId
:
(
NSString
*
)
guideId
andOrderNumber
:
(
NSString
*
)
orderNumber
{
WS
(
weakSelf
);
[
self
CreateMBProgressHUDLoding
];
[[
NetworkRequestClassManager
Manager
]
NetworkWithDictionaryRequestWithURL
:[
NSString
stringWithFormat
:
SERVERREQUESTURL
(
JDECARD
),
denomation
,
guideId
,
orderNumber
]
WithRequestType
:
0
WithParameter
:
nil
WithReturnValueBlock
:^
(
id
returnValue
)
{
[
weakSelf
RemoveMBProgressHUDLoding
];
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
[
weakSelf
showJDECard
];
}
else
{
[
weakSelf
ErrorMBProgressView
:
@"京东E卡领取失败"
];
}
}
WithErrorCodeBlock
:^
(
id
errorCodeValue
)
{
[
weakSelf
RemoveMBProgressHUDLoding
];
[
weakSelf
ErrorMBProgressView
:
NETWORK
];
}
WithFailureBlock
:^
(
NSError
*
error
)
{
[
weakSelf
RemoveMBProgressHUDLoding
];
[
weakSelf
ErrorMBProgressView
:
error
.
localizedDescription
];
}];
}
#pragma mark - 显示京东E卡
-
(
void
)
showJ
ED
Card
-
(
void
)
showJ
DE
Card
{
WS
(
weakSelf
);
JDEcardViewController
*
jdeCard
=
[[
self
getStoryboardWithName
]
instantiateViewControllerWithIdentifier
:
@"JDEcardViewController"
];
...
...
@@ -350,22 +356,29 @@ NSString *const lotteryAction = @"lotteryAction";
//支付成功
WS
(
weakSelf
);
[
settlement
setPaySuccessReturnBlock
:
^
{
[
weakSelf
SuccessMBProgressView
:
@"支付成功"
];
weakSelf
.
isDelectedButton
=
NO
;
weakSelf
.
isUserInteractionEnabled
=
NO
;
[
weakSelf
CreateTableviewHeaderView
];
//** 京东E卡 */
for
(
id
object
in
weakSelf
.
luckyDrawAndJDECardArray
)
{
if
([
object
isKindOfClass
:[
PromotionalDeductionModel
class
]])
{
PromotionalDeductionModel
*
model
=
(
PromotionalDeductionModel
*
)
object
;
if
([
model
.
type
isEqualToString
:
JDECardAction
])
{
[
weakSelf
getOrderDetailsData
:
YES
issueJDECard
:
model
.
total
andGuideId
:
[
Shoppersmanager
manager
].
Shoppers
.
employee
.
fid
andOrderNumber
:
self
.
orderCode
];
break
;
[
weakSelf
SHOWPrompttext
:
@"支付成功"
ComcpleteBlock
:
^
{
weakSelf
.
isDelectedButton
=
NO
;
weakSelf
.
isUserInteractionEnabled
=
NO
;
[
weakSelf
CreateTableviewHeaderView
];
[
weakSelf
getOrderDetailsData
:
^
{
//** 京东E卡 */
NSInteger
totalNumber
=
0
;
//促销卡面额
for
(
id
object
in
weakSelf
.
luckyDrawAndJDECardArray
)
{
if
([
object
isKindOfClass
:[
PromotionalDeductionModel
class
]])
{
PromotionalDeductionModel
*
model
=
(
PromotionalDeductionModel
*
)
object
;
if
([
model
.
type
isEqualToString
:
JDECardAction
])
{
totalNumber
+=
model
.
total
;
}
}
}
}
}
if
(
totalNumber
)
{
[
weakSelf
issueJDECard
:
totalNumber
andGuideId
:[
Shoppersmanager
manager
].
Shoppers
.
employee
.
fid
andOrderNumber
:
self
.
orderCode
];
}
}];
}];
//** 无促销的情况 */
if
(
self
.
luckyDrawAndJDECardArray
.
count
==
0
)
{
[
weakSelf
getOrderDetailsData
:
NO
issueJDECard
:
ZERO
andGuideId
:
nil
andOrderNumber
:
nil
];
[
weakSelf
getOrderDetailsData
:
nil
];
}
weakSelf
.
orderDetailsTableview
.
tableFooterView
=
nil
;
if
(
weakSelf
.
DelecteAndPayButtonBlock
)
{
...
...
Class/SearchViewController.m
View file @
e6ea7308
...
...
@@ -151,25 +151,27 @@
#pragma mark -获取热门搜索数据
-
(
void
)
getHotSearchdatas
{
WS
(
weakSelf
);
[
self
CreateMBProgressHUDLoding
];
[[
NetworkRequestClassManager
Manager
]
NetworkWithDictionaryRequestWithURL
:
SERVERREQUESTURL
(
HOTSEARCH
)
WithRequestType
:
1
WithParameter
:
nil
WithReturnValueBlock
:^
(
id
returnValue
)
{
[
s
elf
RemoveMBProgressHUDLoding
];
[
weakS
elf
RemoveMBProgressHUDLoding
];
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
s
elf
.
response
=
[[
HotFilter
alloc
]
initWithDictionary
:
returnValue
[
@"data"
]
error
:
nil
];
[
s
elf
.
hotCollectionView
reloadData
];
weakS
elf
.
response
=
[[
HotFilter
alloc
]
initWithDictionary
:
returnValue
[
@"data"
]
error
:
nil
];
[
weakS
elf
.
hotCollectionView
reloadData
];
}
else
{
[
s
elf
ErrorMBProgressView
:
returnValue
[
@"message"
]];
[
weakS
elf
ErrorMBProgressView
:
returnValue
[
@"message"
]];
}
}
WithErrorCodeBlock
:^
(
id
errorCodeValue
)
{
[
self
RemoveMBProgressHUDLoding
];
[
self
ErrorMBProgressView
:
@"无网络"
];
}
WithFailureBlock
:^
(
id
error
)
{
[
self
RemoveMBProgressHUDLoding
];
[
weakSelf
RemoveMBProgressHUDLoding
];
[
weakSelf
ErrorMBProgressView
:
NETWORK
];
}
WithFailureBlock
:^
(
NSError
*
error
)
{
[
weakSelf
RemoveMBProgressHUDLoding
];
[
weakSelf
ErrorMBProgressView
:
error
.
localizedDescription
];
}];
}
...
...
@@ -201,21 +203,26 @@
{
if
([
collectionView
isEqual
:
self
.
hotCollectionView
])
{
[
self
.
localSearchArray
addObject
:[[
self
.
response
.
list
objectAtIndex_opple
:
indexPath
.
item
]
typeName
]
];
//调用商品控制器
ProductLibraryViewController
*
productVC
=
[[
self
getStoryboardWithName
]
instantiateViewControllerWithIdentifier
:
@"productlibrary"
];
productVC
.
selectedCode
=
[[
self
.
response
.
list
objectAtIndex_opple
:
indexPath
.
item
]
typecode
];
[
self
.
navigationController
pushViewController
:
productVC
animated
:
NO
];
NSString
*
typeName
=
[[
self
.
response
.
list
objectAtIndex_opple
:
indexPath
.
item
]
typeName
];
if
(
!
[
self
.
localSearchArray
containsObject
:
typeName
])
{
[
self
.
localSearchArray
addObject
:[[
self
.
response
.
list
objectAtIndex_opple
:
indexPath
.
item
]
typeName
]
];
}
[
self
callProductControl
:[[
self
.
response
.
list
objectAtIndex_opple
:
indexPath
.
item
]
typecode
]
];
}
else
if
([
collectionView
isEqual
:
self
.
historyCollectionView
])
{
//调用商品控制器
ProductLibraryViewController
*
productVC
=
[[
self
getStoryboardWithName
]
instantiateViewControllerWithIdentifier
:
@"productlibrary"
];
productVC
.
selectedCode
=
[
self
.
localSearchArray
objectAtIndex_opple
:
indexPath
.
item
];
[
self
.
navigationController
pushViewController
:
productVC
animated
:
NO
];
[
self
callProductControl
:[
self
.
localSearchArray
objectAtIndex_opple
:
indexPath
.
item
]];
}
}
#pragma mark - 调用商品控制器
-
(
void
)
callProductControl
:
(
NSString
*
)
codeString
{
ProductLibraryViewController
*
productVC
=
[[
self
getStoryboardWithName
]
instantiateViewControllerWithIdentifier
:
@"productlibrary"
];
productVC
.
selectedCode
=
codeString
;
[
self
.
navigationController
pushViewController
:
productVC
animated
:
NO
];
}
#pragma mark -释放
-
(
void
)
dealloc
{
...
...
@@ -241,17 +248,8 @@
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
// Dispose of any resources that can be recreated.
}
/*
#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
Class/Shoppingcart/AddressViewController.m
View file @
e6ea7308
...
...
@@ -146,11 +146,11 @@
-
(
IBAction
)
addAddressButtonClick
:
(
UIButton
*
)
sender
{
NSString
*
phoneNumber
=
self
.
PhoneNumber
.
text
;
if
(
!
[
BaseViewController
isBlankString
:
self
.
recipientPerson
.
text
])
{
if
([
BaseViewController
isBlankString
:
self
.
recipientPerson
.
text
])
{
[
self
ErrorMBProgressView
:
@"请输入收货人姓名"
];
return
;
}
if
([
BaseViewController
isBlankString
:
phoneNumber
]
<=
0
)
{
if
([
BaseViewController
isBlankString
:
phoneNumber
])
{
[
self
ErrorMBProgressView
:
@"手机号码不能为空"
];
return
;
}
...
...
@@ -159,7 +159,7 @@
[
self
ErrorMBProgressView
:
@"手机号码格式不正确"
];
return
;
}
if
(
!
[
BaseViewController
isBlankString
:
self
.
detailsAddress
.
text
])
{
if
([
BaseViewController
isBlankString
:
self
.
detailsAddress
.
text
])
{
[
self
ErrorMBProgressView
:
@"请输入详细地址"
];
return
;
}
...
...
Class/Shoppingcart/ShoppingViewController.m
View file @
e6ea7308
...
...
@@ -23,6 +23,11 @@
*/
@property
(
nonatomic
,
strong
)
NSMutableArray
*
shopResponseArray
;
/**
* 折扣比例输入
*/
@property
(
nonatomic
,
strong
)
UITextField
*
textField
;
@end
...
...
@@ -58,6 +63,7 @@
[
self
.
shopResponseArray
removeAllObjects
];
[
self
InitializeState
];
[
self
getShoppingCardata
];
[
self
QueryShoppingCarNumber
];
}
#pragma mark -视图即将消失
...
...
@@ -95,6 +101,9 @@
#pragma mark -<UITextFieldDelegate>
-
(
BOOL
)
textFieldShouldBeginEditing
:
(
UITextField
*
)
textField
{
if
(
!
[
textField
isEqual
:
self
.
discountTextField
])
{
return
YES
;
}
if
(
self
.
shopResponseArray
.
count
==
0
)
{
[
self
ErrorMBProgressView
:
@"请先添加商品到购物车"
];
return
NO
;
}
...
...
@@ -107,18 +116,47 @@
if
(
array
.
count
==
0
)
{
[
self
ErrorMBProgressView
:
@"没有选中任何商品"
];
return
NO
;
}
return
YES
;
[
self
inputDiscountNumber
];
return
NO
;
}
-
(
BOOL
)
textFieldShouldEndEditing
:
(
UITextField
*
)
textField
#pragma mark - 输入折扣金额
-
(
void
)
inputDiscountNumber
{
WS
(
weakSelf
);
UIAlertController
*
alertControl
=
[
UIAlertController
alertControllerWithTitle
:
@"提示"
message
:
@"请输入折扣比例(%)"
preferredStyle
:
UIAlertControllerStyleAlert
];
[
alertControl
addAction
:[
UIAlertAction
actionWithTitle
:
@"取消"
style
:
UIAlertActionStyleCancel
handler
:
^
(
UIAlertAction
*
_Nonnull
action
)
{
weakSelf
.
textField
.
text
=
nil
;
[
weakSelf
textFieldEndEditing
];
}]];
[
alertControl
addTextFieldWithConfigurationHandler
:
^
(
UITextField
*
_Nonnull
textField
)
{
weakSelf
.
textField
=
textField
;
textField
.
placeholder
=
@"请输入"
;
textField
.
keyboardType
=
UIKeyboardTypeNumberPad
;
textField
.
delegate
=
self
;
}];
[
alertControl
addAction
:[
UIAlertAction
actionWithTitle
:
@"确认"
style
:
UIAlertActionStyleDestructive
handler
:
^
(
UIAlertAction
*
_Nonnull
action
)
{
[
weakSelf
textFieldEndEditing
];
}]];
[
self
presentViewController
:
alertControl
animated
:
YES
completion
:
nil
];
}
#pragma mark - 结束编辑
-
(
void
)
textFieldEndEditing
{
if
([
BaseViewController
isBlankString
:
self
.
textField
.
text
])
{
return
;
}
Shoppersmanager
*
user
=
[
Shoppersmanager
manager
];
if
([
textField
.
text
integerValue
]
<
[
user
.
Shoppers
.
lowestDiscount
integerValue
]
&&
textField
.
text
.
length
)
if
([
self
.
textField
.
text
integerValue
]
<
[
user
.
Shoppers
.
lowestDiscount
integerValue
]
&&
self
.
textField
.
text
.
length
)
{
[
self
SHOWPrompttext
:
@"当前价格低于你的价格权限!"
];
return
NO
;
[
self
SHOWPrompttext
:
@"当前价格低于你的价格权限!"
];
self
.
textField
.
text
=
nil
;
}
else
{
self
.
discountTextField
.
text
=
self
.
textField
.
text
;
[
self
unifiedChangeDiscount
:
self
.
textField
.
text
];
}
[
self
unifiedChangeDiscount
:
textField
.
text
];
return
YES
;
}
#pragma mark - 输入折扣比例
...
...
@@ -134,10 +172,10 @@
if
([
number
isEqualToString
:
@""
])
{
return
YES
;
}
if
(
self
.
discountT
extField
.
text
.
length
==
2
)
{
if
(
self
.
t
extField
.
text
.
length
==
2
)
{
return
NO
;
}
if
(
self
.
discountT
extField
.
text
.
length
==
0
&&
[
number
isEqualToString
:
@"0"
])
if
(
self
.
t
extField
.
text
.
length
==
0
&&
[
number
isEqualToString
:
@"0"
])
{
if
([
number
isEqualToString
:
@"0"
]){
return
NO
;
...
...
@@ -161,6 +199,7 @@
-
(
void
)
unifiedChangeDiscount
:
(
NSString
*
)
discount
{
WS
(
weakSelf
);
NSLog
(
@"----->%@"
,
discount
);
NSDecimalNumber
*
discountNumber
=
[
NSDecimalNumber
decimalNumberWithString
:
discount
];
NSDecimalNumber
*
number
=
[
discountNumber
decimalNumberByDividingBy
:[
NSDecimalNumber
decimalNumberWithString
:
@"100"
]];
for
(
ShopcarModel
*
model
in
self
.
shopResponseArray
)
{
...
...
Class/Tabbar/CustomTabbarController.m
View file @
e6ea7308
...
...
@@ -308,8 +308,7 @@
-
(
BOOL
)
textFieldShouldReturn
:
(
UITextField
*
)
textField
{
//搜索
if
([
BaseViewController
isBlankString
:
textField
.
text
])
{
if
(
!
[
BaseViewController
isBlankString
:
textField
.
text
])
{
[
textField
resignFirstResponder
];
//搜索
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
SEARCHSTRING
object
:
textField
.
text
];
...
...
Lighting/Info.plist
View file @
e6ea7308
...
...
@@ -13,7 +13,7 @@
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
string
>
欧立方
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
1.1.
3
<
/string
>
<
string
>
1.1.
4
<
/string
>
<
k
e
y
>
CFBundleURLTypes
<
/k
e
y
>
<
a
rr
a
y
>
<
d
i
c
t
>
...
...
Lighting/StoryboardwithCYX.storyboard
View file @
e6ea7308
...
...
@@ -2587,22 +2587,22 @@
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"12345678"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"1GL-Ec-jDh"
>
<rect
key=
"frame"
x=
"18"
y=
"57"
width=
"204"
height=
"27"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
flexibleMinY=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"
20
"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"
17
"
/>
<color
key=
"textColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
alpha=
"0.29999999999999999"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"
12362514"
textAlignment=
"natural
"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"sPE-Tw-LX3"
>
<rect
key=
"frame"
x=
"12"
y=
"1
08"
width=
"84"
height=
"21
"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
flexibleMaxX=
"YES"
flexibleMinY=
"YES"
/>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
alpha=
"0.29999999999999999"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"
2FF0-3F9D-DCC6-D1CD"
textAlignment=
"center
"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"sPE-Tw-LX3"
>
<rect
key=
"frame"
x=
"12"
y=
"1
15"
width=
"112"
height=
"17
"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMinY=
"YES"
/>
<color
key=
"backgroundColor"
white=
"0.33333333333333331"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"
14
"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"
9
"
/>
<color
key=
"textColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"¥200"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"w6a-NA-aZD"
>
<rect
key=
"frame"
x=
"168"
y=
"1
05
"
width=
"64"
height=
"27"
/>
<rect
key=
"frame"
x=
"168"
y=
"1
10
"
width=
"64"
height=
"27"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMinY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"
20
"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"
17
"
/>
<color
key=
"textColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
...
...
@@ -2743,7 +2743,7 @@
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
</imageView>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"¥100"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"qC1-H1-5oH"
>
<rect
key=
"frame"
x=
"182"
y=
"11
2
"
width=
"67"
height=
"27"
/>
<rect
key=
"frame"
x=
"182"
y=
"11
5
"
width=
"67"
height=
"27"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMinY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"20"
/>
<color
key=
"textColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
...
...
@@ -2756,14 +2756,6 @@
<color
key=
"textColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
alpha=
"0.29999999999999999"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"12362514"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"QfX-d3-D3B"
>
<rect
key=
"frame"
x=
"12"
y=
"115"
width=
"84"
height=
"21"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
flexibleMaxX=
"YES"
flexibleMinY=
"YES"
/>
<color
key=
"backgroundColor"
white=
"0.33333333333333331"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<color
key=
"textColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
alpha=
"0.75"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"京东E卡"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"miw-3m-Zfn"
>
<rect
key=
"frame"
x=
"12"
y=
"8"
width=
"60"
height=
"17"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
...
...
@@ -2772,6 +2764,14 @@
<color
key=
"textColor"
white=
"0.33333333333333331"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
alpha=
"0.29999999999999999"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"2FF0-3F9D-DCC6-D1CD"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"QfX-d3-D3B"
>
<rect
key=
"frame"
x=
"8"
y=
"122"
width=
"122"
height=
"17"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMinY=
"YES"
/>
<color
key=
"backgroundColor"
white=
"0.33333333333333331"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"10"
/>
<color
key=
"textColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
</subviews>
<color
key=
"backgroundColor"
white=
"0.0"
alpha=
"0.0"
colorSpace=
"calibratedWhite"
/>
</view>
...
...
@@ -2836,7 +2836,7 @@
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
</imageView>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"¥200"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"PlE-P1-Jeb"
>
<rect
key=
"frame"
x=
"182"
y=
"11
2
"
width=
"67"
height=
"27"
/>
<rect
key=
"frame"
x=
"182"
y=
"11
7
"
width=
"67"
height=
"27"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMinY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"20"
/>
<color
key=
"textColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
...
...
@@ -2849,14 +2849,6 @@
<color
key=
"textColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
alpha=
"0.29999999999999999"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"12362514"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"4s8-VQ-d4n"
>
<rect
key=
"frame"
x=
"12"
y=
"115"
width=
"84"
height=
"21"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
flexibleMaxX=
"YES"
flexibleMinY=
"YES"
/>
<color
key=
"backgroundColor"
white=
"0.33333333333333331"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<color
key=
"textColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
alpha=
"0.75"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"京东E卡"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"tGi-bz-BT1"
>
<rect
key=
"frame"
x=
"12"
y=
"8"
width=
"60"
height=
"17"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
...
...
@@ -2865,6 +2857,14 @@
<color
key=
"textColor"
white=
"0.33333333333333331"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
alpha=
"0.29999999999999999"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"2FF0-3F9D-DCC6-D1CD"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"4s8-VQ-d4n"
>
<rect
key=
"frame"
x=
"8"
y=
"122"
width=
"122"
height=
"17"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMinY=
"YES"
/>
<color
key=
"backgroundColor"
white=
"0.33333333333333331"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"10"
/>
<color
key=
"textColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
</subviews>
<color
key=
"backgroundColor"
white=
"0.0"
alpha=
"0.0"
colorSpace=
"calibratedWhite"
/>
</view>
...
...
Tools/BaseViewController.m
View file @
e6ea7308
...
...
@@ -75,7 +75,7 @@
#pragma mark -登陆超时回调
-
(
void
)
logintimeoutNotification
:
(
NSNotification
*
)
not
{
__weak
typeof
(
self
)
weakSelf
=
self
;
WS
(
weakSelf
)
;
UIAlertController
*
alert
=
[
UIAlertController
alertControllerWithTitle
:
@"提示"
message
:
@"登陆超时,请重新登陆"
preferredStyle
:
UIAlertControllerStyleAlert
];
[
alert
addAction
:[
UIAlertAction
actionWithTitle
:
@"我知道了"
style
:
UIAlertActionStyleDestructive
handler
:
^
(
UIAlertAction
*
_Nonnull
action
)
{
[
weakSelf
dismissViewControllerAnimated
:
YES
completion
:
nil
];
...
...
@@ -88,7 +88,7 @@
[
weakSelf
restoreRootViewController
:
loginVC
];
}]];
dispatch_async
(
dispatch_get_main_queue
(),
^
{
[
s
elf
presentViewController
:
alert
animated
:
YES
completion
:
nil
];
[
weakS
elf
presentViewController
:
alert
animated
:
YES
completion
:
nil
];
});
}
...
...
@@ -122,6 +122,7 @@
hud
.
labelText
=
Text
;
hud
.
animationType
=
MBProgressHUDAnimationZoom
;
hud
.
mode
=
MBProgressHUDModeText
;
hud
.
color
=
[[
UIColor
blackColor
]
colorWithAlphaComponent
:
0
.
6
];
hud
.
removeFromSuperViewOnHide
=
YES
;
[
hud
hide
:
YES
afterDelay
:
1
.
0
f
];
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
1
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
...
...
@@ -193,11 +194,10 @@
}
#pragma mark -渐隐提示框
-
(
void
)
SHOWPrompttext
:
(
NSString
*
)
Text
{
MBProgressHUD
*
hud
=
[
MBProgressHUD
showHUDAddedTo
:
self
.
vie
w
animated
:
YES
];
MBProgressHUD
*
hud
=
[
MBProgressHUD
showHUDAddedTo
:
SHARED_APPDELEGATE
.
windo
w
animated
:
YES
];
hud
.
labelText
=
Text
;
hud
.
margin
=
10
.
f
;
hud
.
color
=
[[
UIColor
blackColor
]
colorWithAlphaComponent
:
0
.
5
];
...
...
@@ -206,12 +206,9 @@
hud
.
mode
=
MBProgressHUDModeText
;
hud
.
removeFromSuperViewOnHide
=
YES
;
[
hud
hide
:
YES
afterDelay
:
1
.
0
f
];
}
#pragma mark -结束MJRfresh刷新
-
(
void
)
endRefreshingForTableView
:
(
UIScrollView
*
)
TableView
{
...
...
Tools/opple_objc_json_client.m
View file @
e6ea7308
...
...
@@ -1032,6 +1032,13 @@ NSString * const SORTDIRECTION_DESC = @"desc";
return
YES
;
}
+
(
JSONKeyMapper
*
)
keyMapper
{
return
[[
JSONKeyMapper
alloc
]
initWithDictionary
:@{
@"typename"
:
@"typeName"
,
}];
}
@end
...
...
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