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
5ca22764
Commit
5ca22764
authored
May 20, 2016
by
勾芒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
caoyunxiao
parent
eabd8a46
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
49 changed files
with
1717 additions
and
698 deletions
+1717
-698
ClientViewController.m
Lighting/Class/ClientViewController.m
+25
-5
ClientdetailsViewController.m
Lighting/Class/ClientdetailsViewController.m
+14
-2
CustomerOrderTableViewCell.h
Lighting/Class/CustomerOrderTableViewCell.h
+10
-0
CustomerOrderTableViewCell.m
Lighting/Class/CustomerOrderTableViewCell.m
+7
-0
FullScreenViewCell.h
Lighting/Class/FullScreenViewCell.h
+13
-0
FullScreenViewCell.m
Lighting/Class/FullScreenViewCell.m
+28
-0
FullScreenViewController.h
Lighting/Class/FullScreenViewController.h
+13
-0
FullScreenViewController.m
Lighting/Class/FullScreenViewController.m
+158
-0
OrderInformationTableViewCell.m
Lighting/Class/OrderInformationTableViewCell.m
+3
-2
OrderTableViewCell.h
Lighting/Class/OrderTableViewCell.h
+4
-0
OrderTableViewCell.m
Lighting/Class/OrderTableViewCell.m
+5
-2
OrderdetailsViewController.m
Lighting/Class/OrderdetailsViewController.m
+11
-8
PersonInformationTableViewCell.m
Lighting/Class/PersonInformationTableViewCell.m
+0
-1
ProductDetailsHeaderView.m
Lighting/Class/ProductDetailsHeaderView.m
+2
-0
ProductDetailsHeaderView.xib
Lighting/Class/ProductDetailsHeaderView.xib
+14
-15
ProductDetailsViewController.m
Lighting/Class/ProductDetailsViewController.m
+97
-20
ProductLibraryViewController.m
Lighting/Class/ProductLibraryViewController.m
+5
-6
SceneLibraryViewController.m
Lighting/Class/SceneLibraryViewController.m
+8
-2
SettlementViewController.h
Lighting/Class/SettlementViewController.h
+4
-1
SettlementViewController.m
Lighting/Class/SettlementViewController.m
+104
-18
SettlementViewController.xib
Lighting/Class/SettlementViewController.xib
+3
-3
GenerateOrdersViewController.m
Lighting/Class/Shoppingcart/GenerateOrdersViewController.m
+4
-3
ShoppingViewController.m
Lighting/Class/Shoppingcart/ShoppingViewController.m
+7
-0
CustomTabbarController.m
Lighting/Class/Tabbar/CustomTabbarController.m
+0
-2
Toolview.m
Lighting/Class/Tabbar/Toolview.m
+11
-2
goodsDetailsTableViewCell.h
Lighting/Class/goodsDetailsTableViewCell.h
+23
-0
goodsDetailsTableViewCell.m
Lighting/Class/goodsDetailsTableViewCell.m
+29
-0
goodsDetailsTableViewCell.xib
Lighting/Class/goodsDetailsTableViewCell.xib
+31
-0
project.pbxproj
Lighting/Lighting.xcodeproj/project.pbxproj
+36
-0
Contents.json
...ighting/Images.xcassets/animation1.imageset/Contents.json
+21
-0
animation1@2x.png
...ing/Images.xcassets/animation1.imageset/animation1@2x.png
+0
-0
Contents.json
...ighting/Images.xcassets/animation2.imageset/Contents.json
+21
-0
animation2@2x.png
...ing/Images.xcassets/animation2.imageset/animation2@2x.png
+0
-0
Contents.json
...ighting/Images.xcassets/animation3.imageset/Contents.json
+21
-0
animation3@2x.png
...ing/Images.xcassets/animation3.imageset/animation3@2x.png
+0
-0
Contents.json
...ighting/Images.xcassets/animation4.imageset/Contents.json
+21
-0
animation4@2x.png
...ing/Images.xcassets/animation4.imageset/animation4@2x.png
+0
-0
Contents.json
...ighting/Images.xcassets/animation5.imageset/Contents.json
+21
-0
animation5@2x.png
...ing/Images.xcassets/animation5.imageset/animation5@2x.png
+0
-0
StoryboardwithCYX.storyboard
Lighting/Lighting/StoryboardwithCYX.storyboard
+72
-35
Podfile.lock
Lighting/Podfile.lock
+6
-6
BaseViewController.h
Lighting/Tools/BaseViewController.h
+21
-2
BaseViewController.m
Lighting/Tools/BaseViewController.m
+122
-6
CustomButton.m
Lighting/Tools/CustomButton.m
+5
-5
MjRefreshHeaderCustom.h
Lighting/Tools/MjRefreshHeaderCustom.h
+13
-0
MjRefreshHeaderCustom.m
Lighting/Tools/MjRefreshHeaderCustom.m
+36
-0
PrefixHeader.pch
Lighting/Tools/PrefixHeader.pch
+2
-0
opple_objc_json_client.h
Lighting/Tools/opple_objc_json_client.h
+503
-418
opple_objc_json_client.m
Lighting/Tools/opple_objc_json_client.m
+163
-134
No files found.
Lighting/Class/ClientViewController.m
View file @
5ca22764
...
...
@@ -101,17 +101,19 @@
//下拉刷新
self
.
informationTableview
.
mj_header
=
[
MJRefreshNormalHeader
headerWithRefreshingBlock
:
^
{
MjRefreshHeaderCustom
*
headerRefresh
=
[
MjRefreshHeaderCustom
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
];
}];
headerRefresh
.
stateLabel
.
hidden
=
YES
;
headerRefresh
.
lastUpdatedTimeLabel
.
hidden
=
YES
;
self
.
informationTableview
.
mj_header
=
headerRefresh
;
//进入刷新状态
[
self
.
informationTableview
.
mj_header
beginRefreshing
];
//上拉加载
self
.
informationTableview
.
mj_footer
=
[
MJRefreshAutoNormalFooter
footerWithRefreshingBlock
:
^
{
...
...
@@ -255,10 +257,28 @@
[
Customermanager
manager
].
cutomerAddress
=
model
.
address
;
[
self
.
addpersonInformationButton
setTitle
:
@"退出当前客户"
forState
:
UIControlStateNormal
];
self
.
changePersonInformationButton
.
hidden
=
NO
;
[
self
SetupUserShoppingCarNumberRequest
];
[
self
SetupUserRequest
];
}
#pragma mark -设置为当前客户、查询购物车数量
-
(
void
)
SetupUserShoppingCarNumberRequest
{
[[
NetworkRequestClassManager
Manager
]
NetworkWithDictionaryRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@%@"
,
ServerAddress
,
@"/shopcart/get/"
,[
Customermanager
manager
].
customerID
]
WithRequestType
:
1
WithParameter
:
nil
WithReturnValueBlock
:^
(
id
returnValue
)
{
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
REFRESHSHOPPINGCAR
object
:
returnValue
[
@"data"
]];
}
}
WithErrorCodeBlock
:^
(
id
errorCodeValue
)
{
}
WithFailureBlock
:^
(
id
error
)
{
}];
}
#pragma mark -设置为当前用户请求、写入访问时间
-
(
void
)
SetupUserRequest
...
...
@@ -314,7 +334,7 @@
}
#pragma mark -添加客户信息请求 -新增、或者修改
#pragma mark -添加客户信息请求 -新增、或者修改
ischange为真是新增
-
(
void
)
addCustomerInformation
:
(
BOOL
)
isChange
{
[
self
.
view
endEditing
:
YES
];
...
...
Lighting/Class/ClientdetailsViewController.m
View file @
5ca22764
...
...
@@ -189,7 +189,7 @@
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
ShopCartResponse
*
shopcar
=
[[
ShopCartResponse
alloc
]
initWithDictionary
:
returnValue
[
@"data"
]
error
:
nil
];
if
(
shopcar
.
shopcart
.
count
==
0
)
{
[
self
PromptinformationViewWithimage
:
TCImage
(
@"ablum-副本"
)
withTitle
:
@"暂无购物袋信息~"
with
Frame
:
CGRectMake
(
200
,
200
,
250
,
170
)];
[
self
PromptinformationViewWithimage
:
TCImage
(
@"ablum-副本"
)
withTitle
:
@"暂无购物袋信息~"
with
point
:
CGPointMake
(
ScreenHeight
/
2
,
ScreenWidth
/
2
)];
}
//自定义属性
for
(
TOShopcartEntity
*
objc
in
shopcar
.
shopcart
)
{
...
...
@@ -289,7 +289,13 @@
sender
.
selected
=
YES
;
self
.
orderRecordButton
.
selected
=
NO
;
self
.
orderRecordButton
.
backgroundColor
=
kMainBlueColor
;
if
(
self
.
shopResponseArray
.
count
==
0
)
{
[
self
PromptinformationViewWithimage
:
TCImage
(
@"ablum-副本"
)
withTitle
:
@"暂无购物袋信息~"
withpoint
:
CGPointMake
(
ScreenHeight
/
2
,
ScreenWidth
/
2
)];
}
else
{
[
self
RemovePromptinformationView
];
}
[
self
.
ClientdetailsTableview
reloadData
];
}
...
...
@@ -301,6 +307,12 @@
sender
.
selected
=
YES
;
self
.
shoppingBagButton
.
selected
=
NO
;
self
.
shoppingBagButton
.
backgroundColor
=
kMainBlueColor
;
if
(
self
.
orderRecordArray
.
count
==
0
)
{
[
self
PromptinformationViewWithimage
:
TCImage
(
@"changjingtubiao"
)
withTitle
:
@"暂无购单订单~"
withpoint
:
CGPointMake
(
ScreenHeight
/
2
,
ScreenWidth
/
2
)];
}
else
{
[
self
RemovePromptinformationView
];
}
[
self
.
ClientdetailsTableview
reloadData
];
}
...
...
Lighting/Class/CustomerOrderTableViewCell.h
View file @
5ca22764
...
...
@@ -153,4 +153,14 @@
@property
(
nonatomic
,
assign
)
NSInteger
cellIndex
;
/**
* 订单状态图片
*/
@property
(
weak
,
nonatomic
)
IBOutlet
UIImageView
*
orderStateImageView
;
@end
Lighting/Class/CustomerOrderTableViewCell.m
View file @
5ca22764
...
...
@@ -55,6 +55,13 @@
}
self
.
orderTotalPrice
.
text
=
[
NSString
stringWithFormat
:
@"%ld"
,
goodsAllprice
];
//订单状态图片
self
.
orderStateImageView
.
image
=
[
BaseViewController
ReturnOrderStateImageWithStateCode
:[
_model
.
order
.
orderState
integerValue
]];
//订单状态文本
self
.
orderStatus
.
text
=
[
BaseViewController
ReturnOrderStateTitleWithStateCode
:[
_model
.
order
.
orderState
integerValue
]
withPoint
:
CGPointMake
(
self
.
orderStatus
.
frame
.
origin
.
x
,
self
.
orderStatus
.
frame
.
origin
.
y
)
WithCode
:
0
];
self
.
orderStatus
.
textColor
=
[
BaseViewController
ReturnOrderStateTitleWithStateCode
:[
_model
.
order
.
orderState
integerValue
]
withPoint
:
CGPointMake
(
self
.
orderStatus
.
frame
.
origin
.
x
,
self
.
orderStatus
.
frame
.
origin
.
y
)
WithCode
:
1
];
}
#pragma mark -时间转换NSDate转NSString
...
...
Lighting/Class/FullScreenViewCell.h
0 → 100644
View file @
5ca22764
//
// FullScreenViewCell.h
// Lighting
//
// Created by 曹云霄 on 16/5/20.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
FullScreenViewCell
:
UICollectionViewCell
@end
Lighting/Class/FullScreenViewCell.m
0 → 100644
View file @
5ca22764
//
// FullScreenViewCell.m
// Lighting
//
// Created by 曹云霄 on 16/5/20.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "FullScreenViewCell.h"
@implementation
FullScreenViewCell
-
(
instancetype
)
initWithFrame
:(
CGRect
)
frame
{
if
(
self
=
[
super
initWithFrame
:
frame
])
{
UIImageView
*
imageView
=
[[
UIImageView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
ScreenWidth
,
ScreenHeight
)];
imageView
.
image
=
TCImage
(
@"登录"
);
imageView
.
userInteractionEnabled
=
YES
;
[
self
.
contentView
addSubview
:
imageView
];
}
return
self
;
}
@end
Lighting/Class/FullScreenViewController.h
0 → 100644
View file @
5ca22764
//
// FullScreenViewController.h
// Lighting
//
// Created by 曹云霄 on 16/5/20.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
FullScreenViewController
:
UICollectionViewController
@end
Lighting/Class/FullScreenViewController.m
0 → 100644
View file @
5ca22764
//
// FullScreenViewController.m
// Lighting
//
// Created by 曹云霄 on 16/5/20.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "FullScreenViewController.h"
#import "FullScreenViewCell.h"
@interface
FullScreenViewController
()
/**
* 返回View
*/
@property
(
nonatomic
,
strong
)
UIView
*
backView
;
@end
@implementation
FullScreenViewController
static
NSString
*
const
reuseIdentifier
=
@"Cell"
;
#pragma mark -初始化
-
(
instancetype
)
init
{
// 创建一个流水布局
UICollectionViewFlowLayout
*
layout
=
[[
UICollectionViewFlowLayout
alloc
]
init
];
// 设置cell的尺寸
layout
.
itemSize
=
[
UIScreen
mainScreen
].
bounds
.
size
;
// 设置滚动的方向
layout
.
scrollDirection
=
UICollectionViewScrollDirectionHorizontal
;
// 行间距
layout
.
minimumLineSpacing
=
0
;
// 设置cell之间的间距
layout
.
minimumInteritemSpacing
=
0
;
//
// // 组间距
// layout.sectionInset = UIEdgeInsetsMake(100, 20, 0, 30);
return
[
super
initWithCollectionViewLayout
:
layout
];
}
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
[
self
uiConfigAction
];
[
self
CreateBackView
];
}
#pragma amrk 返回View
-
(
void
)
CreateBackView
{
self
.
backView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
ScreenWidth
,
64
)];
self
.
backView
.
backgroundColor
=
kMainGrayColor
;
[
self
.
view
addSubview
:
self
.
backView
];
//返回按钮
UIButton
*
backButton
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
backButton
.
frame
=
CGRectMake
(
50
,
0
,
100
,
64
);
[
backButton
setTitle
:
@"返回"
forState
:
UIControlStateNormal
];
[
backButton
addTarget
:
self
action
:
@selector
(
BackButtonClick
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
backView
addSubview
:
backButton
];
//随心配
}
#pragma mark -返回
-
(
void
)
BackButtonClick
{
[
self
dismissViewControllerAnimated
:
YES
completion
:
nil
];
}
#pragma mark -UI
-
(
void
)
uiConfigAction
{
self
.
collectionView
.
pagingEnabled
=
YES
;
[
self
.
collectionView
registerClass
:[
FullScreenViewCell
class
]
forCellWithReuseIdentifier
:
reuseIdentifier
];
}
#pragma mark <UICollectionViewDataSource>
-
(
NSInteger
)
collectionView
:
(
UICollectionView
*
)
collectionView
numberOfItemsInSection
:
(
NSInteger
)
section
{
return
10
;
}
-
(
UICollectionViewCell
*
)
collectionView
:
(
UICollectionView
*
)
collectionView
cellForItemAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
FullScreenViewCell
*
cell
=
[
collectionView
dequeueReusableCellWithReuseIdentifier
:
reuseIdentifier
forIndexPath
:
indexPath
];
return
cell
;
}
-
(
void
)
collectionView
:
(
UICollectionView
*
)
collectionView
didSelectItemAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
NSLog
(
@"%ld"
,
indexPath
.
item
);
}
#pragma mark <UICollectionViewDelegate>
/*
// Uncomment this method to specify if the specified item should be highlighted during tracking
- (BOOL)collectionView:(UICollectionView *)collectionView shouldHighlightItemAtIndexPath:(NSIndexPath *)indexPath {
return YES;
}
*/
/*
// Uncomment this method to specify if the specified item should be selected
- (BOOL)collectionView:(UICollectionView *)collectionView shouldSelectItemAtIndexPath:(NSIndexPath *)indexPath {
return YES;
}
*/
/*
// Uncomment these methods to specify if an action menu should be displayed for the specified item, and react to actions performed on the item
- (BOOL)collectionView:(UICollectionView *)collectionView shouldShowMenuForItemAtIndexPath:(NSIndexPath *)indexPath {
return NO;
}
- (BOOL)collectionView:(UICollectionView *)collectionView canPerformAction:(SEL)action forItemAtIndexPath:(NSIndexPath *)indexPath withSender:(id)sender {
return NO;
}
- (void)collectionView:(UICollectionView *)collectionView performAction:(SEL)action forItemAtIndexPath:(NSIndexPath *)indexPath withSender:(id)sender {
}
*/
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
// Dispose of any resources that can be recreated.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
Lighting/Class/OrderInformationTableViewCell.m
View file @
5ca22764
...
...
@@ -22,8 +22,9 @@
_model
=
model
;
self
.
orderNumber
.
text
=
_model
.
order
.
orderNumber
;
self
.
orderTime
.
text
=
[
self
dateAsString
:
_model
.
order
.
orderTime
];
self
.
orderStatus
.
text
=
_model
.
order
.
orderState
;
self
.
operatorName
.
text
=
_model
.
employee
.
userName
;
self
.
orderStatus
.
text
=
[
BaseViewController
ReturnOrderStateTitleWithStateCode
:[
_model
.
order
.
orderState
integerValue
]
withPoint
:
CGPointMake
(
self
.
orderStatus
.
frame
.
origin
.
x
,
self
.
orderStatus
.
frame
.
origin
.
y
)
WithCode
:
0
];
self
.
orderStatus
.
textColor
=
[
BaseViewController
ReturnOrderStateTitleWithStateCode
:[
_model
.
order
.
orderState
integerValue
]
withPoint
:
CGPointMake
(
self
.
orderStatus
.
frame
.
origin
.
x
,
self
.
orderStatus
.
frame
.
origin
.
y
)
WithCode
:
1
];
self
.
operatorName
.
text
=
_model
.
employee
.
realName
;
}
...
...
Lighting/Class/OrderTableViewCell.h
View file @
5ca22764
...
...
@@ -82,6 +82,10 @@
@property
(
nonatomic
,
strong
)
OrderBill
*
model
;
/**
* 订单状态展示
*/
@property
(
weak
,
nonatomic
)
IBOutlet
UIImageView
*
orderStateShowImageView
;
@end
Lighting/Class/OrderTableViewCell.m
View file @
5ca22764
...
...
@@ -44,9 +44,12 @@
self
.
orderAllprice
.
text
=
[
NSString
stringWithFormat
:
@"%ld"
,
allprice
];
self
.
customerAddress
.
text
=
_model
.
consumer
.
address
;
//订单状态图片
self
.
orderStateShowImageView
.
image
=
[
BaseViewController
ReturnOrderStateImageWithStateCode
:[
_model
.
order
.
orderState
integerValue
]];
//订单状态文本
self
.
orderState
.
text
=
[
BaseViewController
ReturnOrderStateTitleWithStateCode
:[
_model
.
order
.
orderState
integerValue
]
withPoint
:
CGPointMake
(
self
.
orderState
.
frame
.
origin
.
x
,
self
.
orderState
.
frame
.
origin
.
y
)
WithCode
:
0
];
self
.
orderState
.
textColor
=
[
BaseViewController
ReturnOrderStateTitleWithStateCode
:[
_model
.
order
.
orderState
integerValue
]
withPoint
:
CGPointMake
(
self
.
orderState
.
frame
.
origin
.
x
,
self
.
orderState
.
frame
.
origin
.
y
)
WithCode
:
1
];
}
...
...
Lighting/Class/OrderdetailsViewController.m
View file @
5ca22764
...
...
@@ -54,7 +54,7 @@
{
self
.
orderDetailsTableview
.
dataSource
=
self
;
self
.
orderDetailsTableview
.
delegate
=
self
;
[
self
CreateTableviewHeaderView
];
//
[self CreateTableviewHeaderView];
[
self
CreateTableviewFooterView
];
}
...
...
@@ -151,13 +151,19 @@
}
#pragma mark -调出支付框
-
(
void
)
PayButtonClick
{
SettlementViewController
*
settlement
=
[[
SettlementViewController
alloc
]
init
];
//支付成功
[
settlement
setPaySuccessReturnBlock
:
^
{
[
self
getOrderDetailsData
];
[
self
CreateTableviewHeaderView
];
self
.
orderDetailsTableview
.
tableFooterView
=
nil
;
}];
settlement
.
preferredContentSize
=
CGSizeMake
(
380
,
500
);
settlement
.
goodsArray
=
self
.
orderDetails
.
orderdetailList
;
settlement
.
orderCode
=
_orderCode
;
...
...
@@ -208,7 +214,6 @@
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
NSLog
(
@"%ld"
,
indexPath
.
section
);
switch
(
indexPath
.
section
)
{
case
0
:
//订单信息
{
...
...
@@ -238,6 +243,7 @@
//商品总计
AllpriceTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
@"sixthcell"
forIndexPath
:
indexPath
];
cell
.
goodsArray
=
self
.
orderDetails
.
orderdetailList
;
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
return
cell
;
}
else
...
...
@@ -256,6 +262,7 @@
AdditionalTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
@"fifthcell"
forIndexPath
:
indexPath
];
cell
.
model
=
self
.
orderDetails
.
order
;
return
cell
;
}
}
...
...
@@ -343,10 +350,6 @@
}
#pragma mark -打印订单
-
(
void
)
AirprintButtonClick
:
(
UIButton
*
)
button
{
...
...
Lighting/Class/PersonInformationTableViewCell.m
View file @
5ca22764
...
...
@@ -24,7 +24,6 @@
self
.
customerName
.
text
=
_model
.
name
;
[
self
.
customerHeader
sd_setImageWithURL
:[
NSURL
URLWithString
:
_model
.
picture
]
placeholderImage
:
ReplaceImage
];
self
.
customerNumbers
.
text
=
_model
.
mobile
;
}
...
...
Lighting/Class/ProductDetailsHeaderView.m
View file @
5ca22764
...
...
@@ -22,6 +22,8 @@
-
(
void
)
uiConfigAction
{
self
.
addGoodsShoppingbagsButton
.
layer
.
masksToBounds
=
YES
;
self
.
addGoodsShoppingbagsButton
.
layer
.
cornerRadius
=
kCornerRadius
;
[
self
.
addGoodsShoppingbagsButton
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
left
.
equalTo
(
self
.
inventoryLabe
);
...
...
Lighting/Class/ProductDetailsHeaderView.xib
View file @
5ca22764
...
...
@@ -18,11 +18,10 @@
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"350"
height=
"350"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
flexibleMaxX=
"YES"
heightSizable=
"YES"
/>
</imageView>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"roundedRect"
lineBreakMode=
"middleTruncation"
id=
"JMO-LV-nJ6"
>
<rect
key=
"frame"
x=
"2
83"
y=
"15"
width=
"46"
height=
"3
0"
/>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
lineBreakMode=
"middleTruncation"
id=
"JMO-LV-nJ6"
>
<rect
key=
"frame"
x=
"2
70"
y=
"0.0"
width=
"80"
height=
"8
0"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<color
key=
"backgroundColor"
red=
"1"
green=
"0.80664989730000003"
blue=
"0.42312353260000002"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<state
key=
"normal"
title=
"放大"
/>
<state
key=
"normal"
image=
"2"
/>
</button>
</subviews>
<color
key=
"backgroundColor"
red=
"0.9882352941176471"
green=
"0.97254901960784312"
blue=
"0.93725490196078431"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
...
...
@@ -30,12 +29,11 @@
<scrollView
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"scaleToFill"
id=
"tsa-PY-0mz"
>
<rect
key=
"frame"
x=
"383"
y=
"59"
width=
"80"
height=
"269"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<color
key=
"backgroundColor"
red=
"1"
green=
"0.70412693910000002"
blue=
"0.69044467629999995"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
</scrollView>
<view
contentMode=
"scaleToFill"
id=
"hq9-lr-unI"
>
<rect
key=
"frame"
x=
"487"
y=
"15"
width=
"1"
height=
"350"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<color
key=
"backgroundColor"
red=
"0.
0"
green=
"0.0"
blue=
"0.0
"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<color
key=
"backgroundColor"
red=
"0.
81960784313725488"
green=
"0.81960784313725488"
blue=
"0.81960784313725488
"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
</view>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"编号:"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"usf-4V-c8q"
>
<rect
key=
"frame"
x=
"514"
y=
"44"
width=
"56"
height=
"17"
/>
...
...
@@ -144,24 +142,22 @@
<textInputTraits
key=
"textInputTraits"
/>
</textField>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"roundedRect"
lineBreakMode=
"middleTruncation"
id=
"frs-v4-sgw"
>
<rect
key=
"frame"
x=
"514"
y=
"307"
width=
"229"
height=
"
35
"
/>
<rect
key=
"frame"
x=
"514"
y=
"307"
width=
"229"
height=
"
40
"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxX=
"YES"
flexibleMinY=
"YES"
flexibleMaxY=
"YES"
/>
<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>
</button>
<button
opaque=
"NO"
tag=
"101"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"roundedRect"
lineBreakMode=
"middleTruncation"
id=
"tM7-hf-9rp"
>
<rect
key=
"frame"
x=
"
408"
y=
"335"
width=
"30"
height=
"3
0"
/>
<button
opaque=
"NO"
tag=
"101"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
lineBreakMode=
"middleTruncation"
id=
"tM7-hf-9rp"
>
<rect
key=
"frame"
x=
"
398"
y=
"328"
width=
"50"
height=
"5
0"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxX=
"YES"
flexibleMinY=
"YES"
/>
<color
key=
"backgroundColor"
red=
"0.97647058819999999"
green=
"0.95686274510000002"
blue=
"0.94509803920000002"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<state
key=
"normal"
title=
"+"
/>
<state
key=
"normal"
image=
"down_arr"
/>
</button>
<button
opaque=
"NO"
tag=
"101"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"roundedRect"
lineBreakMode=
"middleTruncation"
id=
"0ee-HS-ilS"
>
<rect
key=
"frame"
x=
"
408"
y=
"21"
width=
"30"
height=
"3
0"
/>
<button
opaque=
"NO"
tag=
"101"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
lineBreakMode=
"middleTruncation"
id=
"0ee-HS-ilS"
>
<rect
key=
"frame"
x=
"
398"
y=
"9"
width=
"50"
height=
"5
0"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<color
key=
"backgroundColor"
red=
"0.97647058819999999"
green=
"0.95686274510000002"
blue=
"0.94509803920000002"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<state
key=
"normal"
title=
"-"
/>
<state
key=
"normal"
image=
"icon-2"
/>
</button>
</subviews>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"calibratedWhite"
/>
...
...
@@ -188,5 +184,8 @@
</objects>
<resources>
<image
name=
"140046029-MX260-D112-03-星冠-5700K(4)"
width=
"600"
height=
"450"
/>
<image
name=
"2"
width=
"45"
height=
"45"
/>
<image
name=
"down_arr"
width=
"22"
height=
"12"
/>
<image
name=
"icon-2"
width=
"25"
height=
"15"
/>
</resources>
</document>
Lighting/Class/ProductDetailsViewController.m
View file @
5ca22764
...
...
@@ -10,6 +10,8 @@
#import "ProductDetailsTableViewCell.h"
#import "ProductDetailsHeaderView.h"
#import "goodsDetailsSectionview.h"
#import "goodsDetailsTableViewCell.h"
#import "FullScreenViewController.h"
@interface
ProductDetailsViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
UITextFieldDelegate
>
...
...
@@ -20,10 +22,44 @@
*/
@property
(
nonatomic
,
strong
)
TOGoodsEntity
*
entity
;
/**
* 图文详情数据源
*/
@property
(
nonatomic
,
strong
)
NSMutableArray
*
goodsDetailsArray
;
/**
* 商品小图数据源
*/
@property
(
nonatomic
,
strong
)
NSMutableArray
*
imagesArray
;
@end
@implementation
ProductDetailsViewController
/**
* 初始化图文详情
*/
-
(
NSMutableArray
*
)
goodsDetailsArray
{
if
(
_goodsDetailsArray
==
nil
)
{
_goodsDetailsArray
=
[
NSMutableArray
array
];
}
return
_goodsDetailsArray
;
}
/**
* 商品小图数据源
*/
-
(
NSMutableArray
*
)
imagesArray
{
if
(
_imagesArray
==
nil
)
{
_imagesArray
=
[
NSMutableArray
array
];
}
return
_imagesArray
;
}
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
...
...
@@ -37,6 +73,7 @@
{
self
.
productDetilsTableview
.
dataSource
=
self
;
self
.
productDetilsTableview
.
delegate
=
self
;
[
self
.
productDetilsTableview
registerNib
:[
UINib
nibWithNibName
:
@"goodsDetailsTableViewCell"
bundle
:
nil
]
forCellReuseIdentifier
:
@"goodsdetailscell"
];
[
self
CreateHeaderView
];
}
...
...
@@ -54,7 +91,6 @@
self
.
entity
=
[[
TOGoodsEntity
alloc
]
initWithDictionary
:
returnValue
[
@"data"
]
error
:
nil
];
[
self
HeaderViewAssignment
];
[
self
.
productDetilsTableview
reloadData
];
}
else
{
...
...
@@ -82,6 +118,8 @@
//增加,减少商品
[
self
.
headerView
.
reduceButton
addTarget
:
self
action
:
@selector
(
reduceGoodsButtonClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
headerView
.
addButton
addTarget
:
self
action
:
@selector
(
reduceGoodsButtonClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
//放大
[
self
.
headerView
.
amplificationButton
addTarget
:
self
action
:
@selector
(
amplificationButtonClick
)
forControlEvents
:
UIControlEventTouchUpInside
];
self
.
productDetilsTableview
.
tableHeaderView
=
self
.
headerView
;
//添加至购物车
...
...
@@ -96,38 +134,83 @@
self
.
headerView
.
nameLabe
.
text
=
self
.
entity
.
name
;
self
.
headerView
.
brandName
.
text
=
self
.
entity
.
brandId
;
self
.
headerView
.
dorpPriceLabe
.
text
=
[
self
.
entity
.
tagPrice
stringValue
];
[
self
.
headerView
.
goodsImageview
sd_setImageWithURL
:[
NSURL
URLWithString
:
self
.
entity
.
pictures
]
placeholderImage
:
TCImage
(
@"140046029-MX260-D112-03-星冠-5700K(4)"
)];
self
.
imagesArray
=
[
NSMutableArray
arrayWithArray
:[
self
.
entity
.
pictures
componentsSeparatedByString
:
@","
]];
[
self
.
headerView
.
goodsImageview
sd_setImageWithURL
:[
self
.
imagesArray
firstObject
]
placeholderImage
:
REPLACEIMAGE
];
//商品小图
self
.
imagesArray
=
[
NSMutableArray
arrayWithArray
:[
self
.
entity
.
pictures
componentsSeparatedByString
:
@","
]];
for
(
int
i
=
0
;
i
<
self
.
imagesArray
.
count
;
i
++
)
{
UIImageView
*
subImageview
=
[[
UIImageView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
i
*
100
,
80
,
80
)];
subImageview
.
backgroundColor
=
[
UIColor
redColor
];
subImageview
.
tag
=
100
+
i
;
[
subImageview
sd_setImageWithURL
:[
NSURL
URLWithString
:[
self
.
imagesArray
objectAtIndex_opple
:
i
]]
placeholderImage
:
REPLACEIMAGE
];
[
subImageview
addGestureRecognizer
:[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
SubimageViewClickAction
:)]];
[
self
.
headerView
.
goodsBrotherScrollview
addSubview
:
subImageview
];
}
self
.
headerView
.
goodsBrotherScrollview
.
contentSize
=
CGSizeMake
(
0
,
self
.
imagesArray
.
count
*
100
);
self
.
headerView
.
goodsBrotherScrollview
.
showsVerticalScrollIndicator
=
NO
;
self
.
headerView
.
goodsBrotherScrollview
.
pagingEnabled
=
YES
;
self
.
headerView
.
goodsBrotherScrollview
.
userInteractionEnabled
=
YES
;
//图文大图
self
.
goodsDetailsArray
=
[
NSMutableArray
arrayWithArray
:[
self
.
entity
.
detailedIntro
componentsSeparatedByString
:
@","
]];
[
self
.
productDetilsTableview
reloadData
];
}
#pragma mark -小图点击手势
-
(
void
)
SubimageViewClickAction
:
(
UITapGestureRecognizer
*
)
tap
{
}
#pragma mark -图片放大点击
-
(
void
)
amplificationButtonClick
{
FullScreenViewController
*
fullScreenVC
=
[[
FullScreenViewController
alloc
]
init
];
[
self
presentViewController
:
fullScreenVC
animated
:
YES
completion
:
nil
];
}
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
ProductDetailsTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
@"productDetailscell"
forIndexPath
:
indexPath
];
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
cell
.
datas
=
self
.
entity
;
return
cell
;
if
(
indexPath
.
section
==
0
)
{
ProductDetailsTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
@"productDetailscell"
forIndexPath
:
indexPath
];
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
cell
.
datas
=
self
.
entity
;
return
cell
;
}
else
if
(
indexPath
.
section
==
1
)
{
goodsDetailsTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
@"goodsdetailscell"
forIndexPath
:
indexPath
];
[
cell
.
detailsImageView
sd_setImageWithURL
:[
NSURL
URLWithString
:[
self
.
goodsDetailsArray
objectAtIndex_opple
:
indexPath
.
row
]]
placeholderImage
:
REPLACEIMAGE
];
return
cell
;
}
return
nil
;
}
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
return
1
;
if
(
section
==
0
)
{
return
1
;
}
return
self
.
goodsDetailsArray
.
count
;
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
return
170
;
if
(
indexPath
.
section
==
0
)
{
return
170
;
}
return
ScreenWidth
;
}
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
tableView
{
return
1
;
return
2
;
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForHeaderInSection
:
(
NSInteger
)
section
...
...
@@ -140,7 +223,6 @@
goodsDetailsSectionview
*
sectionView
=
[[[
NSBundle
mainBundle
]
loadNibNamed
:
@"goodsDetailsSectionview"
owner
:
self
options
:
nil
]
firstObject
];
sectionView
.
goodSectionLabe
.
text
=
section
?
@"图文详情"
:
@"商品参数"
;
return
sectionView
;
}
...
...
@@ -160,7 +242,6 @@
}
goodsNumber
--
;
self
.
headerView
.
goodsNumber
.
text
=
[
NSString
stringWithFormat
:
@"%ld"
,(
long
)
goodsNumber
];
}
break
;
case
101
:
//增加
...
...
@@ -173,7 +254,6 @@
}
goodsNumber
++
;
self
.
headerView
.
goodsNumber
.
text
=
[
NSString
stringWithFormat
:
@"%ld"
,(
long
)
goodsNumber
];
}
break
;
...
...
@@ -275,7 +355,7 @@
-
(
void
)
animationDidStop
:
(
CAAnimation
*
)
anim
finished
:
(
BOOL
)
flag
{
NSLog
(
@"动画完成了"
);
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
REFRESHSHOPPINGCAR
object
:
@
([
self
.
headerView
.
goodsNumber
.
text
int
Value
])];
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
@"ADDGOODSNUMBER"
object
:
@
([
self
.
headerView
.
goodsNumber
.
text
integer
Value
])];
}
...
...
@@ -288,7 +368,7 @@
[
self
ErrorMBProgressView
:
@"必须设置当前客户"
];
return
;
}
[
self
StartAddShoppingCarAnimationWithimage
:
TCImage
(
@"欧"
)
withStartpoint
:[
self
.
v
iew
convertPoint
:[
button
center
]
toView
:
self
.
view
.
window
]];
[
self
StartAddShoppingCarAnimationWithimage
:
TCImage
(
@"欧"
)
withStartpoint
:[
self
.
headerV
iew
convertPoint
:[
button
center
]
toView
:
self
.
view
.
window
]];
SaveShoppingCartRequest
*
shopCar
=
[[
SaveShoppingCartRequest
alloc
]
init
];
shopCar
.
consumerId
=
[[
Customermanager
manager
]
customerID
];
shopCar
.
goodsId
=
_goodsID
;
...
...
@@ -297,10 +377,7 @@
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
[
self
SuccessMBProgressView
:
@"加入购物车成功"
];
//刷新购物车
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
REFRESHSHOPPINGCAR
object
:
returnValue
[
@"data"
]];
NSLog
(
@"添加购物车成功"
);
}
else
{
[
self
ErrorMBProgressView
:
returnValue
[
@"message"
]];
...
...
Lighting/Class/ProductLibraryViewController.m
View file @
5ca22764
...
...
@@ -328,7 +328,9 @@
-
(
UICollectionViewCell
*
)
collectionView
:
(
UICollectionView
*
)
collectionView
cellForItemAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
ProductCollectionViewCell
*
cell
=
[
collectionView
dequeueReusableCellWithReuseIdentifier
:
@"productcell"
forIndexPath
:
indexPath
];
[
cell
.
productImageView
sd_setImageWithURL
:[
NSURL
URLWithString
:[[
self
.
datasArray
objectAtIndex_opple
:
indexPath
.
row
]
pictures
]]
placeholderImage
:
REPLACEIMAGE
];
NSArray
*
imageArray
=
[[[
self
.
datasArray
objectAtIndex_opple
:
indexPath
.
item
]
pictures
]
componentsSeparatedByString
:
@","
];
[
cell
.
productImageView
sd_setImageWithURL
:[
NSURL
URLWithString
:[
imageArray
firstObject
]]
placeholderImage
:
REPLACEIMAGE
];
cell
.
productPrice
.
text
=
[
NSString
stringWithFormat
:
@"¥%@"
,[[[
self
.
datasArray
objectAtIndex_opple
:
indexPath
.
item
]
guidePrice
]
stringValue
]];
cell
.
cellindex
=
indexPath
.
item
;
//加入购物车
__weak
typeof
(
self
)
weakSelf
=
self
;
...
...
@@ -400,16 +402,14 @@
-
(
void
)
animationDidStop
:
(
CAAnimation
*
)
anim
finished
:
(
BOOL
)
flag
{
NSLog
(
@"动画完成了"
);
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
REFRESHSHOPPINGCAR
object
:
@
(
1
)];
[[
NSNotificationCenter
defaultCenter
]
postNotificationName
:
@"ADDGOODSNUMBER"
object
:
@
(
1
)];
}
-
(
NSInteger
)
collectionView
:
(
UICollectionView
*
)
collectionView
numberOfItemsInSection
:
(
NSInteger
)
section
{
return
20
;
return
self
.
datasArray
.
count
;
}
-
(
void
)
collectionView
:
(
UICollectionView
*
)
collectionView
didSelectItemAtIndexPath
:
(
NSIndexPath
*
)
indexPath
...
...
@@ -653,7 +653,6 @@
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
();
...
...
Lighting/Class/SceneLibraryViewController.m
View file @
5ca22764
...
...
@@ -8,7 +8,7 @@
#import "SceneLibraryViewController.h"
#import "SeceneLibraryCollectionViewCell.h"
#import "FullScreenViewController.h"
@interface
SceneLibraryViewController
()
<
UICollectionViewDelegate
,
UICollectionViewDataSource
,
ReturnTableviewcellIndexpathdelegate
>
...
...
@@ -188,7 +188,6 @@
}
-
(
UICollectionViewCell
*
)
collectionView
:
(
UICollectionView
*
)
collectionView
cellForItemAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
SeceneLibraryCollectionViewCell
*
cell
=
[
collectionView
dequeueReusableCellWithReuseIdentifier
:
@"secenelibrary"
forIndexPath
:
indexPath
];
...
...
@@ -201,6 +200,13 @@
return
self
.
responseArray
.
count
;
}
-
(
void
)
collectionView
:
(
UICollectionView
*
)
collectionView
didSelectItemAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
FullScreenViewController
*
fullScreenVC
=
[[
FullScreenViewController
alloc
]
init
];
[
self
presentViewController
:
fullScreenVC
animated
:
YES
completion
:
nil
];
}
#pragma mark -切换显示风格
-
(
IBAction
)
SwitchdisplayStyleClick
:
(
UIButton
*
)
sender
{
...
...
Lighting/Class/SettlementViewController.h
View file @
5ca22764
...
...
@@ -109,7 +109,10 @@
@property
(
nonatomic
,
copy
)
NSString
*
orderCode
;
/**
* 支付成功回调
*/
@property
(
nonatomic
,
copy
)
void
(
^
PaySuccessReturnBlock
)();
...
...
Lighting/Class/SettlementViewController.m
View file @
5ca22764
...
...
@@ -18,6 +18,8 @@
[
super
viewDidLoad
];
[
self
uiConfigAction
];
[
self
setGoodsArray
];
[
self
getPayQrCode
];
}
...
...
@@ -52,10 +54,8 @@
#pragma mark -支付总金额,商品总数量
-
(
void
)
setGoodsArray
:
(
NSArray
*
)
goodsArray
-
(
void
)
setGoodsArray
{
_goodsArray
=
goodsArray
;
NSInteger
goodsAllNumber
=
0
;
//总数量
NSInteger
goodAllprice
=
0
;
//总价格
for
(
TOOrderdetailEntity
*
model
in
_goodsArray
)
{
...
...
@@ -67,6 +67,19 @@
}
#pragma mark -获取经营者支付二维码
-
(
void
)
getPayQrCode
{
[[
NetworkRequestClassManager
Manager
]
NetworkWithDictionaryRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/employee/getReseller"
]
WithRequestType
:
1
WithParameter
:
nil
WithReturnValueBlock
:^
(
id
returnValue
)
{
NSLog
(
@"%@"
,
returnValue
);
}
WithErrorCodeBlock
:^
(
id
errorCodeValue
)
{
}
WithFailureBlock
:^
(
id
error
)
{
NSLog
(
@"%@"
,
error
);
}];
}
-
(
void
)
viewWillAppear
:
(
BOOL
)
animated
...
...
@@ -86,14 +99,22 @@
#pragma mark -确认支付
-
(
IBAction
)
SureButtonClick
:
(
UIButton
*
)
sender
{
[
self
SurePayRequest
];
if
([
self
.
payTypeButton
.
currentTitle
isEqualToString
:
@"现金、支票、转账、刷卡"
]
&&
!
self
.
payTreasureButton
.
selected
&&
!
self
.
WeixiPayButton
.
selected
)
{
[
self
ErrorMBProgressView
:
@"请选择一种支付方式"
];
}
else
if
([
self
.
invoiceType
.
currentTitle
isEqualToString
:
@"公司发票"
]
&&
self
.
invoiceHeader
.
text
.
length
==
0
)
{
[
self
ErrorMBProgressView
:
@"请输入发票抬头"
];
}
else
{
[
self
SurePayRequest
];
}
}
#pragma amrk -支付方式选择
-
(
IBAction
)
payTypeButtonClick
:
(
UIButton
*
)
sender
{
NSArray
*
arr
=
@[
@"现金"
,
@"支票"
,
@"转账"
];
NSArray
*
arr
=
@[
@"现金"
,
@"支票"
,
@"转账"
,
@"刷卡"
];
[
self
ShowPopoverViewController
:
CGSizeMake
(
100
,
200
)
Withdatas
:
arr
ShowButton
:
sender
SelectedIndex
:
0
GetTitle
:
YES
];
}
...
...
@@ -104,7 +125,7 @@
if
(
sender
.
selected
)
{
self
.
payTreasureButton
.
selected
=
NO
;
[
self
.
payTypeButton
setTitle
:
@"现金、支票、转账"
forState
:
UIControlStateNormal
];
[
self
.
payTypeButton
setTitle
:
@"现金、支票、转账
、刷卡
"
forState
:
UIControlStateNormal
];
}
}
...
...
@@ -116,15 +137,11 @@
if
(
sender
.
selected
)
{
self
.
WeixiPayButton
.
selected
=
NO
;
[
self
.
payTypeButton
setTitle
:
@"现金、支票、转账"
forState
:
UIControlStateNormal
];
[
self
.
payTypeButton
setTitle
:
@"现金、支票、转账
、刷卡
"
forState
:
UIControlStateNormal
];
}
}
#pragma mark -是否开票
-
(
IBAction
)
isinvoiceButtonClick
:
(
UIButton
*
)
sender
{
...
...
@@ -175,6 +192,8 @@
case
0
:
//支付方式
{
[
self
.
payTypeButton
setTitle
:
title
forState
:
UIControlStateNormal
];
self
.
payTreasureButton
.
selected
=
NO
;
self
.
WeixiPayButton
.
selected
=
NO
;
}
break
;
case
1
:
//是否开票
...
...
@@ -198,22 +217,89 @@
#pragma mark -确认支付请求
-
(
void
)
SurePayRequest
{
NSString
*
string
=
[
NSString
stringWithFormat
:
@"%@%@%@/%@/%@/%@/%@"
,
ServerAddress
,
@"/order/payOrder/"
,
_orderCode
,[
self
ReturnUrlString
:
self
.
payTypeButton
.
currentTitle
],[
self
ReturnUrlString
:
self
.
ISinvoiceButton
.
currentTitle
],[
self
ReturnUrlString
:
self
.
invoiceType
.
currentTitle
],[
self
ReturnUrlString
:
self
.
invoiceHeader
.
text
]];
[[
NetworkRequestClassManager
Manager
]
NetworkWithDictionaryRequestWithURL
:
string
WithRequestType
:
1
WithParameter
:
nil
WithReturnValueBlock
:^
(
id
returnValue
)
{
OrderPayRequest
*
order
=
[[
OrderPayRequest
alloc
]
init
];
order
.
isbill
=
self
.
ISinvoiceButton
.
currentTitle
;
order
.
orderNumber
=
_orderCode
;
order
.
fnewstate
=
@"002"
;
order
.
oldstate
=
@"001"
;
//支付类型
if
(
self
.
payTreasureButton
.
selected
)
{
NSLog
(
@"%@"
,
returnValue
)
;
order
.
payType
=
@"005"
;
}
WithErrorCodeBlock
:^
(
id
errorCodeValue
)
{
}
else
if
(
self
.
WeixiPayButton
.
selected
)
{
order
.
payType
=
@"006"
;
}
else
{
order
.
payType
=
[
self
PayTypeSelected
:
self
.
payTypeButton
.
currentTitle
];
}
//是否开票
if
([
self
.
ISinvoiceButton
.
currentTitle
isEqualToString
:
@"是"
])
{
order
.
isbill
=
@"001"
;
}
else
if
([
self
.
ISinvoiceButton
.
currentTitle
isEqualToString
:
@"否"
]){
order
.
isbill
=
@"002"
;
}
//发票类型
if
([
self
.
invoiceType
.
currentTitle
isEqualToString
:
@"公司发票"
])
{
order
.
billType
=
@"001"
;
}
WithFailureBlock
:^
(
id
error
)
{
}
else
if
([
self
.
invoiceType
.
currentTitle
isEqualToString
:
@"个人发票"
])
{
order
.
billType
=
@"002"
;
}
[
self
CreateMBProgressHUDLoding
];
[[
NetworkRequestClassManager
Manager
]
NetworkRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/order/payOrder"
]
WithRequestType
:
0
WithParameter
:
order
WithReturnValueBlock
:^
(
id
returnValue
)
{
NSLog
(
@"%@"
,
error
);
[
self
CreateMBProgressHUDLoding
];
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
NSLog
(
@"支付成功"
);
if
(
self
.
PaySuccessReturnBlock
)
{
self
.
PaySuccessReturnBlock
();
}
[
self
dismissViewControllerAnimated
:
YES
completion
:
nil
];
}
}
WithErrorCodeBlock
:^
(
id
errorCodeValue
)
{
}
WithFailureBlock
:^
(
id
error
)
{
NSLog
(
@"支付失败"
);
[
self
CreateMBProgressHUDLoding
];
}];
}
#pragma mark -支付方式选择
-
(
NSString
*
)
PayTypeSelected
:
(
NSString
*
)
selecte
{
NSString
*
payCode
=
nil
;
if
([
selecte
isEqualToString
:
@"现金"
])
{
return
payCode
=
@"001"
;
}
if
([
selecte
isEqualToString
:
@"刷卡"
])
{
return
payCode
=
@"002"
;
}
if
([
selecte
isEqualToString
:
@"转账"
])
{
return
payCode
=
@"003"
;
}
if
([
selecte
isEqualToString
:
@"支票"
])
{
return
payCode
=
@"004"
;
}
return
nil
;
}
//@synthesize orderNumber;
//@synthesize oldstate;
//@synthesize fnewstate;
//@synthesize payType;
//@synthesize isbill;
//@synthesize billType;
//@synthesize billTitle;
#pragma mark -汉字转码
-
(
NSString
*
)
ReturnUrlString
:
(
NSString
*
)
ChineseString
{
...
...
Lighting/Class/SettlementViewController.xib
View file @
5ca22764
...
...
@@ -171,7 +171,7 @@
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"12"
/>
<inset
key=
"titleEdgeInsets"
minX=
"-50"
minY=
"0.0"
maxX=
"50"
maxY=
"0.0"
/>
<inset
key=
"imageEdgeInsets"
minX=
"120"
minY=
"6"
maxX=
"0.0"
maxY=
"5"
/>
<state
key=
"normal"
title=
"
普通
发票"
image=
"down_arr"
>
<state
key=
"normal"
title=
"
个人
发票"
image=
"down_arr"
>
<color
key=
"titleColor"
white=
"0.66666666666666663"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
</state>
<connections>
...
...
@@ -210,10 +210,10 @@
<rect
key=
"frame"
x=
"83"
y=
"140"
width=
"160"
height=
"30"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<color
key=
"backgroundColor"
red=
"0.93333333333333335"
green=
"0.93333333333333335"
blue=
"0.93333333333333335"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"1
2
"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"1
0
"
/>
<inset
key=
"titleEdgeInsets"
minX=
"-50"
minY=
"0.0"
maxX=
"0.0"
maxY=
"0.0"
/>
<inset
key=
"imageEdgeInsets"
minX=
"120"
minY=
"6"
maxX=
"0.0"
maxY=
"5"
/>
<state
key=
"normal"
title=
"现金、支票、转账"
image=
"down_arr"
>
<state
key=
"normal"
title=
"现金、支票、转账
、刷卡
"
image=
"down_arr"
>
<color
key=
"titleColor"
white=
"0.66666666666666663"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
</state>
<connections>
...
...
Lighting/Class/Shoppingcart/GenerateOrdersViewController.m
View file @
5ca22764
...
...
@@ -352,7 +352,6 @@
orderReceiver
.
receiverName
=
model
.
name
;
orderReceiver
.
receiverMobile
=
model
.
miblephone
;
orderReceiver
.
receiverAddress
=
model
.
address
;
order
.
order
=
orderReceiver
;
orderReceiver
.
guideId
=
[[
Shoppersmanager
manager
]
Shoppers
].
employee
.
fid
;
orderReceiver
.
consumerId
=
[[
Customermanager
manager
]
customerID
];
...
...
@@ -371,15 +370,17 @@
orderGoods
.
goodsBrand
=
model
.
goods
.
brandId
;
orderGoods
.
goodsNum
=
model
.
goods
.
number
;
orderGoods
.
goodsPrice
=
model
.
goods
.
costPrice
;
orderGoods
.
remark
=
@" "
;
orderGoods
.
remark
=
model
.
goods
.
spec
;
orderGoods
.
goodsUnit
=
model
.
goods
.
unit
;
//总价
NSInteger
allprice
=
[
model
.
goods
.
number
integerValue
]
*
[
model
.
goods
.
costPrice
integerValue
];
orderGoods
.
goodsTotalPrice
=
[
NSNumber
numberWithInteger
:
allprice
];
orderReceiver
.
orderPrice
=
[
NSNumber
numberWithInteger
:
allprice
];
[
goodidArr
addObject
:
orderGoods
];
}
order
.
orderdetailList
=
goodidArr
;
order
.
orderdetailList
=
(
NSArray
<
TOOrderdetailEntity
>
*
)
goodidArr
;
[
self
CreateMBProgressHUDLoding
];
[[
NetworkRequestClassManager
Manager
]
NetworkRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/order/save"
]
WithRequestType
:
0
WithParameter
:
order
WithReturnValueBlock
:^
(
id
returnValue
)
{
[
self
RemoveMBProgressHUDLoding
];
...
...
Lighting/Class/Shoppingcart/ShoppingViewController.m
View file @
5ca22764
...
...
@@ -352,6 +352,13 @@
}
#pragma mark -在服务器保存更改后的成交价和数量
-
(
void
)
ServerRequestForChangePriceAndNumber
{
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
// Dispose of any resources that can be recreated.
...
...
Lighting/Class/Tabbar/CustomTabbarController.m
View file @
5ca22764
...
...
@@ -51,8 +51,6 @@
}
-
(
void
)
viewWillAppear
:
(
BOOL
)
animated
{
[
super
viewWillAppear
:
animated
];
...
...
Lighting/Class/Tabbar/Toolview.m
View file @
5ca22764
...
...
@@ -106,19 +106,28 @@
// 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
:
REFRESHSHOPPINGCAR
object
:
nil
];
//刷新购物车数量、加1
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
AddGoodsNumber
:
)
name
:
@"ADDGOODSNUMBER"
object
:
nil
];
}
#pragma mark -刷新购物车显示数量
-
(
void
)
refreshGoodsNumber
:
(
NSNotification
*
)
objc
{
CustomButton
*
button
=
(
CustomButton
*
)[
self
viewWithTag
:
103
];
button
.
instructionsNumber
=
[
objc
.
object
integerValue
];
}
#pragma mark -增加购物车数量
-
(
void
)
AddGoodsNumber
:
(
NSNotification
*
)
objc
{
CustomButton
*
button
=
(
CustomButton
*
)[
self
viewWithTag
:
103
];
button
.
instructionsNumber
+=
[
objc
.
object
integerValue
];
}
#pragma mark -二维码扫描码
-
(
void
)
QrCodeButtonClickAction
{
...
...
Lighting/Class/goodsDetailsTableViewCell.h
0 → 100644
View file @
5ca22764
//
// goodsDetailsTableViewCell.h
// Lighting
//
// Created by 曹云霄 on 16/5/20.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
goodsDetailsTableViewCell
:
UITableViewCell
/**
* 图文详情图片
*/
@property
(
weak
,
nonatomic
)
IBOutlet
UIImageView
*
detailsImageView
;
@end
Lighting/Class/goodsDetailsTableViewCell.m
0 → 100644
View file @
5ca22764
//
// goodsDetailsTableViewCell.m
// Lighting
//
// Created by 曹云霄 on 16/5/20.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "goodsDetailsTableViewCell.h"
@implementation
goodsDetailsTableViewCell
-
(
void
)
awakeFromNib
{
}
-
(
void
)
setSelected
:
(
BOOL
)
selected
animated
:
(
BOOL
)
animated
{
[
super
setSelected
:
selected
animated
:
animated
];
// Configure the view for the selected state
}
@end
Lighting/Class/goodsDetailsTableViewCell.xib
0 → 100644
View file @
5ca22764
<?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=
"goodsDetailsTableViewCell"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"404"
height=
"313"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<subviews>
<imageView
userInteractionEnabled=
"NO"
contentMode=
"scaleToFill"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"nba-EH-qKU"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"404"
height=
"313"
/>
</imageView>
</subviews>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"calibratedWhite"
/>
<constraints>
<constraint
firstItem=
"nba-EH-qKU"
firstAttribute=
"top"
secondItem=
"iN0-l3-epB"
secondAttribute=
"top"
id=
"6xg-aF-jPw"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"nba-EH-qKU"
secondAttribute=
"trailing"
id=
"BH1-Ap-kHf"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"nba-EH-qKU"
secondAttribute=
"bottom"
id=
"lsj-jc-B13"
/>
<constraint
firstItem=
"nba-EH-qKU"
firstAttribute=
"leading"
secondItem=
"iN0-l3-epB"
secondAttribute=
"leading"
id=
"rJR-Id-0Gr"
/>
</constraints>
<freeformSimulatedSizeMetrics
key=
"simulatedDestinationMetrics"
/>
<connections>
<outlet
property=
"detailsImageView"
destination=
"nba-EH-qKU"
id=
"bpa-0Q-z3Q"
/>
</connections>
<point
key=
"canvasLocation"
x=
"368"
y=
"370.5"
/>
</view>
</objects>
</document>
Lighting/Lighting.xcodeproj/project.pbxproj
View file @
5ca22764
...
...
@@ -98,6 +98,11 @@
29C584ED1CDA429500C6F677
/* ProductDetailsViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29C584EC1CDA429500C6F677
/* ProductDetailsViewController.m */
;
};
29CB70F11CEC4607003508BF
/* ScannerViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29CB70EF1CEC4607003508BF
/* ScannerViewController.m */
;
};
29CB70F21CEC4607003508BF
/* ScannerViewController.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29CB70F01CEC4607003508BF
/* ScannerViewController.xib */
;
};
29D260F51CEEAE2800A9787D
/* FullScreenViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29D260F41CEEAE2800A9787D
/* FullScreenViewController.m */
;
};
29D260F81CEEAF2D00A9787D
/* FullScreenViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29D260F71CEEAF2D00A9787D
/* FullScreenViewCell.m */
;
};
29D260FB1CEECDFF00A9787D
/* goodsDetailsTableViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29D260FA1CEECDFF00A9787D
/* goodsDetailsTableViewCell.m */
;
};
29D260FD1CEED53400A9787D
/* goodsDetailsTableViewCell.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29D260FC1CEED53400A9787D
/* goodsDetailsTableViewCell.xib */
;
};
29D261001CEEF16D00A9787D
/* MjRefreshHeaderCustom.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29D260FF1CEEF16D00A9787D
/* MjRefreshHeaderCustom.m */
;
};
29E28CE81CE0B91B00812A55
/* HENLENSONG.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29E28CE71CE0B91B00812A55
/* HENLENSONG.m */
;
};
29E384BE1CE9933300888199
/* AdditionalTableViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29E384BC1CE9933300888199
/* AdditionalTableViewCell.m */
;
};
29E384BF1CE9933300888199
/* AdditionalTableViewCell.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29E384BD1CE9933300888199
/* AdditionalTableViewCell.xib */
;
};
...
...
@@ -288,6 +293,15 @@
29CB70EE1CEC4607003508BF
/* ScannerViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ScannerViewController.h
;
sourceTree
=
"<group>"
;
};
29CB70EF1CEC4607003508BF
/* ScannerViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ScannerViewController.m
;
sourceTree
=
"<group>"
;
};
29CB70F01CEC4607003508BF
/* ScannerViewController.xib */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
file.xib
;
path
=
ScannerViewController.xib
;
sourceTree
=
"<group>"
;
};
29D260F31CEEAE2800A9787D
/* FullScreenViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
FullScreenViewController.h
;
sourceTree
=
"<group>"
;
};
29D260F41CEEAE2800A9787D
/* FullScreenViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
FullScreenViewController.m
;
sourceTree
=
"<group>"
;
};
29D260F61CEEAF2D00A9787D
/* FullScreenViewCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
FullScreenViewCell.h
;
sourceTree
=
"<group>"
;
};
29D260F71CEEAF2D00A9787D
/* FullScreenViewCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
FullScreenViewCell.m
;
sourceTree
=
"<group>"
;
};
29D260F91CEECDFF00A9787D
/* goodsDetailsTableViewCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
goodsDetailsTableViewCell.h
;
sourceTree
=
"<group>"
;
};
29D260FA1CEECDFF00A9787D
/* goodsDetailsTableViewCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
goodsDetailsTableViewCell.m
;
sourceTree
=
"<group>"
;
};
29D260FC1CEED53400A9787D
/* goodsDetailsTableViewCell.xib */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
file.xib
;
path
=
goodsDetailsTableViewCell.xib
;
sourceTree
=
"<group>"
;
};
29D260FE1CEEF16D00A9787D
/* MjRefreshHeaderCustom.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
MjRefreshHeaderCustom.h
;
sourceTree
=
"<group>"
;
};
29D260FF1CEEF16D00A9787D
/* MjRefreshHeaderCustom.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
MjRefreshHeaderCustom.m
;
sourceTree
=
"<group>"
;
};
29E28CE61CE0B91B00812A55
/* HENLENSONG.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
HENLENSONG.h
;
sourceTree
=
"<group>"
;
};
29E28CE71CE0B91B00812A55
/* HENLENSONG.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
HENLENSONG.m
;
sourceTree
=
"<group>"
;
};
29E384BB1CE9933300888199
/* AdditionalTableViewCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
AdditionalTableViewCell.h
;
sourceTree
=
"<group>"
;
};
...
...
@@ -484,6 +498,7 @@
2928F7DD1CD085430036D761
/* Class */
=
{
isa
=
PBXGroup
;
children
=
(
29D260EF1CEEAA5000A9787D
/* FullScreen */
,
29CF6B791CEC433900D4A778
/* ScannerVC */
,
29E384C01CE9A68F00888199
/* SearchController */
,
29834EC11CDF768C001A484F
/* XXuserController */
,
...
...
@@ -516,6 +531,8 @@
2928F8351CD09E500036D761
/* CustomButton */
,
2928F7E41CD087C20036D761
/* parentclass */
,
2928F7E31CD087B60036D761
/* pch */
,
29D260FE1CEEF16D00A9787D
/* MjRefreshHeaderCustom.h */
,
29D260FF1CEEF16D00A9787D
/* MjRefreshHeaderCustom.m */
,
);
path
=
Tools
;
sourceTree
=
"<group>"
;
...
...
@@ -990,6 +1007,9 @@
29A938231CDAE31200F21E54
/* ProductDetailsHeaderView.h */
,
29A938241CDAE31200F21E54
/* ProductDetailsHeaderView.m */
,
29A938261CDAE31B00F21E54
/* ProductDetailsHeaderView.xib */
,
29D260F91CEECDFF00A9787D
/* goodsDetailsTableViewCell.h */
,
29D260FA1CEECDFF00A9787D
/* goodsDetailsTableViewCell.m */
,
29D260FC1CEED53400A9787D
/* goodsDetailsTableViewCell.xib */
,
2992493E1CDB4D1D00786B1E
/* AddaddressViewController.h */
,
2992493F1CDB4D1D00786B1E
/* AddaddressViewController.m */
,
29360C2D1CDDC47E002A5D89
/* ScreeningView.h */
,
...
...
@@ -1014,6 +1034,17 @@
name
=
ScannerVC
;
sourceTree
=
"<group>"
;
};
29D260EF1CEEAA5000A9787D
/* FullScreen */
=
{
isa
=
PBXGroup
;
children
=
(
29D260F31CEEAE2800A9787D
/* FullScreenViewController.h */
,
29D260F41CEEAE2800A9787D
/* FullScreenViewController.m */
,
29D260F61CEEAF2D00A9787D
/* FullScreenViewCell.h */
,
29D260F71CEEAF2D00A9787D
/* FullScreenViewCell.m */
,
);
name
=
FullScreen
;
sourceTree
=
"<group>"
;
};
29E28CE51CE0B90600812A55
/* Regularexpressions */
=
{
isa
=
PBXGroup
;
children
=
(
...
...
@@ -1251,6 +1282,7 @@
29706DB71CD082990003C412
/* LaunchScreen.storyboard in Resources */
,
29698D621CE2C11500D72CE7
/* SettlementViewController.xib in Resources */
,
29BFBD911CE44BC200C238FB
/* goodsDetailsSectionview.xib in Resources */
,
29D260FD1CEED53400A9787D
/* goodsDetailsTableViewCell.xib in Resources */
,
29807C621CD20C2A00F111B8
/* Images.xcassets in Resources */
,
29834EB61CDF1EB6001A484F
/* screeningSecondView.xib in Resources */
,
299249461CDB51C800786B1E
/* ModifyShippingAddressView.xib in Resources */
,
...
...
@@ -1334,10 +1366,12 @@
2928F8381CD09E730036D761
/* CustomButton.m in Sources */
,
0470D6111CE2936000647F0F
/* SeceneLibraryView.m in Sources */
,
293393551CD3379E000D997B
/* ShoppingTableViewCell.m in Sources */
,
29D260F51CEEAE2800A9787D
/* FullScreenViewController.m in Sources */
,
2985AEA31CE72F1500704C91
/* NSObject+ZXPUnicode.m in Sources */
,
29EAAE951CDC414C00C4DBA2
/* SeceneLibraryCollectionViewCell.m in Sources */
,
060D397C1CE45CFE0082AECD
/* ImageCropperView.m in Sources */
,
2949BAC21CD3055A0049385A
/* MMExampleDrawerVisualStateManager.m in Sources */
,
29D261001CEEF16D00A9787D
/* MjRefreshHeaderCustom.m in Sources */
,
292A14311CE81D1D00EB4430
/* AddressModel.m in Sources */
,
29A938221CDADE4700F21E54
/* ProductDetailsTableViewCell.m in Sources */
,
29E384BE1CE9933300888199
/* AdditionalTableViewCell.m in Sources */
,
...
...
@@ -1381,6 +1415,7 @@
29A938251CDAE31200F21E54
/* ProductDetailsHeaderView.m in Sources */
,
299876421CD99E4000C90D0A
/* OrderdetailsViewController.m in Sources */
,
29EC331A1CE023D5005F0C13
/* ChangePasswordViewController.m in Sources */
,
29D260FB1CEECDFF00A9787D
/* goodsDetailsTableViewCell.m in Sources */
,
2962D07D1CD1E4490058829D
/* NSArray+Objectwithindex.m in Sources */
,
04A14A251CE0FC3A00DAD5F3
/* LeftSubView.m in Sources */
,
299876391CD9981800C90D0A
/* GoodsInformationTableViewCell.m in Sources */
,
...
...
@@ -1399,6 +1434,7 @@
29A9DCAE1CEB643C00A7567A
/* PDFViewController.m in Sources */
,
29EAAE8E1CDC3E8E00C4DBA2
/* BillingInfoView.m in Sources */
,
0470D6141CE2938000647F0F
/* ProductLibraryView.m in Sources */
,
29D260F81CEEAF2D00A9787D
/* FullScreenViewCell.m in Sources */
,
29CB70F11CEC4607003508BF
/* ScannerViewController.m in Sources */
,
290887061CE58BC2000B7097
/* screeningButton.m in Sources */
,
044708611CD7C1E800555827
/* MainSetViewController.m in Sources */
,
...
...
Lighting/Lighting/Images.xcassets/animation1.imageset/Contents.json
0 → 100644
View file @
5ca22764
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"filename"
:
"animation1@2x.png"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
Lighting/Lighting/Images.xcassets/animation1.imageset/animation1@2x.png
0 → 100644
View file @
5ca22764
9.11 KB
Lighting/Lighting/Images.xcassets/animation2.imageset/Contents.json
0 → 100644
View file @
5ca22764
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"filename"
:
"animation2@2x.png"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
Lighting/Lighting/Images.xcassets/animation2.imageset/animation2@2x.png
0 → 100644
View file @
5ca22764
11 KB
Lighting/Lighting/Images.xcassets/animation3.imageset/Contents.json
0 → 100644
View file @
5ca22764
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"filename"
:
"animation3@2x.png"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
Lighting/Lighting/Images.xcassets/animation3.imageset/animation3@2x.png
0 → 100644
View file @
5ca22764
13.8 KB
Lighting/Lighting/Images.xcassets/animation4.imageset/Contents.json
0 → 100644
View file @
5ca22764
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"filename"
:
"animation4@2x.png"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
Lighting/Lighting/Images.xcassets/animation4.imageset/animation4@2x.png
0 → 100644
View file @
5ca22764
13.7 KB
Lighting/Lighting/Images.xcassets/animation5.imageset/Contents.json
0 → 100644
View file @
5ca22764
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"filename"
:
"animation5@2x.png"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
Lighting/Lighting/Images.xcassets/animation5.imageset/animation5@2x.png
0 → 100644
View file @
5ca22764
11.7 KB
Lighting/Lighting/StoryboardwithCYX.storyboard
View file @
5ca22764
This diff is collapsed.
Click to expand it.
Lighting/Podfile.lock
View file @
5ca22764
...
...
@@ -14,7 +14,7 @@ PODS:
- AFNetworking/Serialization (3.1.0)
- AFNetworking/UIKit (3.1.0):
- AFNetworking/NSURLSession
- IQKeyboardManager (4.0.
2
)
- IQKeyboardManager (4.0.
3
)
- JSONModel (1.2.0)
- Masonry (0.6.4)
- MBProgressHUD (0.9.2)
...
...
@@ -32,9 +32,9 @@ PODS:
- MMDrawerController/Core
- MMDrawerController/Subclass (0.6.0):
- MMDrawerController/Core
- SDWebImage (3.7.
5
):
- SDWebImage/Core (= 3.7.
5
)
- SDWebImage/Core (3.7.
5
)
- SDWebImage (3.7.
6
):
- SDWebImage/Core (= 3.7.
6
)
- SDWebImage/Core (3.7.
6
)
- SVProgressHUD (2.0.3)
DEPENDENCIES:
...
...
@@ -51,14 +51,14 @@ DEPENDENCIES:
SPEC CHECKSUMS:
AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67
IQKeyboardManager:
2341089c4ae25fa2fa82ce356a259fcd267dc6b6
IQKeyboardManager:
be9695ffc5a52077deb4847608f338771022d6d1
JSONModel: 12523685c4b623553ccf844bbbf7007624317b2c
Masonry: 281802d04d787ea2973179ee8bcb50500579ede2
MBProgressHUD: 1569cf7ace17a8bac47aabfbb8580a49690386d1
MJExtension: d86aacb740c87519d20e3cca55b6fa4be6cc7548
MJRefresh: 743e6404967d1c2c688472ea3ecfde247d872db4
MMDrawerController: e3a54a5570388463ad3b36975251575b50c4e1a0
SDWebImage:
69c6303e3348fba97e03f65d65d4fbc26740f461
SDWebImage:
c325cf02c30337336b95beff20a13df489ec0ec9
SVProgressHUD: b0830714205bea1317ea1a2ebc71e5633af334d4
COCOAPODS: 0.39.0
Lighting/Tools/BaseViewController.h
View file @
5ca22764
...
...
@@ -69,8 +69,27 @@
-
(
void
)
callAirprintWithURL
:(
NSURL
*
)
datasurl
SuccessBlock
:(
void
(
^
)())
success
ErrorBlock
:(
void
(
^
)())
failed
;
/**
* 提示图片、文本
*
显示
提示图片、文本
*/
-
(
void
)
PromptinformationViewWithimage
:(
UIImage
*
)
image
withTitle
:(
NSString
*
)
title
withFrame
:(
CGRect
)
frame
;
-
(
void
)
PromptinformationViewWithimage
:(
UIImage
*
)
image
withTitle
:(
NSString
*
)
title
withpoint
:(
CGPoint
)
point
;
/**
* 删除提示图片、文本
*/
-
(
void
)
RemovePromptinformationView
;
/**
* 查询订单状态图片
*/
+
(
UIImage
*
)
ReturnOrderStateImageWithStateCode
:(
NSInteger
)
ordercode
;
/**
* 查询订单状态文本 //code == 0 取文字 code == 1取颜色
*/
+
(
id
)
ReturnOrderStateTitleWithStateCode
:(
NSInteger
)
ordercode
withPoint
:(
CGPoint
)
point
WithCode
:(
NSInteger
)
code
;
@end
Lighting/Tools/BaseViewController.m
View file @
5ca22764
...
...
@@ -13,6 +13,11 @@
@property
(
nonatomic
,
strong
)
MBProgressHUD
*
TCHud
;
@property
(
nonatomic
,
strong
)
UIWebView
*
webView
;
/**
* 提示框
*/
@property
(
nonatomic
,
strong
)
PromptinformationView
*
promptView
;
@end
@implementation
BaseViewController
...
...
@@ -33,6 +38,23 @@
}
/**
* 初始化提示框
*
* @return PromptinformationView
*/
-
(
PromptinformationView
*
)
promptView
{
if
(
_promptView
==
nil
)
{
_promptView
=
[[[
NSBundle
mainBundle
]
loadNibNamed
:
@"PromptinformationView"
owner
:
self
options
:
nil
]
firstObject
];
}
return
_promptView
;
}
-
(
UIWebView
*
)
webView
{
if
(
_webView
==
nil
)
{
...
...
@@ -241,22 +263,116 @@
#pragma mark -提示文本,图片
-
(
void
)
PromptinformationViewWithimage
:
(
UIImage
*
)
image
withTitle
:
(
NSString
*
)
title
with
Frame
:
(
CGRect
)
frame
-
(
void
)
PromptinformationViewWithimage
:
(
UIImage
*
)
image
withTitle
:
(
NSString
*
)
title
with
point
:
(
CGPoint
)
point
{
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
];
self
.
promptView
.
tipsImage
.
image
=
image
;
self
.
promptView
.
tipsTitle
.
text
=
title
;
self
.
promptView
.
frame
=
CGRectMake
(
point
.
x
,
point
.
y
,
250
,
170
);
[
self
.
view
addSubview
:
self
.
promptView
];
}
#pragma mark -删除提示文本、图片
-
(
void
)
RemovePromptinformationView
{
[
self
.
promptView
removeFromSuperview
];
self
.
promptView
=
nil
;
}
#pragma mark -传入订单状态,返回当前状态图片
+
(
UIImage
*
)
ReturnOrderStateImageWithStateCode
:
(
NSInteger
)
ordercode
{
const
NSArray
*
imageArray
=
[
NSArray
arrayWithObjects
:
@"已撤销"
,
@"已完成"
,
@"已退货"
,
nil
];
switch
(
ordercode
)
{
case
004
:
//退货
{
return
TCImage
([
imageArray
objectAtIndex_opple
:
2
]);
}
break
;
case
005
:
//作废
{
return
TCImage
([
imageArray
objectAtIndex_opple
:
0
]);
}
break
;
case
006
:
//完成
{
return
TCImage
([
imageArray
objectAtIndex_opple
:
1
]);
}
break
;
default
:
break
;
}
return
nil
;
}
#pragma mark -传入订单状态,返回订单文本信息,字体颜色
+
(
id
)
ReturnOrderStateTitleWithStateCode
:
(
NSInteger
)
ordercode
withPoint
:
(
CGPoint
)
point
WithCode
:
(
NSInteger
)
code
{
switch
(
ordercode
)
{
case
001
:
//未付款
{
if
(
code
)
{
return
kTCColor
(
241
,
81
,
83
);
}
return
@"未付款"
;
}
break
;
case
002
:
//已付款
{
if
(
code
)
{
return
kTCColor
(
126
,
191
,
53
);
}
return
@"已付款"
;
}
break
;
case
003
:
//已发货
{
if
(
code
)
{
return
kTCColor
(
240
,
180
,
51
);
}
return
@"已发货"
;
}
break
;
case
004
:
//已退货
{
if
(
code
)
{
return
kTCColor
(
153
,
153
,
153
);
}
return
@"已退货"
;
}
break
;
case
005
:
//已作废
{
if
(
code
)
{
return
kTCColor
(
153
,
153
,
153
);
}
return
@"已作废"
;
}
break
;
case
006
:
//已完成
{
if
(
code
)
{
return
kTCColor
(
89
,
172
,
220
);
}
return
@"已完成"
;
}
break
;
default
:
break
;
}
return
nil
;
}
...
...
Lighting/Tools/CustomButton.m
View file @
5ca22764
...
...
@@ -47,11 +47,11 @@
break
;
}
}
i
nstructionsLabe
*
labe
=
[[
instructionsLabe
alloc
]
initWithFrame
:
CGRectMake
(
WIDTH
-
35
,
0
,
13
,
13
)];
labe
.
instructionsNumber
=
_instructionsNumber
;
[
self
addSubview
:
labe
]
;
i
f
(
_instructionsNumber
)
{
instructionsLabe
*
labe
=
[[
instructionsLabe
alloc
]
initWithFrame
:
CGRectMake
(
WIDTH
-
35
,
0
,
13
,
13
)]
;
labe
.
instructionsNumber
=
_instructionsNumber
;
[
self
addSubview
:
labe
];
}
}
...
...
Lighting/Tools/MjRefreshHeaderCustom.h
0 → 100644
View file @
5ca22764
//
// MjRefreshHeaderCustom.h
// Lighting
//
// Created by 曹云霄 on 16/5/20.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <MJRefresh/MJRefresh.h>
@interface
MjRefreshHeaderCustom
:
MJRefreshGifHeader
@end
Lighting/Tools/MjRefreshHeaderCustom.m
0 → 100644
View file @
5ca22764
//
// MjRefreshHeaderCustom.m
// Lighting
//
// Created by 曹云霄 on 16/5/20.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "MjRefreshHeaderCustom.h"
@implementation
MjRefreshHeaderCustom
-
(
void
)
prepare
{
[
super
prepare
];
// 设置普通状态的动画图片
NSMutableArray
*
idleImages
=
[
NSMutableArray
array
];
for
(
NSUInteger
i
=
1
;
i
<=
5
;
i
++
)
{
UIImage
*
image
=
[
UIImage
imageNamed
:[
NSString
stringWithFormat
:
@"animation%ld"
,
i
]];
[
idleImages
addObject
:
image
];
}
[
self
setImages
:
idleImages
forState
:
MJRefreshStateIdle
];
// 设置即将刷新状态的动画图片(一松开就会刷新的状态)
NSMutableArray
*
refreshingImages
=
[
NSMutableArray
array
];
for
(
NSUInteger
i
=
1
;
i
<=
5
;
i
++
)
{
UIImage
*
image
=
[
UIImage
imageNamed
:[
NSString
stringWithFormat
:
@"animation%ld"
,
i
]];
[
refreshingImages
addObject
:
image
];
}
[
self
setImages
:
refreshingImages
forState
:
MJRefreshStatePulling
];
// 设置正在刷新状态的动画图片
[
self
setImages
:
refreshingImages
forState
:
MJRefreshStateRefreshing
];
}
@end
Lighting/Tools/PrefixHeader.pch
View file @
5ca22764
...
...
@@ -28,6 +28,8 @@
#import "Customermanager.h"
#import "AppDelegate.h"
#import "PromptinformationView.h"
#import "BaseViewController.h"
#import "MjRefreshHeaderCustom.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.
...
...
Lighting/Tools/opple_objc_json_client.h
View file @
5ca22764
This diff is collapsed.
Click to expand it.
Lighting/Tools/opple_objc_json_client.m
View file @
5ca22764
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment