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
a4d5bbb3
Commit
a4d5bbb3
authored
May 19, 2016
by
勾芒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
caoyunxiao
parent
ff5c95b0
Show whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
908 additions
and
251 deletions
+908
-251
AdditionalTableViewCell.h
Lighting/Class/AdditionalTableViewCell.h
+33
-0
AdditionalTableViewCell.m
Lighting/Class/AdditionalTableViewCell.m
+18
-0
AdditionalTableViewCell.xib
Lighting/Class/AdditionalTableViewCell.xib
+6
-0
ClientViewController.m
Lighting/Class/ClientViewController.m
+78
-13
ClientdetailsViewController.h
Lighting/Class/ClientdetailsViewController.h
+8
-1
ClientdetailsViewController.m
Lighting/Class/ClientdetailsViewController.m
+10
-5
CustomerOrderViewController.m
Lighting/Class/CustomerOrderViewController.m
+1
-1
LoginViewController.m
Lighting/Class/Login/LoginViewController.m
+10
-12
OrderdetailsViewController.m
Lighting/Class/OrderdetailsViewController.m
+2
-0
ProductCollectionViewCell.h
Lighting/Class/ProductCollectionViewCell.h
+10
-0
ProductCollectionViewCell.m
Lighting/Class/ProductCollectionViewCell.m
+22
-0
ProductDetailsViewController.m
Lighting/Class/ProductDetailsViewController.m
+61
-9
ProductLibraryViewController.m
Lighting/Class/ProductLibraryViewController.m
+218
-80
RightViewController.m
Lighting/Class/RightViewController.m
+12
-12
SceneLibraryViewController.m
Lighting/Class/SceneLibraryViewController.m
+58
-19
SearchViewController.m
Lighting/Class/SearchViewController.m
+3
-0
SeceneLibraryCollectionViewCell.m
Lighting/Class/SeceneLibraryCollectionViewCell.m
+1
-1
AddressViewController.xib
Lighting/Class/Shoppingcart/AddressViewController.xib
+1
-2
GenerateOrdersViewController.m
Lighting/Class/Shoppingcart/GenerateOrdersViewController.m
+17
-26
ShoppingTableViewCell.h
Lighting/Class/Shoppingcart/ShoppingTableViewCell.h
+25
-3
ShoppingTableViewCell.m
Lighting/Class/Shoppingcart/ShoppingTableViewCell.m
+14
-3
ShoppingViewController.m
Lighting/Class/Shoppingcart/ShoppingViewController.m
+66
-13
CustomTabbarController.m
Lighting/Class/Tabbar/CustomTabbarController.m
+24
-1
Toolview.m
Lighting/Class/Tabbar/Toolview.m
+9
-6
project.pbxproj
Lighting/Lighting.xcodeproj/project.pbxproj
+18
-4
AppDelegate.h
Lighting/Lighting/AppDelegate.h
+7
-0
StoryboardwithCYX.storyboard
Lighting/Lighting/StoryboardwithCYX.storyboard
+53
-35
BaseViewController.h
Lighting/Tools/BaseViewController.h
+4
-1
BaseViewController.m
Lighting/Tools/BaseViewController.m
+11
-3
PrefixHeader.pch
Lighting/Tools/PrefixHeader.pch
+5
-1
PromptinformationView.h
Lighting/Tools/PromptinformationView.h
+33
-0
PromptinformationView.m
Lighting/Tools/PromptinformationView.m
+18
-0
PromptinformationView.xib
Lighting/Tools/PromptinformationView.xib
+52
-0
weibo.png
Lighting/Tools/weibo.png
+0
-0
No files found.
Lighting/Class/AdditionalTableViewCell.h
View file @
a4d5bbb3
...
...
@@ -10,4 +10,37 @@
@interface
AdditionalTableViewCell
:
UITableViewCell
/**
* 订单数据
*/
@property
(
nonatomic
,
strong
)
TOOrderEntity
*
model
;
/**
* 是否开票
*/
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
isInvoiceLabe
;
/**
* 发票抬头
*/
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
invoiceHeader
;
/**
* 发票类型
*/
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
invoiceType
;
/**
* 支付方式
*/
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
payType
;
@end
Lighting/Class/AdditionalTableViewCell.m
View file @
a4d5bbb3
...
...
@@ -15,6 +15,24 @@
// Initialization code
}
#pragma mark -赋值
-
(
void
)
setModel
:
(
TOOrderEntity
*
)
model
{
_model
=
model
;
self
.
isInvoiceLabe
.
text
=
_model
.
isBill
;
self
.
invoiceHeader
.
text
=
_model
.
billTitle
;
self
.
invoiceType
.
text
=
_model
.
billType
;
self
.
invoiceType
.
text
=
_model
.
payType
;
}
-
(
void
)
setSelected
:
(
BOOL
)
selected
animated
:
(
BOOL
)
animated
{
[
super
setSelected
:
selected
animated
:
animated
];
...
...
Lighting/Class/AdditionalTableViewCell.xib
View file @
a4d5bbb3
...
...
@@ -75,6 +75,12 @@
</label>
</subviews>
</tableViewCellContentView>
<connections>
<outlet
property=
"invoiceHeader"
destination=
"IhE-VI-oy0"
id=
"7ib-gX-pBV"
/>
<outlet
property=
"invoiceType"
destination=
"7ty-c7-Sgn"
id=
"6gZ-Bc-NQq"
/>
<outlet
property=
"isInvoiceLabe"
destination=
"Gdg-fx-ziI"
id=
"F68-nq-sEW"
/>
<outlet
property=
"payType"
destination=
"MPi-P0-LEg"
id=
"zCn-bM-5y9"
/>
</connections>
<point
key=
"canvasLocation"
x=
"420"
y=
"242.5"
/>
</tableViewCell>
</objects>
...
...
Lighting/Class/ClientViewController.m
View file @
a4d5bbb3
...
...
@@ -18,6 +18,11 @@
*/
@property
(
nonatomic
,
strong
)
NSMutableArray
*
CustomerresultArray
;
/**
* 当前页数
*/
@property
(
nonatomic
,
assign
)
int
indexPage
;
@end
@implementation
ClientViewController
...
...
@@ -41,7 +46,7 @@
// Do any additional setup after loading the view.
[
self
uiConfigAction
];
[
self
getShoppersAssociatedCustomer
];
}
...
...
@@ -82,7 +87,7 @@
self
.
addpersonInformationButton
.
layer
.
cornerRadius
=
kCornerRadius
;
self
.
changePersonInformationButton
.
layer
.
masksToBounds
=
YES
;
self
.
changePersonInformationButton
.
layer
.
cornerRadius
=
kCornerRadius
;
self
.
indexPage
=
0
;
//隐藏更改客户按钮
self
.
changePersonInformationButton
.
hidden
=
YES
;
...
...
@@ -94,24 +99,48 @@
//监听键盘落下的通知
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
KeyboadrDismiss
)
name
:
UIKeyboardWillHideNotification
object
:
nil
];
//下拉刷新
self
.
informationTableview
.
mj_header
=
[
MJRefreshNormalHeader
headerWithRefreshingBlock
:
^
{
ConsumerQueryCondition
*
condition
=
[[
ConsumerQueryCondition
alloc
]
init
];
DataPage
*
page
=
[[
DataPage
alloc
]
init
];
page
.
page
=
0
;
condition
.
page
=
page
;
page
.
rows
=
10
;
[
self
getShoppersAssociatedCustomer
:
condition
isRemoveArray
:
YES
];
}];
[
self
.
informationTableview
.
mj_header
beginRefreshing
];
//上拉加载
self
.
informationTableview
.
mj_footer
=
[
MJRefreshAutoNormalFooter
footerWithRefreshingBlock
:
^
{
ConsumerQueryCondition
*
condition
=
[[
ConsumerQueryCondition
alloc
]
init
];
DataPage
*
page
=
[[
DataPage
alloc
]
init
];
page
.
page
=
self
.
indexPage
++
;
page
.
rows
=
10
;
condition
.
page
=
page
;
[
self
getShoppersAssociatedCustomer
:
condition
isRemoveArray
:
NO
];
}];
}
#pragma mark -获取导购关联客户
-
(
void
)
getShoppersAssociatedCustomer
-
(
void
)
getShoppersAssociatedCustomer
:
(
ConsumerQueryCondition
*
)
condition
isRemoveArray
:
(
BOOL
)
remove
{
[
self
CreateMBProgressHUDLoding
];
ConsumerQueryCondition
*
condition
=
[[
ConsumerQueryCondition
alloc
]
init
];
DataPage
*
page
=
[[
DataPage
alloc
]
init
];
page
.
page
=
0
;
condition
.
page
=
page
;
[[
NetworkRequestClassManager
Manager
]
NetworkRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/consumer/query"
]
WithRequestType
:
0
WithParameter
:
condition
WithReturnValueBlock
:^
(
id
returnValue
)
{
[
self
RemoveMBProgressHUDLoding
];
[
self
endRefreshingForTableView
:
self
.
informationTableview
];
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
if
(
remove
)
{
[
self
.
CustomerresultArray
removeAllObjects
];
}
ConsumerPageResult
*
Customerresult
=
[[
ConsumerPageResult
alloc
]
initWithDictionary
:
returnValue
[
@"data"
]
error
:
nil
];
for
(
TOConsumerEntity
*
objc
in
Customerresult
.
results
)
{
...
...
@@ -132,7 +161,15 @@
[
self
.
CustomerresultArray
addObject
:
myclientModel
];
}
//刷新后添加选中状态
for
(
int
i
=
0
;
i
<
self
.
CustomerresultArray
.
count
;
i
++
)
{
MyclientEntityModel
*
myclientModel
=
[
self
.
CustomerresultArray
objectAtIndex_opple
:
i
];
if
([[
Customermanager
manager
].
customerID
isEqualToString
:
myclientModel
.
fid
])
{
InformationTableViewCell
*
cell
=
[
self
.
informationTableview
cellForRowAtIndexPath
:[
NSIndexPath
indexPathForRow
:
i
inSection
:
0
]];
myclientModel
.
selectedState
=
YES
;
cell
.
setCurrentCustomer
.
selected
=
YES
;
}
}
[
self
.
informationTableview
reloadData
];
}
else
...
...
@@ -146,6 +183,7 @@
}
WithFailureBlock
:^
(
id
error
)
{
[
self
RemoveMBProgressHUDLoding
];
[
self
endRefreshingForTableView
:
self
.
informationTableview
];
}];
}
...
...
@@ -158,7 +196,6 @@
cell
.
model
=
[
self
.
CustomerresultArray
objectAtIndex_opple
:
indexPath
.
row
];
//清空其他选中状态
[
cell
setBlockSeletced
:
^
(
NSInteger
index
)
{
[
self
SetCustomerButtonClick
:
index
];
}];
return
cell
;
...
...
@@ -180,13 +217,17 @@
UIStoryboard
*
storyboard
=
[
UIStoryboard
storyboardWithName
:
@"StoryboardwithCYX"
bundle
:
nil
];
ClientdetailsViewController
*
clientdetails
=
[
storyboard
instantiateViewControllerWithIdentifier
:
@"clientdetails"
];
clientdetails
.
model
=
[
self
.
CustomerresultArray
objectAtIndex_opple
:
indexPath
.
row
];
clientdetails
.
cellindex
=
indexPath
.
row
;
//设置当前客户
[
clientdetails
setCurrentUserBlock
:
^
(
NSInteger
index
)
{
InformationTableViewCell
*
cell
=
[
self
.
informationTableview
cellForRowAtIndexPath
:[
NSIndexPath
indexPathForRow
:
index
inSection
:
0
]];
cell
.
setCurrentCustomer
.
selected
=
YES
;
[
self
SetCustomerButtonClick
:
index
];
}];
[
self
.
navigationController
pushViewController
:
clientdetails
animated
:
YES
];
}
#pragma mark -设置为当前客户回调
-
(
void
)
SetCustomerButtonClick
:
(
NSInteger
)
index
;
{
...
...
@@ -214,10 +255,30 @@
[
Customermanager
manager
].
cutomerAddress
=
model
.
address
;
[
self
.
addpersonInformationButton
setTitle
:
@"退出当前客户"
forState
:
UIControlStateNormal
];
self
.
changePersonInformationButton
.
hidden
=
NO
;
[
self
SetupUserRequest
];
}
#pragma mark -设置为当前用户请求、写入访问时间
-
(
void
)
SetupUserRequest
{
[[
NetworkRequestClassManager
Manager
]
NetworkWithDictionaryRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@%@"
,
ServerAddress
,
@"/consumer/saveLastVisitedTime?consumerId="
,[
Customermanager
manager
].
customerID
]
WithRequestType
:
1
WithParameter
:
nil
WithReturnValueBlock
:^
(
id
returnValue
)
{
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
NSLog
(
@"写入客户访问时间成功"
);
}
}
WithErrorCodeBlock
:^
(
id
errorCodeValue
)
{
}
WithFailureBlock
:^
(
id
error
)
{
NSLog
(
@"写入客户访问时间失败"
);
}];
}
#pragma mark -添加客户信息、或者退出当前客户
-
(
IBAction
)
addCustomerInformationORExit
:
(
UIButton
*
)
sender
{
...
...
@@ -387,7 +448,11 @@
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
ConsumerPageResult
*
result
=
[[
ConsumerPageResult
alloc
]
initWithDictionary
:
returnValue
error
:
nil
];
NSLog
(
@"%@"
,
result
);
[
self
.
CustomerresultArray
removeAllObjects
];
for
(
TOConsumerEntity
*
model
in
result
.
results
)
{
[
self
.
CustomerresultArray
addObject
:
model
];
}
[
self
.
informationTableview
reloadData
];
}
else
{
...
...
Lighting/Class/ClientdetailsViewController.h
View file @
a4d5bbb3
...
...
@@ -65,9 +65,16 @@
/**
* 设置当前客户
*/
@property
(
nonatomic
,
copy
)
void
(
^
CurrentUserBlock
)(
NSInteger
cellindex
);
/**
* 传入当前cell下标
*/
@property
(
nonatomic
,
assign
)
NSInteger
cellindex
;
...
...
Lighting/Class/ClientdetailsViewController.m
View file @
a4d5bbb3
...
...
@@ -166,6 +166,8 @@
UIStoryboard
*
storyboard
=
[
UIStoryboard
storyboardWithName
:
@"StoryboardwithCYX"
bundle
:
nil
];
OrderdetailsViewController
*
orderdetails
=
[
storyboard
instantiateViewControllerWithIdentifier
:
@"orderdetails"
];
orderdetails
.
orderCode
=
[[[
self
.
orderRecordArray
objectAtIndex_opple
:
indexPath
.
row
]
order
]
orderNumber
];
orderdetails
.
sectionTitle
=
@[
@"订单信息"
,
@"客户信息"
,
@"收货信息"
,
@"商品信息"
,
@"附件信息"
];
orderdetails
.
isShowattachment
=
YES
;
[
self
.
navigationController
pushViewController
:
orderdetails
animated
:
YES
];
}
}
...
...
@@ -183,10 +185,12 @@
[
self
CreateMBProgressHUDLoding
];
[[
NetworkRequestClassManager
Manager
]
NetworkRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/shopcart/query"
]
WithRequestType
:
0
WithParameter
:
shopcarNumber
WithReturnValueBlock
:^
(
id
returnValue
)
{
[
self
RemoveMBProgressHUDLoding
];
//
[self RemoveMBProgressHUDLoding];
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
ShopCartResponse
*
shopcar
=
[[
ShopCartResponse
alloc
]
initWithDictionary
:
returnValue
[
@"data"
]
error
:
nil
];
if
(
shopcar
.
shopcart
.
count
==
0
)
{
[
self
PromptinformationViewWithimage
:
TCImage
(
@"ablum-副本"
)
withTitle
:
@"暂无购物袋信息~"
withFrame
:
CGRectMake
(
200
,
200
,
250
,
170
)];
}
//自定义属性
for
(
TOShopcartEntity
*
objc
in
shopcar
.
shopcart
)
{
...
...
@@ -216,7 +220,7 @@
}
WithFailureBlock
:^
(
id
error
)
{
[
self
RemoveMBProgressHUDLoding
];
//
[self RemoveMBProgressHUDLoding];
}];
}
...
...
@@ -236,7 +240,6 @@
Neworder
.
guideId
=
[
Shoppersmanager
manager
].
Shoppers
.
employee
.
fid
;
allOrder
.
datapage
=
page
;
allOrder
.
order
=
Neworder
;
[
self
CreateMBProgressHUDLoding
];
[[
NetworkRequestClassManager
Manager
]
NetworkRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/order/query"
]
WithRequestType
:
0
WithParameter
:
allOrder
WithReturnValueBlock
:^
(
id
returnValue
)
{
[
self
RemoveMBProgressHUDLoding
];
...
...
@@ -272,7 +275,9 @@
#pragma mark -设为当前的客户
-
(
IBAction
)
SetupcurrentUserButtonClick
:
(
UIButton
*
)
sender
{
if
(
self
.
CurrentUserBlock
)
{
self
.
CurrentUserBlock
(
_cellindex
);
}
}
...
...
Lighting/Class/CustomerOrderViewController.m
View file @
a4d5bbb3
...
...
@@ -85,7 +85,7 @@
OrderBill
*
allOrder
=
[[
OrderBill
alloc
]
init
];
//分页
DataPage
*
page
=
[[
DataPage
alloc
]
init
];
page
.
page
=
self
.
indexPage
;
page
.
page
=
0
;
page
.
rows
=
10
;
//订单
TOOrderEntity
*
Neworder
=
[[
TOOrderEntity
alloc
]
init
];
...
...
Lighting/Class/Login/LoginViewController.m
View file @
a4d5bbb3
...
...
@@ -87,7 +87,6 @@
// [self SetTheRootViewController];
// return;
if
(
self
.
userName
.
text
.
length
==
0
)
{
[
self
ErrorMBProgressView
:
@"用户名不能为空"
];
...
...
@@ -98,7 +97,6 @@
[
self
ErrorMBProgressView
:
@"密码不能为空"
];
return
;
}
[
self
judgeUserNameAndPassword
];
}
...
...
@@ -107,7 +105,8 @@
{
RightViewController
*
rightVC
=
[[
RightViewController
alloc
]
init
];
rightVC
.
delegate
=
self
;
self
.
drawerController
=
[[
MMDrawerController
alloc
]
initWithCenterViewController
:
self
.
customtabbar
rightDrawerViewController
:
rightVC
];
UINavigationController
*
rightNav
=
[[
UINavigationController
alloc
]
initWithRootViewController
:
rightVC
];
self
.
drawerController
=
[[
MMDrawerController
alloc
]
initWithCenterViewController
:
self
.
customtabbar
rightDrawerViewController
:
rightNav
];
[
self
.
drawerController
setMaximumRightDrawerWidth
:
RightWidth
];
[
self
.
drawerController
setOpenDrawerGestureModeMask
:
MMOpenDrawerGestureModeAll
];
[
self
.
drawerController
setCloseDrawerGestureModeMask
:
MMCloseDrawerGestureModeAll
];
...
...
@@ -163,7 +162,6 @@
NSInteger
selectedIndex
;
if
([
Name
isEqualToString
:
@"体验中心"
])
{
[
SHARED_APPDELEGATE
.
window
.
rootViewController
.
view
addSubview
:
self
.
followHeartView
.
view
];
// selectedIndex = 6;
}
else
if
([
Name
isEqualToString
:
@"场景库"
])
{
...
...
Lighting/Class/OrderdetailsViewController.m
View file @
a4d5bbb3
...
...
@@ -208,6 +208,7 @@
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
NSLog
(
@"%ld"
,
indexPath
.
section
);
switch
(
indexPath
.
section
)
{
case
0
:
//订单信息
{
...
...
@@ -254,6 +255,7 @@
if
(
_isShowattachment
)
{
AdditionalTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
@"fifthcell"
forIndexPath
:
indexPath
];
cell
.
model
=
self
.
orderDetails
.
order
;
return
cell
;
}
}
...
...
Lighting/Class/ProductCollectionViewCell.h
View file @
a4d5bbb3
...
...
@@ -32,4 +32,14 @@
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
addShoppingbags
;
/**
* 点击加入购物车回调 ,返回当前按钮的CGPoint、及当前下标
*/
@property
(
nonatomic
,
copy
)
void
(
^
ReturnCellCgpoint
)(
CGPoint
point
,
NSInteger
cellindex
);
/**
* 传入cell下标
*/
@property
(
nonatomic
,
assign
)
NSInteger
cellindex
;
@end
Lighting/Class/ProductCollectionViewCell.m
View file @
a4d5bbb3
...
...
@@ -10,4 +10,26 @@
@implementation
ProductCollectionViewCell
/**
* 加入购物车点击
*/
-
(
IBAction
)
AddShoppingcarButtonClick
:(
UIButton
*
)
sender
{
CGPoint
carButtonCenter
=
sender
.
center
;
//把button在cell坐标转化为在tableView上的坐标
CGPoint
point
=
[
self
convertPoint
:
carButtonCenter
toView
:
self
.
superview
.
window
];
//回调
if
(
_ReturnCellCgpoint
)
{
_ReturnCellCgpoint
(
point
,
_cellindex
);
}
}
@end
Lighting/Class/ProductDetailsViewController.m
View file @
a4d5bbb3
...
...
@@ -85,7 +85,7 @@
self
.
productDetilsTableview
.
tableHeaderView
=
self
.
headerView
;
//添加至购物车
[
self
.
headerView
.
addGoodsShoppingbagsButton
addTarget
:
self
action
:
@selector
(
addGoodsShoppingbags
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
headerView
.
addGoodsShoppingbagsButton
addTarget
:
self
action
:
@selector
(
addGoodsShoppingbags
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
}
...
...
@@ -159,7 +159,7 @@
return
;
}
goodsNumber
--
;
self
.
headerView
.
goodsNumber
.
text
=
[
NSString
stringWithFormat
:
@"%
d"
,
goodsNumber
];
self
.
headerView
.
goodsNumber
.
text
=
[
NSString
stringWithFormat
:
@"%
ld"
,(
long
)
goodsNumber
];
}
break
;
...
...
@@ -172,7 +172,7 @@
return
;
}
goodsNumber
++
;
self
.
headerView
.
goodsNumber
.
text
=
[
NSString
stringWithFormat
:
@"%
d"
,
goodsNumber
];
self
.
headerView
.
goodsNumber
.
text
=
[
NSString
stringWithFormat
:
@"%
ld"
,(
long
)
goodsNumber
];
}
break
;
...
...
@@ -201,7 +201,7 @@
if
([
inputString
integerValue
]
>
[
self
.
entity
.
number
integerValue
])
{
[
self
ErrorMBProgressView
:
@"超过库存数量"
];
textField
.
text
=
[
NSString
stringWithFormat
:
@"%
d"
,
[
self
.
entity
.
number
integerValue
]];
textField
.
text
=
[
NSString
stringWithFormat
:
@"%
ld"
,(
long
)
[
self
.
entity
.
number
integerValue
]];
return
;
}
}
...
...
@@ -227,8 +227,60 @@
//@synthesize goodsTotalPrice;
//@synthesize consumerId;
#pragma mark -开发加入购物车动画
-
(
void
)
StartAddShoppingCarAnimationWithimage
:
(
UIImage
*
)
image
withStartpoint
:
(
CGPoint
)
point
{
//起点
CGPoint
startPoint
=
point
;
//终点
CGPoint
endPoint
=
SHARED_APPDELEGATE
.
shoppingCarPoint
;
//控点
CGPoint
controlPoint
=
CGPointMake
(
endPoint
.
x
,
startPoint
.
x
);
UIImageView
*
imageView
=
[[
UIImageView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
40
,
40
)];
imageView
.
layer
.
position
=
point
;
imageView
.
tag
=
100
;
imageView
.
image
=
image
;
[
self
.
view
.
layer
addSublayer
:
imageView
.
layer
];
//创建关键帧
CAKeyframeAnimation
*
animation
=
[
CAKeyframeAnimation
animationWithKeyPath
:
@"position"
];
animation
.
delegate
=
self
;
//动画时间
animation
.
duration
=
1
;
//当动画完成,停留到结束位置
animation
.
removedOnCompletion
=
NO
;
animation
.
fillMode
=
kCAFillModeForwards
;
//当方法名字遇到create,new,copy,retain,都需要管理内存
CGMutablePathRef
path
=
CGPathCreateMutable
();
//设置起点
CGPathMoveToPoint
(
path
,
NULL
,
startPoint
.
x
,
startPoint
.
y
);
CGPathAddQuadCurveToPoint
(
path
,
NULL
,
controlPoint
.
x
,
controlPoint
.
y
,
endPoint
.
x
,
endPoint
.
y
);
//设置动画路径
animation
.
path
=
path
;
//执行动画
[
imageView
.
layer
addAnimation
:
animation
forKey
:
nil
];
//释放路径
CGPathRelease
(
path
);
}
#pragma mark -完成加入购物车动画完成后回调
-
(
void
)
animationDidStop
:
(
CAAnimation
*
)
anim
finished
:
(
BOOL
)
flag
{
NSLog
(
@"动画完成了"
);
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
REFRESHSHOPPINGCAR
object
:
@
([
self
.
headerView
.
goodsNumber
.
text
intValue
])];
}
#pragma mark -添加至购物车
-
(
void
)
addGoodsShoppingbags
-
(
void
)
addGoodsShoppingbags
:
(
UIButton
*
)
button
{
//判断是否有当前客户
if
(
!
[
Shoppersmanager
manager
].
currentCustomer
)
{
...
...
@@ -236,19 +288,18 @@
[
self
ErrorMBProgressView
:
@"必须设置当前客户"
];
return
;
}
[
self
CreateMBProgressHUDLoding
];
[
self
StartAddShoppingCarAnimationWithimage
:
TCImage
(
@"欧"
)
withStartpoint
:[
self
.
view
convertPoint
:[
button
center
]
toView
:
self
.
view
.
window
]
];
SaveShoppingCartRequest
*
shopCar
=
[[
SaveShoppingCartRequest
alloc
]
init
];
shopCar
.
consumerId
=
[[
Customermanager
manager
]
customerID
];
shopCar
.
goodsId
=
_goodsID
;
shopCar
.
count
=
[
self
.
headerView
.
goodsNumber
.
text
intValue
];
[[
NetworkRequestClassManager
Manager
]
NetworkRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/shopcart/save"
]
WithRequestType
:
0
WithParameter
:
shopCar
WithReturnValueBlock
:^
(
id
returnValue
)
{
[
self
RemoveMBProgressHUDLoding
];
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
[
self
SuccessMBProgressView
:
@"加入购物车成功"
];
//刷新购物车
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
@"GOODSNUMBER"
object
:
returnValue
[
@"data"
]];
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
REFRESHSHOPPINGCAR
object
:
returnValue
[
@"data"
]];
}
else
{
...
...
@@ -260,7 +311,8 @@
}
WithFailureBlock
:^
(
id
error
)
{
[
self
RemoveMBProgressHUDLoding
];
[
self
ErrorMBProgressView
:
@"添加购物车失败"
];
}];
}
...
...
Lighting/Class/ProductLibraryViewController.m
View file @
a4d5bbb3
...
...
@@ -45,13 +45,27 @@
/**
* 商品数据源对象
*/
@property
(
nonatomic
,
strong
)
GoodsResponse
*
datasArray
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
datasArray
;
/**
* 复选返回时临时保存数据
*/
@property
(
nonatomic
,
strong
)
GoodsResponse
*
temporaryArray
;
/**
* 当前页数
*/
@property
(
nonatomic
,
assign
)
int
indexPage
;
/**
* 搜索结果个数
*/
@property
(
nonatomic
,
assign
)
int
resultCount
;
@end
@implementation
ProductLibraryViewController
...
...
@@ -71,60 +85,42 @@
-
(
void
)
viewWillAppear
:
(
BOOL
)
animated
{
if
(
_screeningDatas
!=
nil
)
{
// if (_screeningDatas != nil) {
//
// [self getGoodsListDatas];
// }
}
[
self
getGoodsListDatas
];
/**
* 初始化商品数据源数组
*/
-
(
NSMutableArray
*
)
datasArray
{
if
(
_datasArray
==
nil
)
{
_datasArray
=
[
NSMutableArray
array
];
}
return
_datasArray
;
}
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
// Do any additional setup after loading the view.
self
.
view
.
backgroundColor
=
[
UIColor
blueColor
];
[
self
uiConfigAction
];
[
self
getGoodsListDatas
];
[
self
getScreeningdatas
];
}
#pragma mark -热门搜索
-
(
void
)
setSelectedCode
:
(
NSString
*
)
selectedCode
{
_selectedCode
=
selectedCode
;
//默认数据
GoodsCondition
*
conditon
=
[[
GoodsCondition
alloc
]
init
];
//分页数据
DataPage
*
Newpage
=
[[
DataPage
alloc
]
init
];
Newpage
.
page
=
0
;
conditon
.
page
=
Newpage
;
conditon
.
categoryEquals
=
_selectedCode
;
__weak
typeof
(
self
)
weakSelf
=
self
;
[
self
getGoodsListdatas
:
conditon
returnResponse
:
^
(
GoodsResponse
*
response
)
{
if
(
response
.
goodsEntity
.
count
==
0
)
{
[
self
ErrorMBProgressView
:
@"暂无数据"
];
}
else
{
weakSelf
.
datasArray
=
response
;
[
weakSelf
.
productCollectionView
reloadData
];
}
}];
}
#pragma mark -获取商品列表数据
-
(
void
)
getGoodsListDatas
-
(
void
)
getGoodsListDatas
isRemove
:
(
BOOL
)
remove
Withobject
:
(
GoodsCondition
*
)
conditon
{
//默认数据
GoodsCondition
*
conditon
=
[[
GoodsCondition
alloc
]
init
];
//分页数据
DataPage
*
Newpage
=
[[
DataPage
alloc
]
init
];
Newpage
.
page
=
0
;
conditon
.
page
=
Newpage
;
__weak
typeof
(
self
)
weakSelf
=
self
;
[
self
getGoodsListdatas
:
conditon
returnResponse
:
^
(
GoodsResponse
*
response
)
{
...
...
@@ -134,20 +130,28 @@
}
else
{
weakSelf
.
datasArray
=
response
;
if
(
remove
)
{
[
self
.
datasArray
removeAllObjects
];
}
for
(
TOGoodsEntity
*
model
in
response
.
goodsEntity
)
{
[
weakSelf
.
datasArray
addObject
:
model
];
}
[
weakSelf
.
productCollectionView
reloadData
];
}
}];
}
#pragma mark -获取产品筛选数据
-
(
void
)
getScreeningdatas
-
(
void
)
getScreeningdatas
isRemoveArray
:
(
BOOL
)
remove
{
[[
NetworkRequestClassManager
Manager
]
NetworkWithDictionaryRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/goods/getGoodsFilter"
]
WithRequestType
:
1
WithParameter
:
nil
WithReturnValueBlock
:^
(
id
returnValue
)
{
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
if
(
remove
)
{
[
self
.
screeningDatas
removeAllObjects
];
}
GoodsFilter
*
goodsStyle
=
[[
GoodsFilter
alloc
]
initWithDictionary
:
returnValue
[
@"data"
]
error
:
nil
];
[
self
.
screeningDatas
addObject
:
goodsStyle
.
styles
];
[
self
.
screeningDatas
addObject
:
goodsStyle
.
categories
];
...
...
@@ -177,6 +181,7 @@
[
self
CreateMBProgressHUDLoding
];
[[
NetworkRequestClassManager
Manager
]
NetworkRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/goods/query"
]
WithRequestType
:
0
WithParameter
:
conditon
WithReturnValueBlock
:^
(
id
returnValue
)
{
[
self
endRefreshingForTableView
:
self
.
productCollectionView
];
[
self
RemoveMBProgressHUDLoding
];
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
...
...
@@ -193,6 +198,7 @@
}
WithFailureBlock
:^
(
id
error
)
{
[
self
endRefreshingForTableView
:
self
.
productCollectionView
];
[
self
RemoveMBProgressHUDLoding
];
}];
}
...
...
@@ -201,7 +207,7 @@
#pragma mark -布局
-
(
void
)
uiConfigAction
{
self
.
indexPage
=
0
;
self
.
productCollectionLayout
.
itemSize
=
CGSizeMake
((
ScreenWidth
-
100
)
/
3
,
(
ScreenWidth
-
100
)
/
3
);
self
.
productCollectionLayout
.
sectionInset
=
UIEdgeInsetsMake
(
20
,
30
,
20
,
30
);
self
.
productCollectionLayout
.
minimumLineSpacing
=
20
;
...
...
@@ -212,47 +218,84 @@
[
self
CreatescreeningButton
];
//搜索关键字
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
searchInputString
:
)
name
:
SEARCHSTRING
object
:
nil
];
//
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(searchInputString:) name:SEARCHSTRING object:nil];
//返回根视图
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
popTorootviewController
:
)
name
:
POPROOTCONTROLLER
object
:
nil
];
//
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(popTorootviewController:) name:POPROOTCONTROLLER object:nil];
}
#pragma mark -返回根视图
-
(
void
)
popTorootviewController
:
(
NSNotification
*
)
not
{
[
self
.
navigationController
popToViewController
:[
self
.
navigationController
.
viewControllers
firstObject
]
animated
:
NO
];
}
//下拉刷新
self
.
productCollectionView
.
mj_header
=
[
MJRefreshNormalHeader
headerWithRefreshingBlock
:
^
{
//默认数据
GoodsCondition
*
conditon
=
[[
GoodsCondition
alloc
]
init
];
//分页数据
DataPage
*
Newpage
=
[[
DataPage
alloc
]
init
];
Newpage
.
page
=
self
.
indexPage
;
Newpage
.
rows
=
10
;
conditon
.
page
=
Newpage
;
//搜索
if
(
_selectedCode
)
{
conditon
.
categoryEquals
=
_selectedCode
;
conditon
.
nameLike
=
_selectedCode
;
}
[
self
getScreeningdatasisRemoveArray
:
YES
];
[
self
getGoodsListDatasisRemove
:
YES
Withobject
:
conditon
];
}];
[
self
.
productCollectionView
.
mj_header
beginRefreshing
];
//上拉加载
self
.
productCollectionView
.
mj_footer
=
[
MJRefreshAutoNormalFooter
footerWithRefreshingBlock
:
^
{
#pragma mark -搜索关键字
-
(
void
)
searchInputString
:
(
NSNotification
*
)
not
{
//默认数据
GoodsCondition
*
conditon
=
[[
GoodsCondition
alloc
]
init
];
//分页数据
DataPage
*
Newpage
=
[[
DataPage
alloc
]
init
];
Newpage
.
page
=
0
;
Newpage
.
page
=
self
.
indexPage
++
;
Newpage
.
rows
=
10
;
conditon
.
page
=
Newpage
;
conditon
.
nameLike
=
not
.
object
;
//搜索
if
(
_selectedCode
)
{
conditon
.
categoryEquals
=
_selectedCode
;
conditon
.
nameLike
=
_selectedCode
;
}
[
self
getGoodsListDatasisRemove
:
NO
Withobject
:
conditon
];
}];
}
__weak
typeof
(
self
)
weakSelf
=
self
;
[
self
getGoodsListdatas
:
conditon
returnResponse
:
^
(
GoodsResponse
*
response
)
{
#pragma mark -返回根视图
-
(
void
)
popTorootviewController
:
(
NSNotification
*
)
not
{
if
(
response
.
goodsEntity
.
count
==
0
)
{
[
self
.
navigationController
popToViewController
:[
self
.
navigationController
.
viewControllers
firstObject
]
animated
:
NO
];
[
self
ErrorMBProgressView
:
@"暂无数据"
];
return
;
}
weakSelf
.
datasArray
=
response
;
[
weakSelf
.
productCollectionView
reloadData
];
}];
}
//#pragma mark -搜索关键字
//- (void)searchInputString:(NSNotification *)not
//{
// //默认数据
// GoodsCondition *conditon = [[GoodsCondition alloc]init];
// //分页数据
// DataPage *Newpage = [[DataPage alloc]init];
// Newpage.page = 0;
// conditon.page = Newpage;
// conditon.nameLike = not.object;
//
// __weak typeof(self)weakSelf = self;
// [self getGoodsListdatas:conditon returnResponse:^(GoodsResponse *response) {
//
// if (response.goodsEntity.count == 0) {
//
// [self ErrorMBProgressView:@"暂无数据"];
// return ;
// }
// weakSelf.datasArray = [NSMutableArray arrayWithArray:response.goodsEntity];
// [weakSelf.productCollectionView reloadData];
// }];
//}
#pragma mark -筛选按钮
-
(
void
)
CreatescreeningButton
{
...
...
@@ -285,16 +328,88 @@
-
(
UICollectionViewCell
*
)
collectionView
:
(
UICollectionView
*
)
collectionView
cellForItemAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
ProductCollectionViewCell
*
cell
=
[
collectionView
dequeueReusableCellWithReuseIdentifier
:
@"productcell"
forIndexPath
:
indexPath
];
NSURL
*
url
=
[
NSURL
URLWithString
:[
NSString
stringWithFormat
:
@"%@/%@"
,
ServerAddress
,[[
self
.
datasArray
.
goodsEntity
objectAtIndex_opple
:
indexPath
.
row
]
pictures
]]];
[
cell
.
productImageView
sd_setImageWithURL
:
url
placeholderImage
:
REPLACEIMAGE
];
[
cell
.
productImageView
sd_setImageWithURL
:[
NSURL
URLWithString
:[[
self
.
datasArray
objectAtIndex_opple
:
indexPath
.
row
]
pictures
]]
placeholderImage
:
REPLACEIMAGE
];
cell
.
cellindex
=
indexPath
.
item
;
//加入购物车
__weak
typeof
(
self
)
weakSelf
=
self
;
[
cell
setReturnCellCgpoint
:
^
void
(
CGPoint
centerPoint
,
NSInteger
cellindex
)
{
//判断是否有当前客户
if
(
!
[
Shoppersmanager
manager
].
currentCustomer
)
{
[
self
ErrorMBProgressView
:
@"必须设置当前客户"
];
return
;
}
TOGoodsEntity
*
model
=
[
self
.
datasArray
objectAtIndex_opple
:
cellindex
];
[
self
addGoodsShoppingbags
:
model
complate
:
^
{
NSLog
(
@"加入购物车完成"
);
}];
[
weakSelf
StartAddShoppingCarAnimationWithimage
:
TCImage
(
@"欧"
)
withStartpoint
:
centerPoint
];
}];
return
cell
;
}
#pragma mark -开发加入购物车动画
-
(
void
)
StartAddShoppingCarAnimationWithimage
:
(
UIImage
*
)
image
withStartpoint
:
(
CGPoint
)
point
{
//起点
CGPoint
startPoint
=
point
;
//终点
CGPoint
endPoint
=
SHARED_APPDELEGATE
.
shoppingCarPoint
;
//控点
CGPoint
controlPoint
=
CGPointMake
(
endPoint
.
x
,
startPoint
.
x
);
UIImageView
*
imageView
=
[[
UIImageView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
40
,
40
)];
imageView
.
layer
.
position
=
point
;
imageView
.
tag
=
100
;
imageView
.
image
=
image
;
[
self
.
view
.
layer
addSublayer
:
imageView
.
layer
];
//创建关键帧
CAKeyframeAnimation
*
animation
=
[
CAKeyframeAnimation
animationWithKeyPath
:
@"position"
];
animation
.
delegate
=
self
;
//动画时间
animation
.
duration
=
1
;
//当动画完成,停留到结束位置
animation
.
removedOnCompletion
=
NO
;
animation
.
fillMode
=
kCAFillModeForwards
;
//当方法名字遇到create,new,copy,retain,都需要管理内存
CGMutablePathRef
path
=
CGPathCreateMutable
();
//设置起点
CGPathMoveToPoint
(
path
,
NULL
,
startPoint
.
x
,
startPoint
.
y
);
CGPathAddQuadCurveToPoint
(
path
,
NULL
,
controlPoint
.
x
,
controlPoint
.
y
,
endPoint
.
x
,
endPoint
.
y
);
//设置动画路径
animation
.
path
=
path
;
//执行动画
[
imageView
.
layer
addAnimation
:
animation
forKey
:
nil
];
//释放路径
CGPathRelease
(
path
);
}
#pragma mark -完成加入购物车动画完成后回调
-
(
void
)
animationDidStop
:
(
CAAnimation
*
)
anim
finished
:
(
BOOL
)
flag
{
NSLog
(
@"动画完成了"
);
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
REFRESHSHOPPINGCAR
object
:
@
(
1
)];
}
-
(
NSInteger
)
collectionView
:
(
UICollectionView
*
)
collectionView
numberOfItemsInSection
:
(
NSInteger
)
section
{
return
self
.
datasArray
.
goodsEntity
.
count
;
return
20
;
}
-
(
void
)
collectionView
:
(
UICollectionView
*
)
collectionView
didSelectItemAtIndexPath
:
(
NSIndexPath
*
)
indexPath
...
...
@@ -302,7 +417,7 @@
UIStoryboard
*
storyboard
=
[
UIStoryboard
storyboardWithName
:
@"StoryboardwithCYX"
bundle
:
nil
];
ProductDetailsViewController
*
productDetails
=
[
storyboard
instantiateViewControllerWithIdentifier
:
@"productdetails"
];
productDetails
.
goodsID
=
[[
self
.
datasArray
.
goodsEntity
objectAtIndex_opple
:
indexPath
.
item
]
fid
];
productDetails
.
goodsID
=
[[
self
.
datasArray
objectAtIndex_opple
:
indexPath
.
item
]
fid
];
[
self
.
navigationController
pushViewController
:
productDetails
animated
:
YES
];
}
...
...
@@ -380,7 +495,7 @@
self
.
screenSecondView
.
frame
=
CGRectMake
(
0
,
50
,
470
,
310
);
self
.
screenSecondView
.
delegate
=
self
;
[
self
screeningButtonClick
:
self
.
selectedIndex
];
self
.
screenSecondView
.
totalNumber
=
self
.
datasArray
.
total
;
self
.
screenSecondView
.
totalNumber
=
self
.
datasArray
.
count
;
[
self
.
screenView
.
backgroundView
addSubview
:
self
.
screenSecondView
];
}
...
...
@@ -417,8 +532,7 @@
__weak
typeof
(
self
)
Weakself
=
self
;
[
self
getGoodsListdatas
:
condition
returnResponse
:
^
(
GoodsResponse
*
response
)
{
Weakself
.
datasArray
=
response
;
Weakself
.
datasArray
=
[
NSMutableArray
arrayWithArray
:
response
.
goodsEntity
];
[
Weakself
.
productCollectionView
reloadData
];
if
(
response
.
goodsEntity
.
count
==
0
)
{
...
...
@@ -464,7 +578,6 @@
if
(
materialCode
.
length
!=
0
)
{
condition
.
materialEqueals
=
materialCode
;
}
if
(
!
[
priceTitle
isEqualToString
:
@"全部"
])
{
//价格字符串切割
...
...
@@ -472,9 +585,7 @@
condition
.
startprice
=
[
NSNumber
numberWithInteger
:[[
spacrArray
objectAtIndex_opple
:
0
]
integerValue
]];
condition
.
endprice
=
[
NSNumber
numberWithInteger
:[[
spacrArray
objectAtIndex_opple
:
1
]
integerValue
]];
}
__weak
typeof
(
self
)
Weakself
=
self
;
NSLog
(
@"%@"
,[
condition
toDictionary
]);
[
self
getGoodsListdatas
:
condition
returnResponse
:
^
(
GoodsResponse
*
response
)
{
Weakself
.
screenSecondView
.
totalNumber
=
response
.
total
;
...
...
@@ -492,7 +603,7 @@
[
self
ErrorMBProgressView
:
@"暂无数据"
];
return
;
}
self
.
datasArray
=
self
.
temporaryArray
;
self
.
datasArray
=
[
NSMutableArray
arrayWithArray
:
self
.
temporaryArray
.
goodsEntity
]
;
[
self
.
productCollectionView
reloadData
];
[
self
DismissScreenView
];
}
...
...
@@ -532,6 +643,33 @@
//}
#pragma mark -添加至购物车
-
(
void
)
addGoodsShoppingbags
:
(
TOGoodsEntity
*
)
model
complate
:
(
void
(
^
)())
response
{
SaveShoppingCartRequest
*
shopCar
=
[[
SaveShoppingCartRequest
alloc
]
init
];
shopCar
.
consumerId
=
[[
Customermanager
manager
]
customerID
];
shopCar
.
goodsId
=
model
.
fid
;
shopCar
.
count
=
1
;
[[
NetworkRequestClassManager
Manager
]
NetworkRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/shopcart/save"
]
WithRequestType
:
0
WithParameter
:
shopCar
WithReturnValueBlock
:^
(
id
returnValue
)
{
[
self
RemoveMBProgressHUDLoding
];
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
response
();
}
else
{
[
self
ErrorMBProgressView
:
returnValue
[
@"message"
]];
}
}
WithErrorCodeBlock
:^
(
id
errorCodeValue
)
{
}
WithFailureBlock
:^
(
id
error
)
{
[
self
ErrorMBProgressView
:
@"加入购物车失败"
];
}];
}
...
...
Lighting/Class/RightViewController.m
View file @
a4d5bbb3
...
...
@@ -66,7 +66,7 @@
#pragma mark -布局
-
(
void
)
uiConfigAction
{
self
.
rightTableview
=
[[
UITableView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
RightWidth
,
ScreenHeight
)
style
:
UITableViewStylePlain
];
self
.
rightTableview
=
[[
UITableView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
100
,
RightWidth
,
ScreenHeight
-
100
)
style
:
UITableViewStylePlain
];
self
.
rightTableview
.
delegate
=
self
;
self
.
rightTableview
.
dataSource
=
self
;
[
self
.
view
addSubview
:
self
.
rightTableview
];
...
...
@@ -80,19 +80,22 @@
-
(
void
)
createHeaderview
{
UIView
*
headerView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
RightWidth
,
NavigationHeight
)];
//UIImageView *imageView = [[UIImageView alloc]initWithFrame:CGRectMake(10, 13, 115, 35)];
//imageView.center = CGPointMake(RightWidth/2, 100);
//imageView.image = TCImage(@"欧");
//[headerView addSubview:imageView];
headerView
.
backgroundColor
=
[
UIColor
colorWithRed
:
61
.
0
f
/
255
.
0
f
green
:
171
.
0
f
/
255
.
0
f
blue
:
225
.
0
f
/
255
.
0
f
alpha
:
1
];
UILabel
*
label
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
RightWidth
/
4
,
13
,
115
,
35
)];
//阴影
headerView
.
layer
.
shadowColor
=
[
UIColor
blackColor
].
CGColor
;
headerView
.
layer
.
shadowRadius
=
4
;
headerView
.
layer
.
shadowOpacity
=
0
.
5
;
headerView
.
layer
.
shadowOffset
=
CGSizeMake
(
0
,
0
);
headerView
.
backgroundColor
=
kMainBlueColor
;
UILabel
*
label
=
[[
UILabel
alloc
]
initWithFrame
:
headerView
.
frame
];
label
.
text
=
@"功能菜单"
;
label
.
font
=
[
UIFont
fontWithName
:
@"Helvetica"
size
:
20
.
0
];
label
.
font
=
[
UIFont
boldSystemFontOfSize
:
2
0
];
[
label
setTextColor
:[
UIColor
whiteColor
]];
[
headerView
addSubview
:
label
];
self
.
rightTableview
.
tableHeaderView
=
headerView
;
label
.
textAlignment
=
NSTextAlignmentCenter
;
[
self
.
navigationController
.
navigationBar
addSubview
:
headerView
];
}
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
UITableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
@"rightcell"
forIndexPath
:
indexPath
];
...
...
@@ -105,8 +108,6 @@
{
cell
.
imageView
.
image
=
[
UIImage
imageNamed
:[
self
.
imageArray
objectAtIndex_opple
:
indexPath
.
row
]];
}
return
cell
;
}
...
...
@@ -140,7 +141,6 @@
[
self
recoveryCell
];
}];
}
if
([
self
.
delegate
respondsToSelector
:
@selector
(
SelectedControllerWithIndex
:)])
{
...
...
Lighting/Class/SceneLibraryViewController.m
View file @
a4d5bbb3
...
...
@@ -21,7 +21,7 @@
/**
* 列表数据
*/
@property
(
nonatomic
,
strong
)
SceneResponse
*
response
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
responseArray
;
/**
...
...
@@ -29,6 +29,10 @@
*/
@property
(
nonatomic
,
strong
)
NSArray
*
imageArray
;
/**
* 当前页数
*/
@property
(
nonatomic
,
assign
)
int
indexPage
;
@end
...
...
@@ -44,8 +48,20 @@
_imageArray
=
[
NSArray
arrayWithObjects
:
@"视角1"
,
@"视角"
,
@"视角3"
,
nil
];
}
return
_imageArray
;
}
/**
* 初始化数据源
*/
-
(
NSMutableArray
*
)
responseArray
{
if
(
_responseArray
==
nil
)
{
_responseArray
=
[
NSMutableArray
array
];
}
return
_responseArray
;
}
-
(
void
)
viewDidLoad
{
...
...
@@ -86,13 +102,34 @@
self
.
SpaceButton
.
layer
.
cornerRadius
=
10
;
[
self
.
backView
addSubview
:
self
.
StyleButton
];
[
self
.
backView
addSubview
:
self
.
SpaceButton
];
self
.
indexPage
=
0
;
//下拉刷新
self
.
seceneLibararyCollectionView
.
mj_header
=
[
MJRefreshNormalHeader
headerWithRefreshingBlock
:
^
{
//默认数据
SceneCondition
*
condition
=
[[
SceneCondition
alloc
]
init
];
DataPage
*
page
=
[[
DataPage
alloc
]
init
];
page
.
page
=
0
;
page
.
page
=
self
.
indexPage
;
page
.
rows
=
10
;
condition
.
page
=
page
;
[
self
getSceneLibrarydatas
:
condition
];
[
self
getSceneLibrarydatas
:
condition
isRemove
:
YES
];
}];
[
self
.
seceneLibararyCollectionView
.
mj_header
beginRefreshing
];
//上拉加载
self
.
seceneLibararyCollectionView
.
mj_footer
=
[
MJRefreshAutoNormalFooter
footerWithRefreshingBlock
:
^
{
//默认数据
SceneCondition
*
condition
=
[[
SceneCondition
alloc
]
init
];
DataPage
*
page
=
[[
DataPage
alloc
]
init
];
page
.
page
=
self
.
indexPage
++
;
page
.
rows
=
10
;
condition
.
page
=
page
;
[
self
getSceneLibrarydatas
:
condition
isRemove
:
NO
];
}];
}
#pragma mark -获取场景筛选数据
-
(
void
)
getdatasAction
...
...
@@ -102,7 +139,6 @@
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
self
.
filter
=
[[
SceneFilter
alloc
]
initWithDictionary
:
returnValue
[
@"data"
]
error
:
nil
];
}
else
{
...
...
@@ -118,16 +154,23 @@
#pragma mark -获取场景列表数据
-
(
void
)
getSceneLibrarydatas
:
(
SceneCondition
*
)
condition
-
(
void
)
getSceneLibrarydatas
:
(
SceneCondition
*
)
condition
isRemove
:
(
BOOL
)
remove
{
[
self
CreateMBProgressHUDLoding
];
[[
NetworkRequestClassManager
Manager
]
NetworkRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/scene/query"
]
WithRequestType
:
0
WithParameter
:
condition
WithReturnValueBlock
:^
(
id
returnValue
)
{
[
self
endRefreshingForTableView
:
self
.
seceneLibararyCollectionView
];
[
self
RemoveMBProgressHUDLoding
];
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
self
.
response
=
[[
SceneResponse
alloc
]
initWithDictionary
:
returnValue
[
@"data"
]
error
:
nil
];
if
(
remove
)
{
[
self
.
responseArray
removeAllObjects
];
}
SceneResponse
*
response
=
[[
SceneResponse
alloc
]
initWithDictionary
:
returnValue
[
@"data"
]
error
:
nil
];
for
(
TOSceneEntity
*
model
in
response
.
list
)
{
[
self
.
responseArray
addObject
:
model
];
}
[
self
.
seceneLibararyCollectionView
reloadData
];
}
else
...
...
@@ -140,6 +183,7 @@
}
WithFailureBlock
:^
(
id
error
)
{
[
self
RemoveMBProgressHUDLoding
];
[
self
endRefreshingForTableView
:
self
.
seceneLibararyCollectionView
];
}];
}
...
...
@@ -148,13 +192,13 @@
-
(
UICollectionViewCell
*
)
collectionView
:
(
UICollectionView
*
)
collectionView
cellForItemAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
SeceneLibraryCollectionViewCell
*
cell
=
[
collectionView
dequeueReusableCellWithReuseIdentifier
:
@"secenelibrary"
forIndexPath
:
indexPath
];
cell
.
model
=
[
self
.
response
.
list
objectAtIndex_opple
:
indexPath
.
item
];
cell
.
model
=
[
self
.
response
Array
objectAtIndex_opple
:
indexPath
.
item
];
return
cell
;
}
-
(
NSInteger
)
collectionView
:
(
UICollectionView
*
)
collectionView
numberOfItemsInSection
:
(
NSInteger
)
section
{
return
self
.
response
.
list
.
count
;
return
self
.
response
Array
.
count
;
}
...
...
@@ -168,7 +212,6 @@
#pragma mark -筛选风格
-
(
void
)
screeningStyleButtonClick
:
(
UIButton
*
)
sender
{
[
self
ShowPopoverViewController
:
CGSizeMake
(
200
,
300
)
Withdatas
:
self
.
filter
.
styles
ShowButton
:
sender
SelectedIndex
:
0
];
}
...
...
@@ -184,13 +227,11 @@
#pragma mark -弹出popover视图控制器
-
(
void
)
ShowPopoverViewController
:
(
CGSize
)
size
Withdatas
:
(
NSArray
*
)
datasArray
ShowButton
:
(
UIButton
*
)
button
SelectedIndex
:
(
NSInteger
)
index
{
PopoverViewController
*
popover
=
[[
PopoverViewController
alloc
]
init
];
popover
.
datasArray
=
datasArray
;
popover
.
delegate
=
self
;
popover
.
Selectedindex
=
index
;
if
(
size
.
width
==
55
)
{
popover
.
isPictures
=
YES
;
}
popover
.
contentSize
=
size
;
...
...
@@ -223,8 +264,7 @@
condition
.
styleEquals
=
Type
;
[
self
.
StyleButton
setTitle
:
title
forState
:
UIControlStateNormal
];
}
[
self
getSceneLibrarydatas
:
condition
];
[
self
getSceneLibrarydatas
:
condition
isRemove
:
YES
];
}
...
...
@@ -253,7 +293,6 @@
default
:
break
;
}
[
self
.
accordingStyle
setBackgroundImage
:
TCImage
([
self
.
imageArray
objectAtIndex_opple
:
selectedIndex
])
forState
:
UIControlStateNormal
];
[
self
dismissViewControllerAnimated
:
YES
completion
:
nil
];
self
.
seceneLibraryCollectionLayout
.
itemSize
=
CGSizeMake
((
ScreenWidth
-
showcellNumber
*
2
)
/
showcellNumber
,
(
ScreenWidth
-
showcellNumber
*
2
)
/
showcellNumber
-
50
);
...
...
Lighting/Class/SearchViewController.m
View file @
a4d5bbb3
...
...
@@ -83,6 +83,7 @@
[
self
.
localSearchArray
addObject
:
not
.
object
];
//调用商品控制器
ProductLibraryViewController
*
productVC
=
[[
self
getStoryboardWithName
]
instantiateViewControllerWithIdentifier
:
@"productlibrary"
];
productVC
.
selectedCode
=
not
.
object
;
[
self
.
navigationController
pushViewController
:
productVC
animated
:
YES
];
}
...
...
@@ -113,6 +114,7 @@
#pragma mark -将要加载前获取本地搜索历史
-
(
void
)
viewWillAppear
:
(
BOOL
)
animated
{
[
super
viewWillAppear
:
animated
];
[
self
getlocalsaveDatas
];
}
...
...
@@ -120,6 +122,7 @@
#pragma mark -视图消失后归档搜索历史
-
(
void
)
viewDidDisappear
:
(
BOOL
)
animated
{
[
super
viewDidDisappear
:
animated
];
[
self
.
view
endEditing
:
YES
];
[
self
SaveSearchDatas
];
}
...
...
Lighting/Class/SeceneLibraryCollectionViewCell.m
View file @
a4d5bbb3
...
...
@@ -16,7 +16,7 @@
{
_model
=
model
;
[
self
.
scenarioImageView
sd_setImageWithURL
:[
NSURL
URLWithString
:
_model
.
pricure
]
placeholderImage
:
R
eplaceImage
];
[
self
.
scenarioImageView
sd_setImageWithURL
:[
NSURL
URLWithString
:
_model
.
pricure
]
placeholderImage
:
R
EPLACEIMAGE
];
}
...
...
Lighting/Class/Shoppingcart/AddressViewController.xib
View file @
a4d5bbb3
...
...
@@ -128,12 +128,11 @@
<subviews>
<textField
opaque=
"NO"
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
fixedFrame=
"YES"
contentHorizontalAlignment=
"left"
contentVerticalAlignment=
"center"
textAlignment=
"natural"
minimumFontSize=
"17"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"5O3-uQ-Ccg"
>
<rect
key=
"frame"
x=
"10"
y=
"0.0"
width=
"190"
height=
"30"
/>
<color
key=
"backgroundColor"
red=
"0.93333333330000001"
green=
"0.93333333330000001"
blue=
"0.93333333330000001"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<textInputTraits
key=
"textInputTraits"
/>
</textField>
</subviews>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite
"
/>
<color
key=
"backgroundColor"
red=
"0.93333333333333335"
green=
"0.93333333333333335"
blue=
"0.93333333333333335"
alpha=
"1"
colorSpace=
"calibratedRGB
"
/>
</view>
</subviews>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
...
...
Lighting/Class/Shoppingcart/GenerateOrdersViewController.m
View file @
a4d5bbb3
...
...
@@ -81,6 +81,10 @@
self
.
generateOrderTableview
.
dataSource
=
self
;
self
.
generateOrderTableview
.
delegate
=
self
;
self
.
generateOrderTableview
.
tableFooterView
=
[
UIView
new
];
self
.
backShoppingbagsButton
.
layer
.
masksToBounds
=
YES
;
self
.
backShoppingbagsButton
.
layer
.
cornerRadius
=
kCornerRadius
;
self
.
createOrderButton
.
layer
.
masksToBounds
=
YES
;
self
.
createOrderButton
.
layer
.
cornerRadius
=
kCornerRadius
;
}
...
...
@@ -114,7 +118,15 @@
[[
self
.
datasArray
objectAtIndex_opple
:
1
]
insertObject
:
Newmodel
atIndex
:
0
];
}
[
self
.
generateOrderTableview
reloadData
];
//地址数组
NSArray
*
addressArray
=
[
self
.
datasArray
objectAtIndex_opple
:
1
];
//增加cell
NSMutableArray
*
addCellArray
=
[
NSMutableArray
array
];
for
(
int
i
=
0
;
i
<
addressArray
.
count
-
1
;
i
++
)
{
NSIndexPath
*
indexpath
=
[
NSIndexPath
indexPathForRow
:
i
inSection
:
1
];
[
addCellArray
addObject
:
indexpath
];
}
[
self
.
generateOrderTableview
insertRowsAtIndexPaths
:
addCellArray
withRowAnimation
:
UITableViewRowAnimationLeft
];
}
else
{
...
...
@@ -188,30 +200,8 @@
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
// return [[self.datasArray objectAtIndex_opple:section] count];
NSArray
*
arr
=
[
self
.
datasArray
objectAtIndex_opple
:
section
];
return
arr
.
count
;
// switch (section) {
// case 0:
// {
// return 1;
// }
// break;
// case 1:
// {
// return 2;
// }
// break;
// case 2:
// {
// return 2;
// }
// break;
//
// default:
// break;
// }
// return 0;
}
...
...
@@ -230,7 +220,8 @@
break
;
case
2
:
{
if
(
indexPath
.
row
==
1
)
{
NSArray
*
arr
=
[
self
.
datasArray
objectAtIndex_opple
:
indexPath
.
section
];
if
(
indexPath
.
row
==
arr
.
count
-
1
)
{
return
50
;
}
...
...
@@ -254,7 +245,7 @@
break
;
case
1
:
{
return
10
;
return
5
;
}
break
;
case
2
:
...
...
@@ -274,7 +265,7 @@
switch
(
section
)
{
case
1
:
{
UIImageView
*
imageView
=
[[
UIImageView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
ScreenWidth
,
10
)];
UIImageView
*
imageView
=
[[
UIImageView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
ScreenWidth
,
5
)];
imageView
.
image
=
TCImage
(
@"lineNew"
);
UIView
*
view
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
ScreenWidth
,
44
)];
[
view
addSubview
:
imageView
];
...
...
Lighting/Class/Shoppingcart/ShoppingTableViewCell.h
View file @
a4d5bbb3
...
...
@@ -8,6 +8,23 @@
#import <UIKit/UIKit.h>
#import "ShopcarModel.h"
@protocol
ChangeGoodsNumberDelegate
<
NSObject
>
/**
* 当前商品数量、成交价
*/
-
(
void
)
ChangeGoodsNumber
:
(
int
)
goodsNumber
WithcostPrice
:
(
NSInteger
)
costprice
Withcellindex
:
(
NSInteger
)
cellindex
;
@end
@interface
ShoppingTableViewCell
:
UITableViewCell
/**
...
...
@@ -68,10 +85,15 @@
/**
* 成交价背景View
*/
@property
(
weak
,
nonatomic
)
IBOutlet
UIView
*
ClinchPriceBackView
;
/**
* 商品数量
*/
@property
(
nonatomic
,
assign
)
id
<
ChangeGoodsNumberDelegate
>
delegate
;
...
...
Lighting/Class/Shoppingcart/ShoppingTableViewCell.m
View file @
a4d5bbb3
...
...
@@ -13,9 +13,18 @@
-
(
void
)
awakeFromNib
{
[
super
awakeFromNib
];
// Initialization code
[
self
uiConfigAction
];
}
#pragma mark -UI
-
(
void
)
uiConfigAction
{
self
.
ClinchPriceBackView
.
layer
.
masksToBounds
=
YES
;
self
.
ClinchPriceBackView
.
layer
.
cornerRadius
=
kCornerRadius
;
}
#pragma mark -赋值
-
(
void
)
setModel
:
(
ShopcarModel
*
)
model
{
...
...
@@ -71,10 +80,12 @@
default
:
break
;
}
//改变价格
self
.
productPriceLabe
.
text
=
[
NSString
stringWithFormat
:
@"¥%ld"
,[
self
.
goodsNumbersLabe
.
text
integerValue
]
*
[
_model
.
goods
.
costPrice
integerValue
]];
if
([
self
.
delegate
respondsToSelector
:
@selector
(
ChangeGoodsNumber
:
WithcostPrice
:
Withcellindex
:
)])
{
[
self
.
delegate
ChangeGoodsNumber
:[
self
.
goodsNumbersLabe
.
text
intValue
]
WithcostPrice
:[
self
.
clinchTextfield
.
text
integerValue
]
Withcellindex
:
_cellindex
];
}
}
...
...
Lighting/Class/Shoppingcart/ShoppingViewController.m
View file @
a4d5bbb3
...
...
@@ -12,7 +12,7 @@
#import "GenerateOrdersViewController.h"
#import "ShopcarModel.h"
@interface
ShoppingViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
>
@interface
ShoppingViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
ChangeGoodsNumberDelegate
>
@property
(
weak
,
nonatomic
)
IBOutlet
UITableView
*
shoppingTableview
;
...
...
@@ -24,6 +24,9 @@
* 购物车数据源
*/
@property
(
nonatomic
,
strong
)
NSMutableArray
*
shopResponseArray
;
@end
@implementation
ShoppingViewController
...
...
@@ -47,10 +50,9 @@
// Do any additional setup after loading the view.
[
self
uiConfigAction
];
[
self
getShoppingCardata
];
}
#pragma mark -渲染完成
-
(
void
)
viewDidAppear
:
(
BOOL
)
animated
{
[
super
viewDidAppear
:
animated
];
...
...
@@ -59,24 +61,35 @@
if
([
self
.
navigationController
respondsToSelector
:
@selector
(
interactivePopGestureRecognizer
)])
{
self
.
navigationController
.
interactivePopGestureRecognizer
.
enabled
=
NO
;
}
[
self
.
shopResponseArray
removeAllObjects
];
[
self
InitializeState
];
[
self
getShoppingCardata
];
}
#pragma mark -视图即将消失
-
(
void
)
viewWillDisappear
:
(
BOOL
)
animated
{
[
super
viewWillDisappear
:
animated
];
[
self
.
shopResponseArray
removeAllObjects
];
[
self
getShoppingCardata
];
// 开启
if
([
self
.
navigationController
respondsToSelector
:
@selector
(
interactivePopGestureRecognizer
)])
{
self
.
navigationController
.
interactivePopGestureRecognizer
.
enabled
=
YES
;
}
}
#pragma mark -初始化状态
-
(
void
)
InitializeState
{
[
self
.
settlementButton
setTitle
:
@"去结算(0)"
forState
:
UIControlStateNormal
];
self
.
allSelectedButton
.
selected
=
NO
;
self
.
totalpriceLabe
.
text
=
nil
;
}
#pragma mark - UI
-
(
void
)
uiConfigAction
{
self
.
settlementButton
.
layer
.
masksToBounds
=
YES
;
self
.
settlementButton
.
layer
.
cornerRadius
=
kCornerRadius
;
self
.
view
.
backgroundColor
=
kTCColor
(
238
,
238
,
238
);
self
.
shoppingTableview
.
dataSource
=
self
;
self
.
shoppingTableview
.
delegate
=
self
;
...
...
@@ -84,6 +97,8 @@
self
.
shoppingTableview
.
tableFooterView
=
[
UIView
new
];
}
#pragma mark -获取购物车商品
-
(
void
)
getShoppingCardata
{
...
...
@@ -100,6 +115,7 @@
[
self
CreateMBProgressHUDLoding
];
[[
NetworkRequestClassManager
Manager
]
NetworkRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/shopcart/query"
]
WithRequestType
:
0
WithParameter
:
shopcarNumber
WithReturnValueBlock
:^
(
id
returnValue
)
{
[
self
endRefreshingForTableView
:
self
.
shoppingTableview
];
[
self
RemoveMBProgressHUDLoding
];
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
...
...
@@ -131,6 +147,7 @@
}
WithFailureBlock
:^
(
id
error
)
{
[
self
RemoveMBProgressHUDLoding
];
[
self
endRefreshingForTableView
:
self
.
shoppingTableview
];
}];
}
...
...
@@ -141,6 +158,7 @@
ShoppingTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
@"Shopping"
forIndexPath
:
indexPath
];
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
cell
.
model
=
[
self
.
shopResponseArray
objectAtIndex_opple
:
indexPath
.
row
];
cell
.
delegate
=
self
;
cell
.
cellindex
=
indexPath
.
row
;
//cell选中回调
[
cell
setReturnCellblock
:
^
(
NSInteger
index
)
{
...
...
@@ -179,7 +197,14 @@
if
(
model
.
isSelected
)
{
goodsNumber
++
;
}
if
(
goodsNumber
==
0
)
{
self
.
allSelectedButton
.
selected
=
NO
;
}
if
(
goodsNumber
==
self
.
shopResponseArray
.
count
)
{
self
.
allSelectedButton
.
selected
=
YES
;
}
}
[
self
CalculateSelectedGoodsAllprice
];
[
self
.
settlementButton
setTitle
:[
NSString
stringWithFormat
:
@"去结算(%ld)"
,
goodsNumber
]
forState
:
UIControlStateNormal
];
}
...
...
@@ -209,7 +234,6 @@
#pragma mark -全选
-
(
IBAction
)
allSelectedButtonClick
:
(
UIButton
*
)
sender
{
sender
.
selected
=
!
sender
.
selected
;
if
(
sender
.
selected
)
{
...
...
@@ -222,6 +246,9 @@
model
.
isSelected
=
YES
;
}
[
self
.
settlementButton
setTitle
:[
NSString
stringWithFormat
:
@"去结算(%ld)"
,
self
.
shopResponseArray
.
count
]
forState
:
UIControlStateNormal
];
//计算总金额
[
self
CalculateSelectedGoodsAllprice
];
}
else
{
//取消全部选中
...
...
@@ -233,7 +260,20 @@
model
.
isSelected
=
NO
;
}
[
self
.
settlementButton
setTitle
:
@"去结算(0)"
forState
:
UIControlStateNormal
];
}
}
#pragma mark -计算选中后的商品总金额
-
(
void
)
CalculateSelectedGoodsAllprice
{
NSInteger
allPrice
=
0
;
for
(
ShopcarModel
*
model
in
self
.
shopResponseArray
)
{
if
(
model
.
isSelected
)
{
allPrice
+=
[
model
.
goods
.
costPrice
integerValue
]
*
model
.
goodsNum
;
}
}
self
.
totalpriceLabe
.
text
=
[
NSString
stringWithFormat
:
@"¥%ld"
,
allPrice
];
}
...
...
@@ -277,7 +317,9 @@
}
[
self
.
shoppingTableview
deleteRowsAtIndexPaths
:
delecteArray
withRowAnimation
:
UITableViewRowAnimationLeft
];
[
self
SuccessMBProgressView
:
@"删除成功"
];
[
self
CalculateSelectedGoodsAllprice
];
self
.
allSelectedButton
.
selected
=
NO
;
[
self
.
settlementButton
setTitle
:
@"去结算(0)"
forState
:
UIControlStateNormal
];
}
else
{
[
self
ErrorMBProgressView
:
returnValue
[
@"message"
]];
...
...
@@ -289,14 +331,25 @@
}
WithFailureBlock
:^
(
id
error
)
{
[
self
RemoveMBProgressHUDLoding
];
}];
}
#pragma mark -改变商品数量
-
(
void
)
ChangeGoodsNumber
:
(
int
)
goodsNumber
WithcostPrice
:
(
NSInteger
)
costprice
Withcellindex
:
(
NSInteger
)
cellindex
{
//保存商品数量
ShopcarModel
*
model
=
[
self
.
shopResponseArray
objectAtIndex_opple
:
cellindex
];
model
.
goodsNum
=
goodsNumber
;
// [self.shopResponseArray replaceObjectAtIndex:cellindex withObject:model];
//保存成交价格
ShopcarModel
*
Newmodel
=
[
self
.
shopResponseArray
objectAtIndex_opple
:
cellindex
];
Newmodel
.
goods
.
costPrice
=
[
NSNumber
numberWithInteger
:
costprice
];
// [self.shopResponseArray replaceObjectAtIndex:cellindex withObject:Newmodel];
[
self
CalculateSelectedGoodsAllprice
];
}
-
(
void
)
didReceiveMemoryWarning
{
...
...
Lighting/Class/Tabbar/CustomTabbarController.m
View file @
a4d5bbb3
...
...
@@ -53,6 +53,30 @@
-
(
void
)
viewWillAppear
:
(
BOOL
)
animated
{
[
super
viewWillAppear
:
animated
];
[
self
.
selectedViewController
beginAppearanceTransition
:
YES
animated
:
animated
];
}
-
(
void
)
viewDidAppear
:
(
BOOL
)
animated
{
[
super
viewDidAppear
:
animated
];
[
self
.
selectedViewController
endAppearanceTransition
];
}
-
(
void
)
viewWillDisappear
:
(
BOOL
)
animated
{
[
super
viewWillDisappear
:
animated
];
[
self
.
selectedViewController
beginAppearanceTransition
:
NO
animated
:
animated
];
}
-
(
void
)
viewDidDisappear
:
(
BOOL
)
animated
{
[
super
viewDidDisappear
:
animated
];
[
self
.
selectedViewController
endAppearanceTransition
];
}
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
...
...
@@ -71,7 +95,6 @@
toolview
.
delegate
=
self
;
toolview
.
inputField
.
delegate
=
self
;
[
self
.
tabBar
addSubview
:
toolview
];
// SHARED_APPDELEGATE.Mytabbar = self.tabBar;
}
...
...
Lighting/Class/Tabbar/Toolview.m
View file @
a4d5bbb3
...
...
@@ -81,9 +81,9 @@
[
button
addTarget
:
self
action
:
@selector
(
QrCodeButtonClickAction
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
addSubview
:
button
];
//按钮
NSArray
*
titleArray
=
[
NSArray
arrayWithObjects
:
@"功能菜单"
,
@"某某用户"
,
@"我的客户"
,
@"购物车"
,
nil
];
NSString
*
userName
=
[
Shoppersmanager
manager
].
Shoppers
.
employee
.
userName
?[
Shoppersmanager
manager
].
Shoppers
.
employee
.
userName
:
@"某某用户"
;
NSArray
*
titleArray
=
[
NSArray
arrayWithObjects
:
@"功能菜单"
,
userName
,
@"我的客户"
,
@"购物车"
,
nil
];
//图片
NSArray
*
imageArray
=
[
NSArray
arrayWithObjects
:
@"dial"
,
@"Cog"
,
@"data"
,
@"ablum"
,
nil
];
for
(
int
i
=
1
;
i
<
5
;
i
++
)
{
...
...
@@ -94,17 +94,20 @@
[
button
setTitle
:[
titleArray
objectAtIndex_opple
:
i
-
1
]
forState
:
UIControlStateNormal
];
button
.
tag
=
100
+
i
-
1
;
[
button
addTarget
:
self
action
:
@selector
(
ButtonClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
button
setImage
:
TCImage
([
imageArray
objectAtIndex_opple
:
i
-
1
])
forState
:
UIControlStateNormal
];
[
self
addSubview
:
button
];
if
(
i
==
4
)
{
SHARED_APPDELEGATE
.
shoppingCarPoint
=
[
self
convertPoint
:
CGPointMake
(
button
.
center
.
x
,
button
.
center
.
y
)
toView
:
self
.
window
];
}
}
// //创建下划线
// CustomButton *button = (CustomButton *)[self viewWithTag:102];
// self.underlineView = [[UIView alloc]initWithFrame:CGRectMake(button.frame.origin.x+(ButtonWIDTH-50)/2, ButtonRIGHT+9, 50, 1)];
// _underlineView.backgroundColor = [UIColor redColor];
// [self addSubview:self.underlineView];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
refreshGoodsNumber
:
)
name
:
@"GOODSNUMBER"
object
:
nil
];
//刷新购物车数量
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
refreshGoodsNumber
:
)
name
:
REFRESHSHOPPINGCAR
object
:
nil
];
}
...
...
@@ -112,7 +115,7 @@
-
(
void
)
refreshGoodsNumber
:
(
NSNotification
*
)
objc
{
CustomButton
*
button
=
(
CustomButton
*
)[
self
viewWithTag
:
103
];
button
.
instructionsNumber
=
[
objc
.
object
integerValue
];
button
.
instructionsNumber
+
=
[
objc
.
object
integerValue
];
}
...
...
Lighting/Lighting.xcodeproj/project.pbxproj
View file @
a4d5bbb3
...
...
@@ -38,7 +38,8 @@
2942F8A81CDD80CE005B377E
/* authenticateView.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
2942F8A71CDD80CE005B377E
/* authenticateView.xib */
;
};
2949BABD1CD2EFA00049385A
/* InformationTableViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
2949BABC1CD2EFA00049385A
/* InformationTableViewCell.m */
;
};
2949BAC21CD3055A0049385A
/* MMExampleDrawerVisualStateManager.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
2949BAC11CD3055A0049385A
/* MMExampleDrawerVisualStateManager.m */
;
};
2949BAC41CD3086F0049385A
/* weibo.png in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
2949BAC31CD3086F0049385A
/* weibo.png */
;
};
294CF0EC1CEDCF480055F1D8
/* PromptinformationView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
294CF0EB1CEDCF480055F1D8
/* PromptinformationView.m */
;
};
294CF0EE1CEDCF540055F1D8
/* PromptinformationView.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
294CF0ED1CEDCF540055F1D8
/* PromptinformationView.xib */
;
};
2962D06D1CD1A43A0058829D
/* ClientViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
2962D06C1CD1A43A0058829D
/* ClientViewController.m */
;
};
2962D0711CD1A58B0058829D
/* RightViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
2962D0701CD1A58B0058829D
/* RightViewController.m */
;
};
2962D0791CD1CBC60058829D
/* NetworkRequestClassManager.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
2962D0781CD1CBC60058829D
/* NetworkRequestClassManager.m */
;
};
...
...
@@ -182,7 +183,9 @@
2949BABC1CD2EFA00049385A
/* InformationTableViewCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
InformationTableViewCell.m
;
sourceTree
=
"<group>"
;
};
2949BAC01CD3055A0049385A
/* MMExampleDrawerVisualStateManager.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
MMExampleDrawerVisualStateManager.h
;
sourceTree
=
"<group>"
;
};
2949BAC11CD3055A0049385A
/* MMExampleDrawerVisualStateManager.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
MMExampleDrawerVisualStateManager.m
;
sourceTree
=
"<group>"
;
};
2949BAC31CD3086F0049385A
/* weibo.png */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
image.png
;
path
=
weibo.png
;
sourceTree
=
"<group>"
;
};
294CF0EA1CEDCF480055F1D8
/* PromptinformationView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
PromptinformationView.h
;
sourceTree
=
"<group>"
;
};
294CF0EB1CEDCF480055F1D8
/* PromptinformationView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
PromptinformationView.m
;
sourceTree
=
"<group>"
;
};
294CF0ED1CEDCF540055F1D8
/* PromptinformationView.xib */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
file.xib
;
path
=
PromptinformationView.xib
;
sourceTree
=
"<group>"
;
};
2962D06B1CD1A43A0058829D
/* ClientViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ClientViewController.h
;
sourceTree
=
"<group>"
;
};
2962D06C1CD1A43A0058829D
/* ClientViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ClientViewController.m
;
sourceTree
=
"<group>"
;
};
2962D06F1CD1A58B0058829D
/* RightViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
RightViewController.h
;
sourceTree
=
"<group>"
;
};
...
...
@@ -497,6 +500,7 @@
2928F7DE1CD085430036D761
/* Tools */
=
{
isa
=
PBXGroup
;
children
=
(
294CF0E91CEDCF250055F1D8
/* PromptinformationView */
,
29A9DCAA1CEB63BD00A7567A
/* PreviewPDF */
,
2985AE9A1CE72F1500704C91
/* ZXPUnicode */
,
29BFBD841CE4288A00C238FB
/* Customercenter */
,
...
...
@@ -506,7 +510,6 @@
29EC331C1CE02ADC005F0C13
/* popoverController */
,
29EAAEAB1CDCA28300C4DBA2
/* city.json */
,
2949BABF1CD305340049385A
/* MMDrawerManager */
,
2949BAC31CD3086F0049385A
/* weibo.png */
,
2962D07E1CD1E5DD0058829D
/* UIView+Frame */
,
2962D07A1CD1E3CC0058829D
/* NSarray+category */
,
2962D0761CD1CB860058829D
/* NetworkRequest */
,
...
...
@@ -659,6 +662,16 @@
name
=
MMDrawerManager
;
sourceTree
=
"<group>"
;
};
294CF0E91CEDCF250055F1D8
/* PromptinformationView */
=
{
isa
=
PBXGroup
;
children
=
(
294CF0EA1CEDCF480055F1D8
/* PromptinformationView.h */
,
294CF0EB1CEDCF480055F1D8
/* PromptinformationView.m */
,
294CF0ED1CEDCF540055F1D8
/* PromptinformationView.xib */
,
);
name
=
PromptinformationView
;
sourceTree
=
"<group>"
;
};
2962D06A1CD1A3FE0058829D
/* MyClient */
=
{
isa
=
PBXGroup
;
children
=
(
...
...
@@ -1241,9 +1254,9 @@
29807C621CD20C2A00F111B8
/* Images.xcassets in Resources */
,
29834EB61CDF1EB6001A484F
/* screeningSecondView.xib in Resources */
,
299249461CDB51C800786B1E
/* ModifyShippingAddressView.xib in Resources */
,
294CF0EE1CEDCF540055F1D8
/* PromptinformationView.xib in Resources */
,
29834EBB1CDF1FBC001A484F
/* screeningFirstView.xib in Resources */
,
29EAAEAC1CDCA28300C4DBA2
/* city.json in Resources */
,
2949BAC41CD3086F0049385A
/* weibo.png in Resources */
,
29EAAE971CDC4B2900C4DBA2
/* The Swift Programming Language 中文版 - v1.2.pdf in Resources */
,
2928F83D1CD0A9CD0036D761
/* qq.png in Resources */
,
29834EC61CDF76C1001A484F
/* UserViewController.xib in Resources */
,
...
...
@@ -1346,6 +1359,7 @@
2942F8A61CDD80C2005B377E
/* authenticateView.m in Sources */
,
044CD6F11CEB81350004A715
/* ProductCollectionPictureCell.m in Sources */
,
29BFBD8F1CE44BA900C238FB
/* goodsDetailsSectionview.m in Sources */
,
294CF0EC1CEDCF480055F1D8
/* PromptinformationView.m in Sources */
,
290887131CE5DF16000B7097
/* ShopcarModel.m in Sources */
,
29BB27681CD9D38E009A0813
/* AllpriceTableViewCell.m in Sources */
,
29BB27771CD9DFBA009A0813
/* ProductLibraryViewController.m in Sources */
,
...
...
Lighting/Lighting/AppDelegate.h
View file @
a4d5bbb3
...
...
@@ -36,6 +36,13 @@
*/
@property
(
nonatomic
,
strong
)
UITabBarController
*
Mytabbar
;
/**
* 保存购物车坐标
*/
@property
(
nonatomic
,
assign
)
CGPoint
shoppingCarPoint
;
-
(
void
)
saveContext
;
-
(
NSURL
*
)
applicationDocumentsDirectory
;
...
...
Lighting/Lighting/StoryboardwithCYX.storyboard
View file @
a4d5bbb3
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
version=
"3.0"
toolsVersion=
"10116"
systemVersion=
"15
F34
"
targetRuntime=
"iOS.CocoaTouch.iPad"
propertyAccessControl=
"none"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
version=
"3.0"
toolsVersion=
"10116"
systemVersion=
"15
E65
"
targetRuntime=
"iOS.CocoaTouch.iPad"
propertyAccessControl=
"none"
>
<dependencies>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"10085"
/>
</dependencies>
...
...
@@ -198,7 +198,6 @@
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"曹云霄"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"BFX-MF-Tjn"
>
<rect
key=
"frame"
x=
"181"
y=
"14"
width=
"110"
height=
"21"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<color
key=
"backgroundColor"
red=
"1"
green=
"0.39892781040000003"
blue=
"0.50448872310000004"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<color
key=
"textColor"
white=
"0.66666666666666663"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
...
...
@@ -206,7 +205,6 @@
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"曹云霄"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"b5n-Bd-piS"
>
<rect
key=
"frame"
x=
"181"
y=
"41"
width=
"110"
height=
"21"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<color
key=
"backgroundColor"
red=
"1"
green=
"0.39892781040000003"
blue=
"0.50448872310000004"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<color
key=
"textColor"
white=
"0.66666666666666663"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
...
...
@@ -214,7 +212,6 @@
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"曹云霄"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"3T5-Bf-6tT"
>
<rect
key=
"frame"
x=
"205"
y=
"68"
width=
"140"
height=
"21"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<color
key=
"backgroundColor"
red=
"1"
green=
"0.39892781040000003"
blue=
"0.50448872310000004"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<color
key=
"textColor"
white=
"0.66666666666666663"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
...
...
@@ -222,7 +219,6 @@
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"曹云霄"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"gMQ-8Z-IHh"
>
<rect
key=
"frame"
x=
"371"
y=
"14"
width=
"176"
height=
"21"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
widthSizable=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<color
key=
"backgroundColor"
red=
"1"
green=
"0.39892781040000003"
blue=
"0.50448872310000004"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<color
key=
"textColor"
white=
"0.66666666666666663"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
...
...
@@ -230,7 +226,6 @@
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"曹云霄"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"UX9-mF-TLc"
>
<rect
key=
"frame"
x=
"371"
y=
"41"
width=
"176"
height=
"21"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
widthSizable=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<color
key=
"backgroundColor"
red=
"1"
green=
"0.39892781040000003"
blue=
"0.50448872310000004"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<color
key=
"textColor"
white=
"0.66666666666666663"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
...
...
@@ -248,7 +243,7 @@
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"设为当前客户"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"9Bs-Yx-wfk"
>
<rect
key=
"frame"
x=
"599"
y=
"59"
width=
"100"
height=
"30"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"1
6
"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"1
3
"
/>
<color
key=
"textColor"
white=
"0.33333333333333331"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
...
...
@@ -1229,10 +1224,13 @@
<nil
key=
"highlightedColor"
/>
</label>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"roundedRect"
lineBreakMode=
"middleTruncation"
id=
"fb6-vA-YdH"
>
<rect
key=
"frame"
x=
"2
56"
y=
"250"
width=
"30"
height=
"3
0"
/>
<rect
key=
"frame"
x=
"2
45"
y=
"245"
width=
"50"
height=
"5
0"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMinY=
"YES"
/>
<color
key=
"backgroundColor"
red=
"1"
green=
"0.39892781040000003"
blue=
"0.50448872310000004"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<state
key=
"normal"
title=
"+"
/>
<connections>
<action
selector=
"AddShoppingcarButtonClick:"
destination=
"J5m-0M-uqb"
eventType=
"touchUpInside"
id=
"qsE-nO-ZHl"
/>
</connections>
</button>
</subviews>
<color
key=
"backgroundColor"
white=
"0.0"
alpha=
"0.0"
colorSpace=
"calibratedWhite"
/>
...
...
@@ -1674,10 +1672,10 @@
<autoresizingMask
key=
"autoresizingMask"
/>
<subviews>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
lineBreakMode=
"middleTruncation"
id=
"PkJ-eJ-ksY"
>
<rect
key=
"frame"
x=
"
20"
y=
"29"
width=
"20"
height=
"2
0"
/>
<rect
key=
"frame"
x=
"
13"
y=
"16"
width=
"50"
height=
"5
0"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<state
key=
"normal"
backgroundI
mage=
"box-副本"
/>
<state
key=
"selected"
backgroundI
mage=
"bg"
/>
<state
key=
"normal"
i
mage=
"box-副本"
/>
<state
key=
"selected"
i
mage=
"bg"
/>
<connections>
<action
selector=
"selectedButtonClick:"
destination=
"ZT1-XJ-ObI"
eventType=
"touchUpInside"
id=
"g4l-VU-RF4"
/>
</connections>
...
...
@@ -1686,7 +1684,7 @@
<rect
key=
"frame"
x=
"74"
y=
"9"
width=
"77"
height=
"64"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
</imageView>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"产品信息"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"hky-AF-07L"
>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"产品信息"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
numberOfLines=
"0"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"hky-AF-07L"
>
<rect
key=
"frame"
x=
"189"
y=
"19"
width=
"73"
height=
"43"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
...
...
@@ -1700,16 +1698,11 @@
<color
key=
"textColor"
white=
"0.33333333333333331"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
<textField
opaque=
"NO"
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"left"
contentVerticalAlignment=
"center"
text=
"¥5500"
borderStyle=
"roundedRect"
textAlignment=
"center"
minimumFontSize=
"17"
id=
"Q7k-hi-4Ks"
>
<rect
key=
"frame"
x=
"384"
y=
"25"
width=
"66"
height=
"30"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<textInputTraits
key=
"textInputTraits"
keyboardType=
"numberPad"
/>
</textField>
<button
opaque=
"NO"
tag=
"101"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"roundedRect"
lineBreakMode=
"middleTruncation"
id=
"YVt-jQ-r0r"
>
<rect
key=
"frame"
x=
"556"
y=
"24"
width=
"30"
height=
"30"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<color
key=
"backgroundColor"
red=
"0.97647058823529409"
green=
"0.95686274509803915"
blue=
"0.94509803921568625"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"15"
/>
<state
key=
"normal"
title=
"+"
/>
<connections>
<action
selector=
"reduceAndaddButtonClick:"
destination=
"ZT1-XJ-ObI"
eventType=
"touchUpInside"
id=
"e4z-VP-QRY"
/>
...
...
@@ -1738,10 +1731,31 @@
<color
key=
"textColor"
red=
"1"
green=
"0.39892781040000003"
blue=
"0.50448872310000004"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
</label>
<view
contentMode=
"scaleToFill"
id=
"uTf-41-q0k"
>
<rect
key=
"frame"
x=
"373"
y=
"23"
width=
"80"
height=
"30"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<subviews>
<textField
opaque=
"NO"
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"left"
contentVerticalAlignment=
"center"
text=
"5500"
textAlignment=
"center"
minimumFontSize=
"17"
id=
"Q7k-hi-4Ks"
>
<rect
key=
"frame"
x=
"20"
y=
"0.0"
width=
"60"
height=
"30"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<textInputTraits
key=
"textInputTraits"
keyboardType=
"numberPad"
/>
</textField>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"¥"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"BSc-ng-K19"
>
<rect
key=
"frame"
x=
"1"
y=
"0.0"
width=
"20"
height=
"30"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"17"
/>
<color
key=
"textColor"
red=
"0.0"
green=
"0.0"
blue=
"0.0"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
</label>
</subviews>
<color
key=
"backgroundColor"
red=
"0.93333333333333335"
green=
"0.93333333333333335"
blue=
"0.93333333333333335"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
</view>
</subviews>
</tableViewCellContentView>
<color
key=
"backgroundColor"
red=
"1"
green=
"0.70412693911356183"
blue=
"0.69044467628014605"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<connections>
<outlet
property=
"ClinchPriceBackView"
destination=
"uTf-41-q0k"
id=
"nB3-Pi-hot"
/>
<outlet
property=
"clinchTextfield"
destination=
"Q7k-hi-4Ks"
id=
"j4I-Qk-tZ8"
/>
<outlet
property=
"goodsImageView"
destination=
"vCQ-e0-bdq"
id=
"ahh-qu-JTs"
/>
<outlet
property=
"goodsInformationLabe"
destination=
"hky-AF-07L"
id=
"xxQ-En-W9t"
/>
...
...
@@ -1773,13 +1787,13 @@
</connections>
</button>
<label
opaque=
"NO"
multipleTouchEnabled=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"全选"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"aGF-A2-Ikp"
>
<rect
key=
"frame"
x=
"8
5
"
y=
"21"
width=
"32"
height=
"21"
/>
<rect
key=
"frame"
x=
"8
3
"
y=
"21"
width=
"32"
height=
"21"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"12"
/>
<color
key=
"textColor"
white=
"0.66666666666666663"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
multipleTouchEnabled=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"
¥25600
"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"SzO-sh-Q17"
>
<label
opaque=
"NO"
multipleTouchEnabled=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
""
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"SzO-sh-Q17"
>
<rect
key=
"frame"
x=
"412"
y=
"18"
width=
"144"
height=
"25"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"24"
/>
...
...
@@ -1793,11 +1807,11 @@
<nil
key=
"highlightedColor"
/>
</label>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
lineBreakMode=
"middleTruncation"
id=
"va8-YD-eVD"
>
<rect
key=
"frame"
x=
"
56"
y=
"22"
width=
"20"
height=
"2
0"
/>
<rect
key=
"frame"
x=
"
33"
y=
"7"
width=
"50"
height=
"5
0"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<color
key=
"backgroundColor"
white=
"0.0"
alpha=
"0.0"
colorSpace=
"calibratedWhite"
/>
<state
key=
"normal"
backgroundI
mage=
"box-副本"
/>
<state
key=
"selected"
backgroundI
mage=
"bg"
/>
<state
key=
"normal"
i
mage=
"box-副本"
/>
<state
key=
"selected"
i
mage=
"bg"
/>
<connections>
<action
selector=
"allSelectedButtonClick:"
destination=
"4Ho-ZE-RT8"
eventType=
"touchUpInside"
id=
"aU8-Kr-NzZ"
/>
</connections>
...
...
@@ -1808,17 +1822,17 @@
<color
key=
"backgroundColor"
red=
"0.8666666666666667"
green=
"0.8666666666666667"
blue=
"0.8666666666666667"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
</view>
<label
opaque=
"NO"
multipleTouchEnabled=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"删除"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"VF3-g8-ckJ"
>
<rect
key=
"frame"
x=
"1
67
"
y=
"21"
width=
"32"
height=
"21"
/>
<rect
key=
"frame"
x=
"1
73
"
y=
"21"
width=
"32"
height=
"21"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"12"
/>
<color
key=
"textColor"
white=
"0.66666666666666663"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
lineBreakMode=
"middleTruncation"
id=
"451-RF-HOE"
>
<rect
key=
"frame"
x=
"1
39"
y=
"22"
width=
"20"
height=
"2
0"
/>
<rect
key=
"frame"
x=
"1
25"
y=
"7"
width=
"50"
height=
"5
0"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<color
key=
"backgroundColor"
white=
"0.0"
alpha=
"0.0"
colorSpace=
"calibratedWhite"
/>
<state
key=
"normal"
backgroundI
mage=
"Trash"
/>
<state
key=
"normal"
i
mage=
"Trash"
/>
<connections>
<action
selector=
"delecteSelectedGoods:"
destination=
"4Ho-ZE-RT8"
eventType=
"touchUpInside"
id=
"Ylw-dW-E2P"
/>
</connections>
...
...
@@ -1855,7 +1869,7 @@
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<prototypes>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
selectionStyle=
"none"
indentationWidth=
"10"
reuseIdentifier=
"secondcell"
rowHeight=
"140"
id=
"LsY-i0-h5H"
customClass=
"PersonInformationTableViewCell"
>
<rect
key=
"frame"
x=
"0.0"
y=
"
28
"
width=
"768"
height=
"140"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"
92
"
width=
"768"
height=
"140"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"LsY-i0-h5H"
id=
"dPG-p9-V2i"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"768"
height=
"139.5"
/>
...
...
@@ -1952,7 +1966,7 @@
</connections>
</tableViewCell>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
reuseIdentifier=
"consigneecell"
rowHeight=
"56"
id=
"gfQ-UE-mXV"
customClass=
"GenerateOrdersTableViewCell"
>
<rect
key=
"frame"
x=
"0.0"
y=
"
168
"
width=
"768"
height=
"56"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"
232
"
width=
"768"
height=
"56"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"gfQ-UE-mXV"
id=
"za6-HU-VEw"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"768"
height=
"55.5"
/>
...
...
@@ -2023,7 +2037,7 @@
</connections>
</tableViewCell>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
reuseIdentifier=
"Modifycell"
rowHeight=
"56"
id=
"Kk4-Fh-HhL"
customClass=
"GenerateOrdersModifyTableViewCell"
>
<rect
key=
"frame"
x=
"0.0"
y=
"2
24
"
width=
"768"
height=
"56"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"2
88
"
width=
"768"
height=
"56"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"Kk4-Fh-HhL"
id=
"oRX-7p-HkY"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"768"
height=
"55.5"
/>
...
...
@@ -2054,7 +2068,7 @@
</connections>
</tableViewCell>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
selectionStyle=
"none"
indentationWidth=
"10"
reuseIdentifier=
"fourthcell"
rowHeight=
"80"
id=
"G7o-xS-1mB"
customClass=
"CommodityListTableViewCell"
>
<rect
key=
"frame"
x=
"0.0"
y=
"
280
"
width=
"768"
height=
"80"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"
344
"
width=
"768"
height=
"80"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"G7o-xS-1mB"
id=
"l3e-TL-GCT"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"768"
height=
"79.5"
/>
...
...
@@ -2115,7 +2129,7 @@
</connections>
</tableViewCell>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
reuseIdentifier=
"sixthcell"
rowHeight=
"50"
id=
"6K9-mc-7RW"
customClass=
"AllpriceTableViewCell"
>
<rect
key=
"frame"
x=
"0.0"
y=
"
360
"
width=
"768"
height=
"50"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"
424
"
width=
"768"
height=
"50"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"6K9-mc-7RW"
id=
"Vc7-f6-wGb"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"768"
height=
"49.5"
/>
...
...
@@ -2165,8 +2179,10 @@
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"roundedRect"
lineBreakMode=
"middleTruncation"
id=
"aEs-FN-Ezh"
>
<rect
key=
"frame"
x=
"213"
y=
"15"
width=
"150"
height=
"40"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<color
key=
"backgroundColor"
red=
"1"
green=
"0.70412693910000002"
blue=
"0.69044467629999995"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<state
key=
"normal"
title=
"返回购物车"
/>
<color
key=
"backgroundColor"
red=
"0.66666666666666663"
green=
"0.66666666666666663"
blue=
"0.66666666666666663"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<state
key=
"normal"
title=
"返回购物车"
>
<color
key=
"titleColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
</state>
<connections>
<action
selector=
"BackShoppingBagsButtonClick:"
destination=
"7F5-cb-m5g"
eventType=
"touchUpInside"
id=
"j4r-15-4Pf"
/>
</connections>
...
...
@@ -2174,8 +2190,10 @@
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"roundedRect"
lineBreakMode=
"middleTruncation"
id=
"OpF-mW-g1V"
>
<rect
key=
"frame"
x=
"406"
y=
"15"
width=
"150"
height=
"40"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<color
key=
"backgroundColor"
red=
"1"
green=
"0.39892781040000003"
blue=
"0.50448872310000004"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<state
key=
"normal"
title=
"生成订单"
/>
<color
key=
"backgroundColor"
red=
"0.34901960784313724"
green=
"0.67450980392156867"
blue=
"0.86274509803921573"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<state
key=
"normal"
title=
"生成订单"
>
<color
key=
"titleColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
</state>
<connections>
<action
selector=
"CreateOrderButtonClick:"
destination=
"7F5-cb-m5g"
eventType=
"touchUpInside"
id=
"zfW-1q-vqB"
/>
</connections>
...
...
Lighting/Tools/BaseViewController.h
View file @
a4d5bbb3
...
...
@@ -68,6 +68,9 @@
*/
-
(
void
)
callAirprintWithURL
:(
NSURL
*
)
datasurl
SuccessBlock
:(
void
(
^
)())
success
ErrorBlock
:(
void
(
^
)())
failed
;
/**
* 提示图片、文本
*/
-
(
void
)
PromptinformationViewWithimage
:(
UIImage
*
)
image
withTitle
:(
NSString
*
)
title
withFrame
:(
CGRect
)
frame
;
@end
Lighting/Tools/BaseViewController.m
View file @
a4d5bbb3
...
...
@@ -84,7 +84,8 @@
#pragma mark -移除MBProgressHUD等待视图
-
(
void
)
RemoveMBProgressHUDLoding
;
{
[
self
.
TCHud
hide
:
YES
afterDelay
:
1
];
// [self.TCHud hide:YES afterDelay:1];
[
self
.
TCHud
hide
:
YES
];
self
.
TCHud
=
nil
;
}
...
...
@@ -239,8 +240,15 @@
}
#pragma mark -提示文本,图片
-
(
void
)
PromptinformationViewWithimage
:
(
UIImage
*
)
image
withTitle
:
(
NSString
*
)
title
withFrame
:
(
CGRect
)
frame
{
PromptinformationView
*
promptView
=
[[[
NSBundle
mainBundle
]
loadNibNamed
:
@"PromptinformationView"
owner
:
self
options
:
nil
]
firstObject
];
promptView
.
tipsImage
.
image
=
image
;
promptView
.
tipsTitle
.
text
=
title
;
promptView
.
frame
=
frame
;
[
self
.
view
addSubview
:
promptView
];
}
...
...
Lighting/Tools/PrefixHeader.pch
View file @
a4d5bbb3
...
...
@@ -27,6 +27,7 @@
#import "UIImageView+WebCache.h"
#import "Customermanager.h"
#import "AppDelegate.h"
#import "PromptinformationView.h"
// Include any system framework and library headers here that should be included in all compilation units.
// You will also need to set the Prefix Header build setting of one or more of your targets to reference this file.
...
...
@@ -164,7 +165,10 @@
#define REPLACEIMAGE [UIImage imageNamed:@"bg-img 副本"]
/**
* 刷新购物车通知
*/
#define REFRESHSHOPPINGCAR @"GOODSNUMBER"
...
...
Lighting/Tools/PromptinformationView.h
0 → 100644
View file @
a4d5bbb3
//
// PromptinformationView.h
// Lighting
//
// Created by 曹云霄 on 16/5/19.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
PromptinformationView
:
UIView
/**
* 提示图片
*/
@property
(
weak
,
nonatomic
)
IBOutlet
UIImageView
*
tipsImage
;
/**
* 提示文本
*/
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
tipsTitle
;
@end
Lighting/Tools/PromptinformationView.m
0 → 100644
View file @
a4d5bbb3
//
// PromptinformationView.m
// Lighting
//
// Created by 曹云霄 on 16/5/19.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "PromptinformationView.h"
@implementation
PromptinformationView
@end
Lighting/Tools/PromptinformationView.xib
0 → 100644
View file @
a4d5bbb3
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"10116"
systemVersion=
"15E65"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
>
<dependencies>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"10085"
/>
</dependencies>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
/>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"-2"
customClass=
"UIResponder"
/>
<view
contentMode=
"scaleToFill"
id=
"iN0-l3-epB"
customClass=
"PromptinformationView"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"250"
height=
"170"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<subviews>
<imageView
userInteractionEnabled=
"NO"
contentMode=
"scaleToFill"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"ablum-副本"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"qMb-Xb-WTj"
>
<rect
key=
"frame"
x=
"75"
y=
"20"
width=
"100"
height=
"100"
/>
<constraints>
<constraint
firstAttribute=
"width"
constant=
"100"
id=
"EUY-t9-cPB"
/>
<constraint
firstAttribute=
"height"
constant=
"100"
id=
"HFH-CD-XOc"
/>
</constraints>
</imageView>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"暂无购物车信息~"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"LFz-XE-idb"
>
<rect
key=
"frame"
x=
"0.0"
y=
"149"
width=
"250"
height=
"21"
/>
<constraints>
<constraint
firstAttribute=
"height"
constant=
"21"
id=
"69o-Ap-cCk"
/>
<constraint
firstAttribute=
"width"
constant=
"250"
id=
"bcy-ai-4U1"
/>
</constraints>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"17"
/>
<color
key=
"textColor"
red=
"0.8666666666666667"
green=
"0.8666666666666667"
blue=
"0.8666666666666667"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
</label>
</subviews>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"calibratedWhite"
/>
<constraints>
<constraint
firstItem=
"qMb-Xb-WTj"
firstAttribute=
"top"
secondItem=
"iN0-l3-epB"
secondAttribute=
"top"
constant=
"20"
id=
"4CO-0a-rAb"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"LFz-XE-idb"
secondAttribute=
"trailing"
id=
"Ad4-Su-7RU"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"qMb-Xb-WTj"
secondAttribute=
"trailing"
constant=
"75"
id=
"Xcw-EJ-8KM"
/>
<constraint
firstItem=
"LFz-XE-idb"
firstAttribute=
"leading"
secondItem=
"iN0-l3-epB"
secondAttribute=
"leading"
id=
"lP9-GB-8CF"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"LFz-XE-idb"
secondAttribute=
"bottom"
id=
"rg3-BP-kwR"
/>
<constraint
firstItem=
"LFz-XE-idb"
firstAttribute=
"top"
secondItem=
"qMb-Xb-WTj"
secondAttribute=
"bottom"
constant=
"29"
id=
"z9u-cY-Swt"
/>
<constraint
firstItem=
"qMb-Xb-WTj"
firstAttribute=
"leading"
secondItem=
"iN0-l3-epB"
secondAttribute=
"leading"
constant=
"75"
id=
"znj-i0-nqz"
/>
</constraints>
<freeformSimulatedSizeMetrics
key=
"simulatedDestinationMetrics"
/>
<connections>
<outlet
property=
"tipsImage"
destination=
"qMb-Xb-WTj"
id=
"jB2-L2-1Cu"
/>
<outlet
property=
"tipsTitle"
destination=
"LFz-XE-idb"
id=
"gmc-UM-BsN"
/>
</connections>
<point
key=
"canvasLocation"
x=
"290"
y=
"231"
/>
</view>
</objects>
<resources>
<image
name=
"ablum-副本"
width=
"101"
height=
"104"
/>
</resources>
</document>
Lighting/Tools/weibo.png
deleted
100755 → 0
View file @
ff5c95b0
2.53 KB
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