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
313eef06
Commit
313eef06
authored
Jun 07, 2016
by
曹云霄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
搜索界面禁止滑动、收货地址崩溃修复、添加删除优化,地址判空,订单查询优化,清空条件判断
parent
c11cc8ed
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
547 additions
and
465 deletions
+547
-465
AllCustomerViewController.h
Lighting/Class/AllCustomerViewController.h
+5
-0
AllCustomerViewController.m
Lighting/Class/AllCustomerViewController.m
+1
-4
ClientViewController.m
Lighting/Class/ClientViewController.m
+133
-1
ClientdetailsViewController.m
Lighting/Class/ClientdetailsViewController.m
+6
-2
CustomerOrderViewController.h
Lighting/Class/CustomerOrderViewController.h
+11
-0
CustomerOrderViewController.m
Lighting/Class/CustomerOrderViewController.m
+35
-67
FullScreenViewController.m
Lighting/Class/FullScreenViewController.m
+32
-2
LoginViewController.m
Lighting/Class/Login/LoginViewController.m
+12
-13
ProductDetailsHeaderView.h
Lighting/Class/ProductDetailsHeaderView.h
+0
-4
ProductDetailsViewController.h
Lighting/Class/ProductDetailsViewController.h
+6
-0
ProductDetailsViewController.m
Lighting/Class/ProductDetailsViewController.m
+1
-0
ProductLibraryViewController.m
Lighting/Class/ProductLibraryViewController.m
+1
-0
SearchViewController.m
Lighting/Class/SearchViewController.m
+22
-0
AddressViewController.m
Lighting/Class/Shoppingcart/AddressViewController.m
+10
-2
GenerateOrdersTableViewCell.m
Lighting/Class/Shoppingcart/GenerateOrdersTableViewCell.m
+1
-4
GenerateOrdersViewController.m
Lighting/Class/Shoppingcart/GenerateOrdersViewController.m
+18
-4
CustomTabbarController.m
Lighting/Class/Tabbar/CustomTabbarController.m
+3
-2
UserViewController.m
Lighting/Class/UserViewController.m
+125
-4
project.pbxproj
Lighting/Lighting.xcodeproj/project.pbxproj
+2
-2
AppDelegate.m
Lighting/Lighting/AppDelegate.m
+9
-0
StoryboardwithCYX.storyboard
Lighting/Lighting/StoryboardwithCYX.storyboard
+12
-264
BaseViewController.m
Lighting/Tools/BaseViewController.m
+1
-0
ExperienceCentreViewController.h
Lighting/Tools/ExperienceCentreViewController.h
+18
-0
ExperienceCentreViewController.m
Lighting/Tools/ExperienceCentreViewController.m
+8
-17
SceneViewController.h
Lighting/Tools/SceneViewController.h
+1
-1
SceneViewController.m
Lighting/Tools/SceneViewController.m
+65
-70
ShoppingBagViewController.m
Lighting/Tools/ShoppingBagViewController.m
+8
-1
UIImagePickerController+SupportDirection.m
Lighting/Tools/UIImagePickerController+SupportDirection.m
+1
-1
No files found.
Lighting/Class/AllCustomerViewController.h
View file @
313eef06
...
...
@@ -52,6 +52,11 @@
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
RecentlydateLabe
;
/**
* 参数模型
*/
@property
(
nonatomic
,
strong
)
ConsumerQueryCondition
*
conditionModel
;
...
...
Lighting/Class/AllCustomerViewController.m
View file @
313eef06
...
...
@@ -29,10 +29,7 @@
*/
@property
(
nonatomic
,
assign
)
int
totalPages
;
/**
* 参数模型
*/
@property
(
nonatomic
,
strong
)
ConsumerQueryCondition
*
conditionModel
;
@end
...
...
Lighting/Class/ClientViewController.m
View file @
313eef06
...
...
@@ -10,8 +10,9 @@
#import "InformationTableViewCell.h"
#import "ClientdetailsViewController.h"
#import "MyclientEntityModel.h"
#import "DeviceDirectionManager.h"
@interface
ClientViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
UITextFieldDelegate
,
DZNEmptyDataSetSource
,
DZNEmptyDataSetDelegate
>
@interface
ClientViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
UITextFieldDelegate
,
DZNEmptyDataSetSource
,
DZNEmptyDataSetDelegate
,
UIImagePickerControllerDelegate
,
UINavigationControllerDelegate
>
/**
* 客户数据源
...
...
@@ -93,6 +94,8 @@
self
.
changePersonInformationButton
.
layer
.
masksToBounds
=
YES
;
self
.
changePersonInformationButton
.
layer
.
cornerRadius
=
kCornerRadius
;
self
.
indexPage
=
1
;
self
.
customerHeader
.
userInteractionEnabled
=
YES
;
[
self
.
customerHeader
addGestureRecognizer
:[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
customerHeaderClckAction
:)]];
//隐藏更改客户按钮
self
.
changePersonInformationButton
.
hidden
=
YES
;
...
...
@@ -322,6 +325,7 @@
self
.
phoneNumberField
.
text
=
model
.
mobile
;
self
.
customerAddress
.
text
=
model
.
address
;
self
.
companyNameField
.
text
=
model
.
company
;
[
self
.
customerHeader
sd_setImageWithURL
:[
NSURL
URLWithString
:
model
.
picture
]
placeholderImage
:
TCImage
(
@"now"
)];
//保存客户信息
[
Shoppersmanager
manager
].
currentCustomer
=
YES
;
...
...
@@ -339,6 +343,133 @@
}
#pragma mark -更改客户头像
-
(
void
)
customerHeaderClckAction
:
(
UITapGestureRecognizer
*
)
tap
{
if
(
!
[
Shoppersmanager
manager
].
currentCustomer
)
{
[
self
ErrorMBProgressView
:
@"请先设置当前客户"
];
return
;
}
UIAlertController
*
alertView
=
[
UIAlertController
alertControllerWithTitle
:
nil
message
:
nil
preferredStyle
:
UIAlertControllerStyleAlert
];
UIImagePickerController
*
PcCamera
=
[[
UIImagePickerController
alloc
]
init
];
PcCamera
.
delegate
=
self
;
[
DeviceDirectionManager
instance
].
isHorizontal
=
YES
;
__weak
typeof
(
self
)
weakSelf
=
self
;
[
alertView
addAction
:[
UIAlertAction
actionWithTitle
:
@"拍照"
style
:
UIAlertActionStyleDefault
handler
:
^
(
UIAlertAction
*
_Nonnull
action
)
{
//拍照
if
([
UIImagePickerController
isSourceTypeAvailable
:
UIImagePickerControllerSourceTypeCamera
])
{
[
PcCamera
setSourceType
:
UIImagePickerControllerSourceTypeCamera
];
PcCamera
.
allowsEditing
=
YES
;
[
weakSelf
presentViewController
:
PcCamera
animated
:
YES
completion
:
nil
];
}
else
{
[
weakSelf
ErrorMBProgressView
:
@"相机无法使用"
];
}
}]];
[
alertView
addAction
:[
UIAlertAction
actionWithTitle
:
@"从相册选择"
style
:
UIAlertActionStyleDefault
handler
:
^
(
UIAlertAction
*
_Nonnull
action
)
{
//从相册中选择
if
([
UIImagePickerController
isSourceTypeAvailable
:
UIImagePickerControllerSourceTypePhotoLibrary
])
{
[
PcCamera
setSourceType
:
UIImagePickerControllerSourceTypePhotoLibrary
];
PcCamera
.
allowsEditing
=
YES
;
[
weakSelf
presentViewController
:
PcCamera
animated
:
YES
completion
:
nil
];
}
else
{
[
weakSelf
ErrorMBProgressView
:
@"相册无法打开"
];
}
}]];
[
alertView
addAction
:[
UIAlertAction
actionWithTitle
:
@"取消"
style
:
UIAlertActionStyleCancel
handler
:
^
(
UIAlertAction
*
_Nonnull
action
)
{
[
alertView
dismissViewControllerAnimated
:
YES
completion
:
nil
];
}]];
[
self
presentViewController
:
alertView
animated
:
YES
completion
:
nil
];
}
#pragma mark -拍照、从相册选择
#pragma -mark -UIImagePickerControllerDelegate
-
(
void
)
imagePickerController
:
(
UIImagePickerController
*
)
picker
didFinishPickingMediaWithInfo
:
(
NSDictionary
<
NSString
*
,
id
>
*
)
info
{
[
DeviceDirectionManager
instance
].
isHorizontal
=
NO
;
[
self
dismissViewControllerAnimated
:
YES
completion
:
nil
];
UIImage
*
Headimage
=
[
info
objectForKey
:
UIImagePickerControllerOriginalImage
];
__weak
typeof
(
self
)
weskSelf
=
self
;
//修改并保存头像
[
self
uploadUserHeader
:
Headimage
completeBlock
:
^
(
NSString
*
string
)
{
weskSelf
.
customerHeader
.
image
=
Headimage
;
[
Customermanager
manager
].
model
.
picture
=
string
;
}];
}
#pragma mark -保存选中头像、并上传
-
(
void
)
uploadUserHeader
:
(
UIImage
*
)
image
completeBlock
:
(
void
(
^
)(
NSString
*
string
))
complete
{
NSData
*
data
=
UIImageJPEGRepresentation
(
image
,
0
.
5
);
__weak
typeof
(
self
)
weskSelf
=
self
;
[[
NetworkRequestClassManager
Manager
]
UploadImageWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/system/upload"
]
WithRequestType
:
1
WithImageDatas
:
data
WithParameter
:
nil
WithReturnValueBlock
:^
(
id
returnValue
)
{
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
[
weskSelf
modifyshoppersInformation
:
returnValue
[
@"data"
]
complete
:
^
{
complete
(
returnValue
[
@"data"
]);
}];
}
else
{
[
weskSelf
ErrorMBProgressView
:
returnValue
[
@"message"
]];
}
}
WithprogressBlock
:^
(
double
progress
)
{
if
(
progress
>=
1
)
{
weskSelf
.
TCHud
.
labelText
=
@"上传完成"
;
dispatch_async
(
dispatch_get_main_queue
(),
^
{
[
weskSelf
RemoveMBProgressHUDLoding
];
});
}
else
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
[
weskSelf
ShowProgressView
:
progress
];
});
}
}
WithErrorCodeBlock
:^
(
id
errorCodeValue
)
{
weskSelf
.
TCHud
.
labelText
=
@"上传失败"
;
dispatch_async
(
dispatch_get_main_queue
(),
^
{
[
weskSelf
RemoveMBProgressHUDLoding
];
});
}
WithFailureBlock
:^
(
NSError
*
error
)
{
weskSelf
.
TCHud
.
labelText
=
@"上传失败"
;
dispatch_async
(
dispatch_get_main_queue
(),
^
{
[
weskSelf
RemoveMBProgressHUDLoding
];
});
}];
}
#pragma mark -上传完成修改导购个人信息
-
(
void
)
modifyshoppersInformation
:
(
NSString
*
)
headerurl
complete
:
(
void
(
^
)())
block
{
[
self
CreateMBProgressHUDLoding
];
MyclientEntityModel
*
customerEntity
=
[[
MyclientEntityModel
alloc
]
init
];
customerEntity
=
[
Customermanager
manager
].
model
;
customerEntity
.
picture
=
headerurl
;
[[
NetworkRequestClassManager
Manager
]
NetworkRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/consumer/save"
]
WithRequestType
:
0
WithParameter
:
customerEntity
WithReturnValueBlock
:^
(
id
returnValue
)
{
[
self
RemoveMBProgressHUDLoding
];
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
block
();
[
self
SuccessMBProgressView
:
@"修改成功"
];
}
else
{
[
self
ErrorMBProgressView
:
returnValue
[
@"message"
]];
}
}
WithErrorCodeBlock
:^
(
id
errorCodeValue
)
{
[
self
RemoveMBProgressHUDLoding
];
}
WithFailureBlock
:^
(
NSError
*
error
)
{
[
self
RemoveMBProgressHUDLoding
];
}];
}
#pragma mark -更新用户名字
-
(
void
)
ChangeCustomerName
{
...
...
@@ -638,6 +769,7 @@
self
.
customerAddress
.
enabled
=
NO
;
self
.
phoneNumberField
.
enabled
=
NO
;
self
.
companyNameField
.
enabled
=
NO
;
[
self
.
changePersonInformationButton
setTitle
:
@"更改客户信息"
forState
:
UIControlStateNormal
];
}
}
...
...
Lighting/Class/ClientdetailsViewController.m
View file @
313eef06
...
...
@@ -11,7 +11,7 @@
#import "OrderTableViewCell.h"
#import "OrderdetailsViewController.h"
#import "ShopcarModel.h"
#import "ProductDetailsViewController.h"
@interface
ClientdetailsViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
>
...
...
@@ -260,7 +260,11 @@
{
if
(
self
.
shoppingBagButton
.
selected
)
{
return
;
ProductDetailsViewController
*
productDetails
=
[[
self
getStoryboardWithName
]
instantiateViewControllerWithIdentifier
:
@"productdetails"
];
ShopcarModel
*
model
=
[
self
.
shopResponseArray
objectAtIndex_opple
:
indexPath
.
row
];
productDetails
.
goodsID
=
model
.
goods
.
fid
;
productDetails
.
inventory
=
model
.
goods
.
inv
;
[
self
.
navigationController
pushViewController
:
productDetails
animated
:
YES
];
}
else
if
(
self
.
orderRecordButton
.
selected
)
{
...
...
Lighting/Class/CustomerOrderViewController.h
View file @
313eef06
...
...
@@ -38,4 +38,15 @@
*/
@property
(
strong
,
nonatomic
)
screeningButton
*
StyleButton
;
/**
* 上传参数模型
*/
@property
(
nonatomic
,
strong
)
OrderBill
*
model
;
@end
Lighting/Class/CustomerOrderViewController.m
View file @
313eef06
...
...
@@ -63,6 +63,14 @@
return
_orderStateArray
;
}
-
(
OrderBill
*
)
model
{
if
(
!
_model
)
{
_model
=
[[
OrderBill
alloc
]
init
];
}
return
_model
;
}
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
// Do any additional setup after loading the view.
...
...
@@ -88,50 +96,39 @@
self
.
StyleButton
.
layer
.
masksToBounds
=
YES
;
self
.
StyleButton
.
layer
.
cornerRadius
=
10
;
[
self
.
orderStateBackView
addSubview
:
self
.
StyleButton
];
//导购id
TOOrderEntity
*
Neworder
=
[[
TOOrderEntity
alloc
]
init
];
Neworder
.
guideId
=
[
Shoppersmanager
manager
].
Shoppers
.
employee
.
fid
;
self
.
model
.
order
=
Neworder
;
//下拉刷新
__weak
typeof
(
self
)
weakSelf
=
self
;
MjRefreshHeaderCustom
*
headerRefresh
=
[
MjRefreshHeaderCustom
headerWithRefreshingBlock
:
^
{
self
.
indexPage
=
1
;
OrderBill
*
allOrder
=
[[
OrderBill
alloc
]
init
];
//分页
DataPage
*
page
=
[[
DataPage
alloc
]
init
];
page
.
page
=
self
.
indexPage
;
page
.
rows
=
10
;
//订单
TOOrderEntity
*
Neworder
=
[[
TOOrderEntity
alloc
]
init
];
Neworder
.
guideId
=
[
Shoppersmanager
manager
].
Shoppers
.
employee
.
fid
;
allOrder
.
datapage
=
page
;
allOrder
.
order
=
Neworder
;
Neworder
.
orderState
=
self
.
currentState
;
[
self
.
customerOrderTableView
.
mj_footer
resetNoMoreData
];
[
self
getGuideAllcustomerOrder
:
YES
WithorderBill
:
allOrder
];
page
.
page
=
weakSelf
.
indexPage
;
page
.
rows
=
KROWS
;
weakSelf
.
model
.
datapage
=
page
;
[
weakSelf
.
customerOrderTableView
.
mj_footer
resetNoMoreData
];
[
weakSelf
getGuideAllcustomerOrder
:
YES
WithorderBill
:
weakSelf
.
model
];
}];
headerRefresh
.
stateLabel
.
hidden
=
YES
;
headerRefresh
.
lastUpdatedTimeLabel
.
hidden
=
YES
;
self
.
customerOrderTableView
.
mj_header
=
headerRefresh
;
[
self
.
customerOrderTableView
.
mj_header
beginRefreshing
];
//上拉加载
self
.
customerOrderTableView
.
mj_footer
=
[
MJRefreshAutoNormalFooter
footerWithRefreshingBlock
:
^
{
if
(
++
self
.
indexPage
>
s
elf
.
totalPages
)
{
[
s
elf
.
customerOrderTableView
.
mj_footer
endRefreshingWithNoMoreData
];
if
(
++
weakSelf
.
indexPage
>
weakS
elf
.
totalPages
)
{
[
weakS
elf
.
customerOrderTableView
.
mj_footer
endRefreshingWithNoMoreData
];
}
else
{
OrderBill
*
allOrder
=
[[
OrderBill
alloc
]
init
];
//分页
DataPage
*
page
=
[[
DataPage
alloc
]
init
];
page
.
page
=
self
.
indexPage
++
;
page
.
rows
=
10
;
//订单
TOOrderEntity
*
Neworder
=
[[
TOOrderEntity
alloc
]
init
];
Neworder
.
guideId
=
[
Shoppersmanager
manager
].
Shoppers
.
employee
.
fid
;
allOrder
.
datapage
=
page
;
allOrder
.
order
=
Neworder
;
Neworder
.
orderState
=
self
.
currentState
;
[
self
getGuideAllcustomerOrder
:
NO
WithorderBill
:
allOrder
];
page
.
page
=
weakSelf
.
indexPage
++
;
page
.
rows
=
KROWS
;
weakSelf
.
model
.
datapage
=
page
;
Neworder
.
orderState
=
weakSelf
.
currentState
;
[
weakSelf
getGuideAllcustomerOrder
:
NO
WithorderBill
:
weakSelf
.
model
];
}
}];
}
...
...
@@ -173,12 +170,6 @@
}];
}
#pragma mark -订单状态筛选
-
(
void
)
OrderStateButtonClick
:
(
UIButton
*
)
button
{
...
...
@@ -263,18 +254,6 @@
[
self
.
StyleButton
setTitle
:
title
forState
:
UIControlStateNormal
];
[
self
dismissViewControllerAnimated
:
YES
completion
:
nil
];
self
.
indexPage
=
1
;
OrderBill
*
allOrder
=
[[
OrderBill
alloc
]
init
];
//分页
DataPage
*
page
=
[[
DataPage
alloc
]
init
];
page
.
page
=
self
.
indexPage
;
page
.
rows
=
KROWS
;
//订单
TOOrderEntity
*
Neworder
=
[[
TOOrderEntity
alloc
]
init
];
Neworder
.
guideId
=
[
Shoppersmanager
manager
].
Shoppers
.
employee
.
fid
;
allOrder
.
datapage
=
page
;
allOrder
.
order
=
Neworder
;
NSString
*
orderState
=
nil
;
//全部订单
if
([
title
isEqualToString
:
@"全部订单"
])
{
...
...
@@ -304,9 +283,10 @@
else
if
([
title
isEqualToString
:
@"已退货"
])
{
orderState
=
@"004"
;
}
Neworder
.
orderState
=
orderState
;
self
.
currentState
=
orderState
;
[
self
getGuideAllcustomerOrder
:
YES
WithorderBill
:
allOrder
];
self
.
model
.
order
.
orderState
=
orderState
;
self
.
model
.
consumer
.
name
=
nil
;
self
.
model
.
consumer
.
mobile
=
nil
;
[
self
.
customerOrderTableView
.
mj_header
beginRefreshing
];
}
...
...
@@ -315,23 +295,12 @@
-
(
BOOL
)
textFieldShouldReturn
:
(
UITextField
*
)
textField
{
[
textField
resignFirstResponder
];
self
.
indexPage
=
1
;
OrderBill
*
allOrder
=
[[
OrderBill
alloc
]
init
];
//分页
DataPage
*
page
=
[[
DataPage
alloc
]
init
];
page
.
page
=
self
.
indexPage
;
page
.
rows
=
KROWS
;
//订单
TOOrderEntity
*
Neworder
=
[[
TOOrderEntity
alloc
]
init
];
Neworder
.
guideId
=
[
Shoppersmanager
manager
].
Shoppers
.
employee
.
fid
;
allOrder
.
datapage
=
page
;
allOrder
.
order
=
Neworder
;
//客户搜索
TOConsumerEntity
*
customer
=
[[
TOConsumerEntity
alloc
]
init
];
customer
.
name
=
textField
.
text
;
customer
.
mobile
=
textField
.
text
;
allOrder
.
consumer
=
customer
;
[
self
getGuideAllcustomerOrder
:
YES
WithorderBill
:
allOrder
];
TOConsumerEntity
*
consumer
=
[[
TOConsumerEntity
alloc
]
init
];
consumer
.
name
=
textField
.
text
;
consumer
.
mobile
=
textField
.
text
;
self
.
model
.
consumer
=
consumer
;
self
.
model
.
order
.
orderState
=
nil
;
[
self
.
customerOrderTableView
.
mj_header
beginRefreshing
];
return
YES
;
}
...
...
@@ -417,7 +386,6 @@
return
kNoDataImage
;
}
-
(
NSAttributedString
*
)
titleForEmptyDataSet
:
(
UIScrollView
*
)
scrollView
{
return
[[
NSAttributedString
alloc
]
initWithString
:
@"暂无数据"
attributes
:
nil
];
...
...
Lighting/Class/FullScreenViewController.m
View file @
313eef06
...
...
@@ -8,7 +8,7 @@
#import "FullScreenViewController.h"
#import "FullScreenViewCell.h"
#import "ExperienceCentreViewController.h"
@interface
FullScreenViewController
()
...
...
@@ -23,6 +23,11 @@
*/
@property
(
nonatomic
,
strong
)
UIButton
*
backButton
;
/**
* 保存当前下标
*/
@property
(
nonatomic
,
assign
)
NSInteger
currentIndex
;
@end
@implementation
FullScreenViewController
...
...
@@ -113,7 +118,32 @@ static NSString * const reuseIdentifier = @"Cell";
#pragma mark -体验中心
-
(
void
)
GotoTiYanCenterButtonClick
{
UIStoryboard
*
storyboard
=
[
UIStoryboard
storyboardWithName
:
@"StoryboardwithCYX"
bundle
:
nil
];
ExperienceCentreViewController
*
ExperienceCenter
=
[
storyboard
instantiateViewControllerWithIdentifier
:
@"ExperienceCentre"
];
TOSceneEntity
*
sceneModel
=
[
self
.
datasArray
objectAtIndex_opple
:
self
.
currentIndex
];
SceneListModel
*
model
=
[[
SceneListModel
alloc
]
init
];
model
.
fid
=
sceneModel
.
fid
;
model
.
sceneCode
=
sceneModel
.
sceneCode
;
model
.
name
=
sceneModel
.
name
;
model
.
pricure
=
sceneModel
.
pricure
;
model
.
category
=
sceneModel
.
category
;
model
.
style
=
sceneModel
.
style
;
model
.
space
=
sceneModel
.
space
;
model
.
isSelectedSate
=
YES
;
[
ExperienceCenter
.
sceneDatasArray
addObject
:
model
];
ExperienceCenter
.
boolValue
=
YES
;
ExperienceCenter
.
modalPresentationStyle
=
UIModalPresentationOverFullScreen
;
UIPopoverPresentationController
*
popover
=
ExperienceCenter
.
popoverPresentationController
;
popover
.
sourceView
=
ExperienceCenter
.
view
;
[
self
presentViewController
:
ExperienceCenter
animated
:
YES
completion
:
nil
];
}
#pragma mark -获取当前下标
-
(
void
)
scrollViewDidEndDecelerating
:
(
UIScrollView
*
)
scrollView
{
CGPoint
offset
=
scrollView
.
contentOffset
;
int
index
=
offset
.
x
/
self
.
view
.
frame
.
size
.
width
;
self
.
currentIndex
=
index
;
}
#pragma mark -UI
...
...
Lighting/Class/Login/LoginViewController.m
View file @
313eef06
...
...
@@ -37,10 +37,7 @@
*/
@property
(
nonatomic
,
strong
)
NSTimer
*
sendTimer
;
/**
* 记录返回的验证码
*/
@property
(
nonatomic
,
copy
)
NSString
*
verifyCode
;
/**
* 用户名
...
...
@@ -249,11 +246,21 @@
{
selectedIndex
=
2
;
AllCustomerViewController
*
AllcustomerVC
=
[
SHARED_APPDELEGATE
.
allControllerArray
objectAtIndex_opple
:
2
];
AllcustomerVC
.
searchTextfield
.
text
=
nil
;
AllcustomerVC
.
conditionModel
.
resellerCodeEquals
=
nil
;
AllcustomerVC
.
conditionModel
.
mobileEquals
=
nil
;
AllcustomerVC
.
conditionModel
.
createTimeBegin
=
nil
;
AllcustomerVC
.
conditionModel
.
createTimeEnd
=
nil
;
AllcustomerVC
.
conditionModel
.
page
=
nil
;
[
AllcustomerVC
.
allCustomerTableview
.
mj_header
beginRefreshing
];
}
else
if
([
Name
isEqualToString
:
@"客户订单"
])
{
selectedIndex
=
1
;
CustomerOrderViewController
*
customerVC
=
[
SHARED_APPDELEGATE
.
allControllerArray
objectAtIndex_opple
:
1
];
customerVC
.
searchCustomerOrder
.
text
=
nil
;
customerVC
.
model
.
consumer
.
name
=
nil
;
customerVC
.
model
.
consumer
.
mobile
=
nil
;
customerVC
.
model
.
order
.
orderState
=
nil
;
[
customerVC
.
customerOrderTableView
.
mj_header
beginRefreshing
];
}
else
if
([
Name
isEqualToString
:
@"关于"
])
{
...
...
@@ -319,7 +326,6 @@
[
self
.
identityView
.
SendButton
setTitle
:
@"60"
forState
:
UIControlStateNormal
];
self
.
identityView
.
SendButton
.
enabled
=
NO
;
self
.
sendTimer
=
[
NSTimer
scheduledTimerWithTimeInterval
:
1
target
:
self
selector
:
@selector
(
SendbuttonChangetitle
)
userInfo
:
nil
repeats
:
YES
];
}
else
{
[
self
ErrorMBProgressView
:
returnValue
[
@"message"
]];
...
...
@@ -372,17 +378,14 @@
}
#pragma mark -下一步(重置密码界面)
-
(
void
)
NextButtonClick
{
// 验证码必须填写
if
(
self
.
identityView
.
verificationCode
.
text
.
length
==
0
)
{
[
self
ErrorMBProgressView
:
@"验证码不能为空"
];
return
;
}
else
{
//验证验证码
[
self
CreateMBProgressHUDLoding
];
[[
NetworkRequestClassManager
Manager
]
NetworkWithDictionaryRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@%@"
,
ServerAddress
,
@"/employee/validateSmsCode?code="
,
self
.
identityView
.
verificationCode
.
text
]
WithRequestType
:
1
WithParameter
:
nil
WithReturnValueBlock
:^
(
id
returnValue
)
{
...
...
@@ -399,12 +402,9 @@
[
self
.
resetPasswordView
.
resetPasswordNextButton
addTarget
:
self
action
:
@selector
(
ChangPassWordRequest
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
self
.
resetPasswordView
];
self
.
resetPasswordView
.
alpha
=
0
;
[
UIView
animateWithDuration
:
0
.
2
animations
:
^
{
self
.
resetPasswordView
.
alpha
=
1
;
}];
}
else
{
[
self
ErrorMBProgressView
:
returnValue
[
@"message"
]];
...
...
@@ -423,7 +423,6 @@
#pragma mark -修改密码
-
(
void
)
ChangPassWordRequest
{
if
(
self
.
resetPasswordView
.
newpass
.
text
.
length
==
0
)
{
[
self
ErrorMBProgressView
:
@"新密码为空"
];
...
...
@@ -448,7 +447,7 @@
[[
NetworkRequestClassManager
Manager
]
NetworkRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/employee/resetPassword"
]
WithRequestType
:
0
WithParameter
:
passwrod
WithReturnValueBlock
:^
(
id
returnValue
)
{
//
[self RemoveMBProgressHUDLoding];
[
self
RemoveMBProgressHUDLoding
];
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
[
self
ErrorMBProgressView
:
@"重置密码成功"
];
...
...
Lighting/Class/ProductDetailsHeaderView.h
View file @
313eef06
...
...
@@ -99,10 +99,6 @@
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
amplificationButton
;
/**
* 库存数量
*/
@property
(
nonatomic
,
assign
)
NSInteger
inventory
;
@end
Lighting/Class/ProductDetailsViewController.h
View file @
313eef06
...
...
@@ -25,6 +25,12 @@
@property
(
nonatomic
,
copy
)
NSString
*
goodsID
;
/**
* 商品库存
*/
@property
(
nonatomic
,
assign
)
NSInteger
inventory
;
@end
Lighting/Class/ProductDetailsViewController.m
View file @
313eef06
...
...
@@ -137,6 +137,7 @@
self
.
headerView
.
serialNumber
.
text
=
self
.
entity
.
code
;
self
.
headerView
.
nameLabe
.
text
=
self
.
entity
.
name
;
self
.
headerView
.
brandName
.
text
=
self
.
entity
.
company
;
self
.
headerView
.
inventoryNumber
.
text
=
[
NSString
stringWithFormat
:
@"%ld"
,
self
.
inventory
];
self
.
headerView
.
dorpPriceLabe
.
text
=
[
NSString
stringWithFormat
:
@"¥%.2f"
,[
self
.
entity
.
tagPrice
floatValue
]];
self
.
imagesArray
=
[
NSMutableArray
arrayWithArray
:[
self
.
entity
.
pictures
componentsSeparatedByString
:
@","
]];
[
self
.
headerView
.
goodsImageview
sd_setImageWithURL
:[
self
.
imagesArray
firstObject
]
placeholderImage
:
REPLACEIMAGE
];
...
...
Lighting/Class/ProductLibraryViewController.m
View file @
313eef06
...
...
@@ -513,6 +513,7 @@
UIStoryboard
*
storyboard
=
[
UIStoryboard
storyboardWithName
:
@"StoryboardwithCYX"
bundle
:
nil
];
ProductDetailsViewController
*
productDetails
=
[
storyboard
instantiateViewControllerWithIdentifier
:
@"productdetails"
];
productDetails
.
goodsID
=
[[
self
.
datasArray
objectAtIndex_opple
:
indexPath
.
item
]
fid
];
productDetails
.
inventory
=
[[
self
.
datasArray
objectAtIndex_opple
:
indexPath
.
item
]
inv
];
[
self
.
navigationController
pushViewController
:
productDetails
animated
:
YES
];
}
...
...
Lighting/Class/SearchViewController.m
View file @
313eef06
...
...
@@ -52,6 +52,28 @@
}
#pragma mark -渲染完成
-
(
void
)
viewDidAppear
:
(
BOOL
)
animated
{
[
super
viewDidAppear
:
animated
];
// 禁用 iOS7 返回手势
if
([
self
.
navigationController
respondsToSelector
:
@selector
(
interactivePopGestureRecognizer
)])
{
self
.
navigationController
.
interactivePopGestureRecognizer
.
enabled
=
NO
;
}
}
#pragma mark -视图即将消失
-
(
void
)
viewWillDisappear
:
(
BOOL
)
animated
{
[
super
viewWillDisappear
:
animated
];
// 开启
if
([
self
.
navigationController
respondsToSelector
:
@selector
(
interactivePopGestureRecognizer
)])
{
self
.
navigationController
.
interactivePopGestureRecognizer
.
enabled
=
YES
;
}
}
#pragma mark -布局
-
(
void
)
uiConfigAction
{
...
...
Lighting/Class/Shoppingcart/AddressViewController.m
View file @
313eef06
...
...
@@ -151,6 +151,14 @@
[
self
ErrorMBProgressView
:
@"手机号码格式不正确"
];
return
;
}
if
(
!
self
.
recipientPerson
.
text
.
length
)
{
[
self
ErrorMBProgressView
:
@"请输入收货人姓名"
];
return
;
}
if
(
!
self
.
detailsAddress
.
text
.
length
)
{
[
self
ErrorMBProgressView
:
@"请输入详细地址"
];
return
;
}
if
([
sender
.
currentTitle
isEqualToString
:
@"新增"
])
{
[
self
addAddressInformationRequest
];
...
...
@@ -249,7 +257,7 @@
if
(
!
[
self
.
provincesString
isEqualToString
:[
self
.
citySelected
currentTitle
]])
{
address
.
province
=
self
.
provincesString
;
}
address
.
fid
=
_
model
.
fid
;
address
.
fid
=
self
.
model
.
fid
;
[
self
CreateMBProgressHUDLoding
];
[[
NetworkRequestClassManager
Manager
]
NetworkRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/shippingAddress/update"
]
WithRequestType
:
0
WithParameter
:
address
WithReturnValueBlock
:^
(
id
returnValue
)
{
...
...
@@ -263,7 +271,7 @@
model
.
city
=
self
.
citySelected
.
currentTitle
;
model
.
address
=
self
.
detailsAddress
.
text
;
model
.
consumerId
=
[
Customermanager
manager
].
model
.
fid
;
model
.
fid
=
returnValue
[
@"data"
]
;
model
.
fid
=
self
.
model
.
fid
;
model
.
isSelected
=
NO
;
//修改地址
if
([
self
.
delegate
respondsToSelector
:
@selector
(
ChangeAddresscell
:
Withcellindex
:
)])
{
...
...
Lighting/Class/Shoppingcart/GenerateOrdersTableViewCell.m
View file @
313eef06
...
...
@@ -17,9 +17,6 @@
#pragma mark -赋值
-
(
void
)
setNewModel
:
(
AddressModel
*
)
NewModel
{
...
...
@@ -36,7 +33,7 @@
if
(
self
.
blockSeletced
)
{
self
.
blockSeletced
(
_
indexNumber
);
self
.
blockSeletced
(
self
.
indexNumber
);
}
sender
.
selected
=
YES
;
}
...
...
Lighting/Class/Shoppingcart/GenerateOrdersViewController.m
View file @
313eef06
...
...
@@ -189,9 +189,10 @@
cell
.
backgroundColor
=
kTCColor
(
242
,
242
,
242
);
cell
.
indexNumber
=
indexPath
.
row
;
//回调
__weak
typeof
(
self
)
weakSelf
=
self
;
[
cell
setBlockSeletced
:
^
(
NSInteger
index
)
{
[
s
elf
SetCustomerButtonClick
:
index
];
[
weakS
elf
SetCustomerButtonClick
:
index
];
}];
cell
.
NewModel
=
[
self
.
datasArray
objectAtIndex_opple
:
indexPath
.
section
][
indexPath
.
row
];
return
cell
;
...
...
@@ -509,13 +510,19 @@
NSArray
*
arr
=
[
self
.
datasArray
objectAtIndex_opple
:
1
];
for
(
int
i
=
0
;
i
<
arr
.
count
;
i
++
)
{
if
([[
arr
objectAtIndex_opple
:
i
]
isKindOfClass
:[
AddressModel
class
]])
{
AddressModel
*
model
=
[
arr
objectAtIndex_opple
:
i
];
if
([
model
isKindOfClass
:[
AddressModel
class
]])
{
AddressModel
*
model
=
[
arr
objectAtIndex_opple
:
i
];
//判断是否为选中
if
(
model
.
isSelected
)
{
[
self
CreateModifyShippingView
:[
arr
objectAtIndex_opple
:
i
]
Withindex
:
i
];
break
;
}
else
{
if
(
i
==
arr
.
count
-
1
)
{
[
self
ErrorMBProgressView
:
@"请先勾选一个地址"
];
}
}
}
}
...
...
@@ -536,6 +543,9 @@
[[
self
.
datasArray
objectAtIndex_opple
:
1
]
insertObject
:
model
atIndex
:
0
];
NSIndexPath
*
indexpath
=
[
NSIndexPath
indexPathForRow
:
0
inSection
:
1
];
[
self
.
generateOrderTableview
insertRowsAtIndexPaths
:@[
indexpath
]
withRowAnimation
:
UITableViewRowAnimationLeft
];
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
1
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
[
self
.
generateOrderTableview
reloadSections
:[
NSIndexSet
indexSetWithIndex
:
1
]
withRowAnimation
:
UITableViewRowAnimationNone
];
});
}
#pragma mark -修改地址回调
...
...
@@ -550,6 +560,7 @@
#pragma mark -删除地址
-
(
void
)
delecteCell
:
(
NSString
*
)
addressid
{
[
self
dismissViewControllerAnimated
:
YES
completion
:
nil
];
NSArray
*
arr
=
[
self
.
datasArray
objectAtIndex_opple
:
1
];
for
(
int
i
=
0
;
i
<
arr
.
count
;
i
++
)
{
...
...
@@ -562,7 +573,10 @@
[[
self
.
datasArray
objectAtIndex_opple
:
1
]
removeObjectAtIndex
:
i
];
NSIndexPath
*
indexpath
=
[
NSIndexPath
indexPathForRow
:
i
inSection
:
1
];
[
self
.
generateOrderTableview
deleteRowsAtIndexPaths
:@[
indexpath
]
withRowAnimation
:
UITableViewRowAnimationLeft
];
[
self
dismissViewControllerAnimated
:
YES
completion
:
nil
];
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
1
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
[
self
.
generateOrderTableview
reloadSections
:[
NSIndexSet
indexSetWithIndex
:
1
]
withRowAnimation
:
UITableViewRowAnimationNone
];
});
break
;
}
}
}
...
...
Lighting/Class/Tabbar/CustomTabbarController.m
View file @
313eef06
...
...
@@ -337,13 +337,14 @@
}
else
{
UIStoryboard
*
storyboard
=
[
UIStoryboard
storyboardWithName
:
@"StoryboardwithCYX"
bundle
:
nil
];
FollowHeartViewController
*
followVC
=
[
storyboard
instantiateViewControllerWithIdentifier
:[
self
.
identifierArray
objectAtIndex_opple
:
3
]];
[
self
presentViewController
:
followVC
animated
:
YES
completion
:
nil
];
// ExperienceCentreViewController *ExperienceCenter = [storyboard instantiateViewControllerWithIdentifier:@"ExperienceCentre"];
// ExperienceCenter.modalPresentationStyle = UIModalPresentationOverFullScreen;
// UIPopoverPresentationController *popover = ExperienceCenter.popoverPresentationController;
// popover.sourceView = ExperienceCenter.view;
// [self presentViewController:ExperienceCenter animated:YES completion:nil];
FollowHeartViewController
*
followVC
=
[
storyboard
instantiateViewControllerWithIdentifier
:[
self
.
identifierArray
objectAtIndex_opple
:
3
]];
[
self
presentViewController
:
followVC
animated
:
YES
completion
:
nil
];
}
}
...
...
Lighting/Class/UserViewController.m
View file @
313eef06
...
...
@@ -9,8 +9,9 @@
#import "UserViewController.h"
#import "ChangePasswordViewController.h"
#import "LoginViewController.h"
#import "DeviceDirectionManager.h"
@interface
UserViewController
()
@interface
UserViewController
()
<
UINavigationControllerDelegate
,
UIImagePickerControllerDelegate
>
@end
...
...
@@ -42,14 +43,133 @@
self
.
changePassword
.
layer
.
cornerRadius
=
kCornerRadius
;
self
.
changePassword
.
layer
.
borderWidth
=
0
.
5
;
self
.
changePassword
.
layer
.
borderColor
=
kMainBlueColor
.
CGColor
;
self
.
userName
.
text
=
[
Shoppersmanager
manager
].
userNameString
;
self
.
passWord
.
text
=
[
Shoppersmanager
manager
].
passWordString
;
// self.userHeader sd_setImageWithURL:[NSURL URLWithString:[Shoppersmanager manager].Shoppers.employee] placeholderImage:<#(UIImage *)#>
self
.
userHeader
.
userInteractionEnabled
=
YES
;
NSString
*
headerurl
=
[
Shoppersmanager
manager
].
Shoppers
.
employee
.
picture
;
[
self
.
userHeader
sd_setImageWithURL
:[
NSURL
URLWithString
:
headerurl
]
placeholderImage
:
ReplaceImage
];
[
self
.
userHeader
addGestureRecognizer
:[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
userHeaderClickAction
:)]];
}
#pragma mark -用户头像点击
-
(
void
)
userHeaderClickAction
:
(
UITapGestureRecognizer
*
)
tap
{
UIAlertController
*
alertView
=
[
UIAlertController
alertControllerWithTitle
:
nil
message
:
nil
preferredStyle
:
UIAlertControllerStyleAlert
];
UIImagePickerController
*
PcCamera
=
[[
UIImagePickerController
alloc
]
init
];
PcCamera
.
delegate
=
self
;
[
DeviceDirectionManager
instance
].
isHorizontal
=
YES
;
[
alertView
addAction
:[
UIAlertAction
actionWithTitle
:
@"拍照"
style
:
UIAlertActionStyleDefault
handler
:
^
(
UIAlertAction
*
_Nonnull
action
)
{
//拍照
if
([
UIImagePickerController
isSourceTypeAvailable
:
UIImagePickerControllerSourceTypeCamera
])
{
[
PcCamera
setSourceType
:
UIImagePickerControllerSourceTypeCamera
];
PcCamera
.
allowsEditing
=
YES
;
[
self
presentViewController
:
PcCamera
animated
:
YES
completion
:
nil
];
}
else
{
[
self
ErrorMBProgressView
:
@"相机无法使用"
];
}
}]];
[
alertView
addAction
:[
UIAlertAction
actionWithTitle
:
@"从相册选择"
style
:
UIAlertActionStyleDefault
handler
:
^
(
UIAlertAction
*
_Nonnull
action
)
{
//从相册中选择
if
([
UIImagePickerController
isSourceTypeAvailable
:
UIImagePickerControllerSourceTypePhotoLibrary
])
{
[
PcCamera
setSourceType
:
UIImagePickerControllerSourceTypePhotoLibrary
];
PcCamera
.
allowsEditing
=
YES
;
[
self
presentViewController
:
PcCamera
animated
:
YES
completion
:
nil
];
}
else
{
[
self
ErrorMBProgressView
:
@"相册无法打开"
];
}
}]];
[
alertView
addAction
:[
UIAlertAction
actionWithTitle
:
@"取消"
style
:
UIAlertActionStyleCancel
handler
:
^
(
UIAlertAction
*
_Nonnull
action
)
{
[
alertView
dismissViewControllerAnimated
:
YES
completion
:
nil
];
}]];
[
self
presentViewController
:
alertView
animated
:
YES
completion
:
nil
];
}
#pragma mark -拍照、从相册选择
#pragma -mark -UIImagePickerControllerDelegate
-
(
void
)
imagePickerController
:
(
UIImagePickerController
*
)
picker
didFinishPickingMediaWithInfo
:
(
NSDictionary
<
NSString
*
,
id
>
*
)
info
{
// [DeviceDirectionManager instance].isHorizontal=NO;
[
self
dismissViewControllerAnimated
:
YES
completion
:
nil
];
UIImage
*
Headimage
=
[
info
objectForKey
:
UIImagePickerControllerOriginalImage
];
__weak
typeof
(
self
)
weskSelf
=
self
;
//修改并保存头像
[
self
uploadUserHeader
:
Headimage
completeBlock
:
^
(
NSString
*
string
)
{
weskSelf
.
userHeader
.
image
=
Headimage
;
[
Shoppersmanager
manager
].
Shoppers
.
employee
.
picture
=
string
;
}];
}
#pragma mark -保存选中头像、并上传
-
(
void
)
uploadUserHeader
:
(
UIImage
*
)
image
completeBlock
:
(
void
(
^
)(
NSString
*
string
))
complete
{
NSData
*
data
=
UIImageJPEGRepresentation
(
image
,
0
.
5
);
[[
NetworkRequestClassManager
Manager
]
UploadImageWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/system/upload"
]
WithRequestType
:
1
WithImageDatas
:
data
WithParameter
:
nil
WithReturnValueBlock
:^
(
id
returnValue
)
{
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
[
self
modifyshoppersInformation
:
returnValue
[
@"data"
]
complete
:
^
{
complete
(
returnValue
[
@"data"
]);
}];
}
else
{
[
self
ErrorMBProgressView
:
returnValue
[
@"message"
]];
}
}
WithprogressBlock
:^
(
double
progress
)
{
if
(
progress
>=
1
)
{
self
.
TCHud
.
labelText
=
@"上传完成"
;
dispatch_async
(
dispatch_get_main_queue
(),
^
{
[
self
RemoveMBProgressHUDLoding
];
});
}
else
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
[
self
ShowProgressView
:
progress
];
});
}
}
WithErrorCodeBlock
:^
(
id
errorCodeValue
)
{
self
.
TCHud
.
labelText
=
@"上传失败"
;
dispatch_async
(
dispatch_get_main_queue
(),
^
{
[
self
RemoveMBProgressHUDLoding
];
});
}
WithFailureBlock
:^
(
NSError
*
error
)
{
self
.
TCHud
.
labelText
=
@"上传失败"
;
dispatch_async
(
dispatch_get_main_queue
(),
^
{
[
self
RemoveMBProgressHUDLoding
];
});
}];
}
#pragma mark -上传完成修改导购个人信息
-
(
void
)
modifyshoppersInformation
:
(
NSString
*
)
headerurl
complete
:
(
void
(
^
)())
block
{
[
self
CreateMBProgressHUDLoding
];
RsEmployeeRequest
*
employ
=
[[
RsEmployeeRequest
alloc
]
init
];
employ
.
employee
=
[
Shoppersmanager
manager
].
Shoppers
.
employee
;
employ
.
employee
.
picture
=
headerurl
;
[[
NetworkRequestClassManager
Manager
]
NetworkRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/employee/updateEmployee"
]
WithRequestType
:
0
WithParameter
:
employ
WithReturnValueBlock
:^
(
id
returnValue
)
{
[
self
RemoveMBProgressHUDLoding
];
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
block
();
[
self
SuccessMBProgressView
:
@"修改成功"
];
}
else
{
[
self
ErrorMBProgressView
:
returnValue
[
@"message"
]];
}
}
WithErrorCodeBlock
:^
(
id
errorCodeValue
)
{
[
self
RemoveMBProgressHUDLoding
];
}
WithFailureBlock
:^
(
NSError
*
error
)
{
[
self
RemoveMBProgressHUDLoding
];
}];
}
#pragma mark -修改密码
...
...
@@ -154,6 +274,7 @@
LoginResult
*
result
=
[[
LoginResult
alloc
]
initWithDictionary
:
returnValue
[
@"data"
]
error
:
nil
];
[
Shoppersmanager
manager
].
userNameString
=
self
.
userName
.
text
;
[
Shoppersmanager
manager
].
passWordString
=
self
.
passWord
.
text
;
[
Shoppersmanager
manager
].
currentCustomer
=
NO
;
[
Shoppersmanager
manager
].
Shoppers
=
result
;
//保存用户名密码
...
...
Lighting/Lighting.xcodeproj/project.pbxproj
View file @
313eef06
...
...
@@ -1887,7 +1887,7 @@
GCC_PRECOMPILE_PREFIX_HEADER
=
YES
;
GCC_PREFIX_HEADER
=
"$(SRCROOT)/Tools/PrefixHeader.pch"
;
INFOPLIST_FILE
=
Lighting/Info.plist
;
IPHONEOS_DEPLOYMENT_TARGET
=
9.
3
;
IPHONEOS_DEPLOYMENT_TARGET
=
9.
0
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
LIBRARY_SEARCH_PATHS
=
"$(inherited)"
;
ONLY_ACTIVE_ARCH
=
YES
;
...
...
@@ -1943,7 +1943,7 @@
GCC_PRECOMPILE_PREFIX_HEADER
=
YES
;
GCC_PREFIX_HEADER
=
"$(SRCROOT)/Tools/PrefixHeader.pch"
;
INFOPLIST_FILE
=
Lighting/Info.plist
;
IPHONEOS_DEPLOYMENT_TARGET
=
9.
3
;
IPHONEOS_DEPLOYMENT_TARGET
=
9.
0
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
LIBRARY_SEARCH_PATHS
=
"$(inherited)"
;
ONLY_ACTIVE_ARCH
=
NO
;
...
...
Lighting/Lighting/AppDelegate.m
View file @
313eef06
...
...
@@ -26,6 +26,7 @@
return
YES
;
}
-
(
NSUInteger
)
application
:(
UIApplication
*
)
application
supportedInterfaceOrientationsForWindow
:(
nullable
UIWindow
*
)
window
{
//判断是否是横屏
...
...
@@ -35,6 +36,7 @@
return
UIInterfaceOrientationMaskLandscape
;
}
}
//分享回调
-
(
BOOL
)
application
:(
UIApplication
*
)
application
openURL
:(
NSURL
*
)
url
sourceApplication
:(
NSString
*
)
sourceApplication
annotation
:(
id
)
annotation
{
...
...
@@ -53,11 +55,18 @@
}
#pragma mark -接收到内存警告
-
(
void
)
applicationDidReceiveMemoryWarning
:
(
UIApplication
*
)
application
{
[[
SDImageCache
sharedImageCache
]
clearDisk
];
}
#pragma mark - 键盘
-
(
void
)
SetIQKeyboardManager
{
IQKeyboardManager
*
manager
=
[
IQKeyboardManager
sharedManager
];
[[
IQKeyboardManager
sharedManager
]
setKeyboardDistanceFromTextField
:
0
];
manager
.
enable
=
YES
;
manager
.
shouldResignOnTouchOutside
=
YES
;
manager
.
enableAutoToolbar
=
NO
;
...
...
Lighting/Lighting/StoryboardwithCYX.storyboard
View file @
313eef06
This diff is collapsed.
Click to expand it.
Lighting/Tools/BaseViewController.m
View file @
313eef06
...
...
@@ -108,6 +108,7 @@
#pragma mark -进度条
-
(
void
)
ShowProgressView
:
(
double
)
progress
{
self
.
TCHud
.
mode
=
MBProgressHUDModeDeterminateHorizontalBar
;
self
.
TCHud
.
labelText
=
@"上传中...."
;
self
.
TCHud
.
labelFont
=
[
UIFont
systemFontOfSize
:
12
];
...
...
Lighting/Tools/ExperienceCentreViewController.h
View file @
313eef06
...
...
@@ -83,7 +83,25 @@
@property
(
weak
,
nonatomic
)
IBOutlet
UITableView
*
productScrollview
;
/**
* 选中场景数据
*/
@property
(
nonatomic
,
strong
)
NSMutableArray
*
sceneDatasArray
;
/**
* 选中产品数据源
*/
@property
(
nonatomic
,
strong
)
NSMutableArray
*
productDatasArray
;
/**
* 需要分享的商品数组
*/
@property
(
nonatomic
,
strong
)
NSMutableArray
*
shareGoodsArray
;
/**
* 是否把第一种场景设为默认
*/
@property
(
nonatomic
,
assign
)
BOOL
boolValue
;
...
...
Lighting/Tools/ExperienceCentreViewController.m
View file @
313eef06
...
...
@@ -23,20 +23,6 @@
@interface
ExperienceCentreViewController
()
<
AddImagesDelegate
,
UICollectionViewDelegate
,
UICollectionViewDataSource
,
UITableViewDelegate
,
UITableViewDataSource
,
UIGestureRecognizerDelegate
,
SharePicturedelegate
,
UIImagePickerControllerDelegate
,
UINavigationControllerDelegate
>
/**
* 选中场景数据
*/
@property
(
nonatomic
,
strong
)
NSMutableArray
*
sceneDatasArray
;
/**
* 选中产品数据源
*/
@property
(
nonatomic
,
strong
)
NSMutableArray
*
productDatasArray
;
/**
* 需要分享的商品数组
*/
@property
(
nonatomic
,
strong
)
NSMutableArray
*
shareGoodsArray
;
@end
...
...
@@ -94,7 +80,10 @@
//产品
self
.
productScrollview
.
dataSource
=
self
;
self
.
productScrollview
.
delegate
=
self
;
if
(
self
.
boolValue
)
{
SceneListModel
*
model
=
[
self
.
sceneDatasArray
firstObject
];
[
self
.
sceneImageView
sd_setImageWithURL
:[
NSURL
URLWithString
:
model
.
pricure
]
placeholderImage
:
REPLACEIMAGE
];
}
}
#pragma mark -UICollectionViewDataSource场景
...
...
@@ -241,6 +230,10 @@
#pragma mark -分享
-
(
IBAction
)
ShareButtonClickAction
:
(
UIButton
*
)
sender
{
if
(
!
self
.
shareGoodsArray
.
count
)
{
[
self
ErrorMBProgressView
:
@"没有选择需要分享的商品"
];
return
;
}
ShareGoodsViewController
*
shareController
=
[[
ShareGoodsViewController
alloc
]
init
];
//商品id拼接
NSMutableString
*
goodsID
=
[[
NSMutableString
alloc
]
init
];
...
...
@@ -308,7 +301,6 @@
UIImage
*
Headimage
=
[
info
objectForKey
:
UIImagePickerControllerOriginalImage
];
self
.
sceneImageView
.
image
=
Headimage
;
self
.
takingPicturesButton
.
selected
=
NO
;
}
#pragma mark -截屏
...
...
@@ -512,7 +504,6 @@
self
.
TCHud
.
labelText
=
@"上传完成"
;
[
self
RemoveMBProgressHUDLoding
];
});
}
...
...
Lighting/Tools/SceneViewController.h
View file @
313eef06
...
...
@@ -115,7 +115,7 @@
/**
* 选中商品回传
*/
@property
(
nonatomic
,
assign
)
id
<
AddImagesDelegate
>
delegate
;
@property
(
nonatomic
,
weak
)
id
<
AddImagesDelegate
>
delegate
;
/**
* dismiss回传
...
...
Lighting/Tools/SceneViewController.m
View file @
313eef06
This diff is collapsed.
Click to expand it.
Lighting/Tools/ShoppingBagViewController.m
View file @
313eef06
...
...
@@ -10,7 +10,7 @@
#import "ShoppingTableViewCell.h"
#import "TOGoodsEntityModel.h"
#import "ShopcarModel.h"
@interface
ShoppingBagViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
UIGestureRecognizerDelegate
,
DZNEmptyDataSetSource
,
ChangeGoodsNumberDelegate
>
@interface
ShoppingBagViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
UIGestureRecognizerDelegate
,
DZNEmptyDataSetSource
,
ChangeGoodsNumberDelegate
,
UIImagePickerControllerDelegate
>
@end
...
...
@@ -257,6 +257,11 @@
[
self
RemoveMBProgressHUDLoding
];
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
if
(
self
.
dismissBlock
)
{
self
.
dismissBlock
();
}
[
self
dismissViewControllerAnimated
:
YES
completion
:
nil
];
[
self
QueryShoppingCarNumber
];
[
self
SuccessMBProgressView
:
@"加入购物车成功"
];
}
else
{
...
...
@@ -272,6 +277,8 @@
}
#pragma mark -改变商品数量
-
(
void
)
ChangeGoodsNumber
:
(
int
)
goodsNumber
WithcostPrice
:
(
CGFloat
)
costprice
Withcellindex
:
(
NSInteger
)
cellindex
{
...
...
Lighting/Tools/UIImagePickerController+SupportDirection.m
View file @
313eef06
...
...
@@ -13,7 +13,7 @@
-
(
UIInterfaceOrientationMask
)
supportedInterfaceOrientations
{
return
UIInterfaceOrientationMask
Portrait
;
return
UIInterfaceOrientationMask
Landscape
;
}
-
(
UIStatusBarStyle
)
preferredStatusBarStyle
...
...
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