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
3d29cf1b
Commit
3d29cf1b
authored
Jun 03, 2016
by
勾芒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug
parent
87d435d5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
1041 additions
and
683 deletions
+1041
-683
ClientViewController.m
Lighting/Class/ClientViewController.m
+1
-1
ClientdetailsViewController.m
Lighting/Class/ClientdetailsViewController.m
+1
-1
HotCollectionViewCell.h
Lighting/Class/HotCollectionViewCell.h
+1
-1
HotCollectionViewCell.m
Lighting/Class/HotCollectionViewCell.m
+2
-3
LoginViewController.m
Lighting/Class/Login/LoginViewController.m
+1
-1
ProductLibraryViewController.m
Lighting/Class/ProductLibraryViewController.m
+31
-29
ScreeningFirstCollectionViewCell.m
Lighting/Class/ScreeningFirstCollectionViewCell.m
+2
-4
SearchViewController.m
Lighting/Class/SearchViewController.m
+4
-4
ShareViewController.m
Lighting/Class/ShareViewController.m
+4
-6
ShoppingViewController.h
Lighting/Class/Shoppingcart/ShoppingViewController.h
+2
-0
ShoppingViewController.m
Lighting/Class/Shoppingcart/ShoppingViewController.m
+6
-6
screeningSecondView.m
Lighting/Class/screeningSecondView.m
+6
-1
project.pbxproj
Lighting/Lighting.xcodeproj/project.pbxproj
+16
-0
ExperienceCentreViewController.m
Lighting/Tools/ExperienceCentreViewController.m
+67
-71
GoodsImageView.h
Lighting/Tools/GoodsImageView.h
+13
-0
GoodsImageView.m
Lighting/Tools/GoodsImageView.m
+76
-0
SceneViewController.m
Lighting/Tools/SceneViewController.m
+1
-1
ShareGoodsViewController.h
Lighting/Tools/ShareGoodsViewController.h
+52
-0
ShareGoodsViewController.m
Lighting/Tools/ShareGoodsViewController.m
+123
-0
ShareGoodsViewController.xib
Lighting/Tools/ShareGoodsViewController.xib
+83
-0
opple_objc_json_client.h
Lighting/Tools/opple_objc_json_client.h
+438
-436
opple_objc_json_client.m
Lighting/Tools/opple_objc_json_client.m
+111
-118
No files found.
Lighting/Class/ClientViewController.m
View file @
3d29cf1b
...
...
@@ -462,6 +462,7 @@
if
(
!
isChange
)
{
[
Customermanager
manager
].
model
.
fid
=
returnValue
[
@"data"
];
[
self
SuccessMBProgressView
:
@"新增成功"
];
[
self
addAddressInformationRequest
];
}
else
{
[
self
SuccessMBProgressView
:
@"修改成功"
];
...
...
@@ -480,7 +481,6 @@
[
self
SetupUserShoppingCarNumberRequest
];
[
self
SetupUserRequest
];
[
self
ChangeCustomerName
];
[
self
addAddressInformationRequest
];
}
else
{
...
...
Lighting/Class/ClientdetailsViewController.m
View file @
3d29cf1b
...
...
@@ -270,7 +270,7 @@
orderdetails
.
orderCode
=
model
.
orderNumber
;
orderdetails
.
sectionTitle
=
@[
@"订单信息"
,
@"客户信息"
,
@"收货信息"
,
@"商品信息"
,
@"附件信息"
];
orderdetails
.
isShowattachment
=
YES
;
if
([
model
.
orderState
isEqualToString
:
@"006"
]
||
[
model
.
orderState
isEqualToString
:
@"002"
])
{
if
([
model
.
orderState
isEqualToString
:
@"006"
]
||
[
model
.
orderState
isEqualToString
:
@"002"
]
||
[
model
.
orderState
isEqualToString
:
@"003"
]
)
{
orderdetails
.
isShowPrintButton
=
YES
;
orderdetails
.
isDelectedButton
=
NO
;
}
...
...
Lighting/Class/HotCollectionViewCell.h
View file @
3d29cf1b
...
...
@@ -15,7 +15,7 @@
/**
* 数据源
*/
@property
(
nonatomic
,
strong
)
TOHottagEntity
*
responseDatas
;
@property
(
nonatomic
,
strong
)
DataDict
*
responseDatas
;
/**
...
...
Lighting/Class/HotCollectionViewCell.m
View file @
3d29cf1b
...
...
@@ -25,7 +25,6 @@
#pragma mark -UI
-
(
void
)
uiConfigAction
{
self
.
titleLabe
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
self
.
frame
.
size
.
width
,
self
.
frame
.
size
.
height
)];
self
.
titleLabe
.
textAlignment
=
NSTextAlignmentCenter
;
self
.
titleLabe
.
font
=
[
UIFont
systemFontOfSize
:
14
];
[
self
.
contentView
addSubview
:
self
.
titleLabe
];
...
...
@@ -33,10 +32,10 @@
#pragma mark -赋值
-
(
void
)
setResponseDatas
:
(
TOHottagEntity
*
)
responseDatas
-
(
void
)
setResponseDatas
:
(
DataDict
*
)
responseDatas
{
_responseDatas
=
responseDatas
;
self
.
titleLabe
.
text
=
_responseDatas
.
name
;
self
.
titleLabe
.
text
=
_responseDatas
.
type
name
;
}
...
...
Lighting/Class/Login/LoginViewController.m
View file @
3d29cf1b
...
...
@@ -223,7 +223,7 @@
sceneVC
.
conditionModel
.
styleEquals
=
nil
;
sceneVC
.
conditionModel
.
spaceEquals
=
nil
;
[
sceneVC
.
StyleButton
setTitle
:
@"风格"
forState
:
UIControlStateNormal
];
[
sceneVC
.
S
tyl
eButton
setTitle
:
@"空间"
forState
:
UIControlStateNormal
];
[
sceneVC
.
S
pac
eButton
setTitle
:
@"空间"
forState
:
UIControlStateNormal
];
[
sceneVC
.
seceneLibararyCollectionView
.
mj_header
beginRefreshing
];
}
else
if
([
Name
isEqualToString
:
@"产品库"
])
...
...
Lighting/Class/ProductLibraryViewController.m
View file @
3d29cf1b
...
...
@@ -155,6 +155,8 @@
[
self
.
screeningDatas
removeAllObjects
];
}
GoodsFilter
*
goodsStyle
=
[[
GoodsFilter
alloc
]
initWithDictionary
:
returnValue
[
@"data"
]
error
:
nil
];
[
self
.
screeningDatas
addObject
:
goodsStyle
.
styles
];
[
self
.
screeningDatas
addObject
:
goodsStyle
.
categories
];
[
self
.
screeningDatas
addObject
:
goodsStyle
.
space
];
...
...
@@ -517,38 +519,38 @@
#pragma mark -筛选
-
(
void
)
ScreeningButtonClick
{
ExperienceCentreViewController
*
ExperienceCenter
=
[[
self
getStoryboardWithName
]
instantiateViewControllerWithIdentifier
:
@"ExperienceCentre"
];
//
// ExperienceCentreViewController *ExperienceCenter = [[self getStoryboardWithName] instantiateViewControllerWithIdentifier:@"ExperienceCentre"];
//// [self presentViewController:ExperienceCenter animated:YES completion:nil];
//
// ExperienceCenter.modalPresentationStyle = UIModalPresentationOverFullScreen;
// UIPopoverPresentationController *popover = ExperienceCenter.popoverPresentationController;
// popover.sourceView = ExperienceCenter.view;
// [self presentViewController:ExperienceCenter animated:YES completion:nil];
ExperienceCenter
.
modalPresentationStyle
=
UIModalPresentationOverFullScreen
;
UIPopoverPresentationController
*
popover
=
ExperienceCenter
.
popoverPresentationController
;
popover
.
sourceView
=
ExperienceCenter
.
view
;
[
self
presentViewController
:
ExperienceCenter
animated
:
YES
completion
:
nil
];
self
.
screenView
=
[[[
NSBundle
mainBundle
]
loadNibNamed
:
@"ScreeningView"
owner
:
self
options
:
nil
]
firstObject
];
self
.
screenView
.
frame
=
CGRectMake
(
0
,
0
,
ScreenWidth
,
ScreenHeight
);
self
.
screenView
.
backgroundColor
=
[[
UIColor
blackColor
]
colorWithAlphaComponent
:
0
.
5
];
self
.
screenView
.
delegate
=
self
;
//点击手势
UITapGestureRecognizer
*
tap
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
DismissScreenView
)];
tap
.
delegate
=
self
;
tap
.
cancelsTouchesInView
=
NO
;
[
self
.
screenView
addGestureRecognizer
:
tap
];
self
.
screenView
.
frame
=
CGRectMake
(
0
,
0
,
ScreenWidth
,
ScreenHeight
);
[
self
.
view
.
window
addSubview
:
self
.
screenView
];
self
.
screenView
.
alpha
=
0
;
// self.screenView = [[[NSBundle mainBundle] loadNibNamed:@"ScreeningView" owner:self options:nil]firstObject];
// self.screenView.frame = CGRectMake(0, 0, ScreenWidth, ScreenHeight);
// self.screenView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.5];
// self.screenView.delegate = self;
// //点击手势
// UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(DismissScreenView)];
// tap.delegate = self;
// tap.cancelsTouchesInView = NO;
// [self.screenView addGestureRecognizer:tap];
// self.screenView.frame = CGRectMake(0, 0, ScreenWidth, ScreenHeight);
// [self.view.window addSubview:self.screenView];
// self.screenView.alpha = 0;
//
// //监听Segmented菜单
// [self.screenView.sortingSegmented addTarget:self action:@selector(sortingSegmentedClick:) forControlEvents:UIControlEventValueChanged];
//
// self.selectedIndex = 0;
// [self CreateClassificationView];
//
// [UIView animateWithDuration:0.2 animations:^{
//
// self.screenView.alpha = 1;
// }];
//监听Segmented菜单
[
self
.
screenView
.
sortingSegmented
addTarget
:
self
action
:
@selector
(
sortingSegmentedClick
:
)
forControlEvents
:
UIControlEventValueChanged
];
self
.
selectedIndex
=
0
;
[
self
CreateClassificationView
];
[
UIView
animateWithDuration
:
0
.
2
animations
:
^
{
self
.
screenView
.
alpha
=
1
;
}];
}
...
...
Lighting/Class/ScreeningFirstCollectionViewCell.m
View file @
3d29cf1b
...
...
@@ -25,12 +25,10 @@
-
(
void
)
uiConfigAction
{
self
.
titleLabe
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
self
.
titleLabe
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
self
.
titleLabe
.
frame
=
self
.
contentView
.
frame
;
[
self
.
titleLabe
setTitleColor
:
kMainBlueColor
forState
:
UIControlStateNormal
];
[
self
.
titleLabe
setBackgroundImage
:
TCImage
(
@"kamincolor"
)
forState
:
UIControlStateHighlighted
];
[
self
.
titleLabe
setTitleColor
:[
UIColor
whiteColor
]
forState
:
UIControlStateHighlighted
];
[
self
.
titleLabe
setTitleColor
:[
UIColor
whiteColor
]
forState
:
UIControlStateSelected
];
self
.
titleLabe
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
12
];
[
self
.
contentView
addSubview
:
self
.
titleLabe
];
[
self
.
titleLabe
addTarget
:
self
action
:
@selector
(
ButtonClick
)
forControlEvents
:
UIControlEventTouchUpInside
];
...
...
Lighting/Class/SearchViewController.m
View file @
3d29cf1b
...
...
@@ -17,7 +17,7 @@
/**
* 数据源
*/
@property
(
nonatomic
,
strong
)
Hot
TagResponse
*
response
;
@property
(
nonatomic
,
strong
)
Hot
Filter
*
response
;
/**
* 本地搜索历史
...
...
@@ -139,7 +139,7 @@
[
self
RemoveMBProgressHUDLoding
];
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
self
.
response
=
[[
Hot
TagResponse
alloc
]
initWithDictionary
:
returnValue
[
@"data"
]
error
:
nil
];
self
.
response
=
[[
Hot
Filter
alloc
]
initWithDictionary
:
returnValue
[
@"data"
]
error
:
nil
];
[
self
.
hotCollectionView
reloadData
];
}
else
...
...
@@ -187,10 +187,10 @@
{
if
([
collectionView
isEqual
:
self
.
hotCollectionView
])
{
[
self
.
localSearchArray
addObject
:[[
self
.
response
.
list
objectAtIndex_opple
:
indexPath
.
item
]
name
]];
[
self
.
localSearchArray
addObject
:[[
self
.
response
.
list
objectAtIndex_opple
:
indexPath
.
item
]
type
name
]];
//调用商品控制器
ProductLibraryViewController
*
productVC
=
[[
self
getStoryboardWithName
]
instantiateViewControllerWithIdentifier
:
@"productlibrary"
];
productVC
.
selectedCode
=
[[
self
.
response
.
list
objectAtIndex_opple
:
indexPath
.
item
]
fid
];
productVC
.
selectedCode
=
[[
self
.
response
.
list
objectAtIndex_opple
:
indexPath
.
item
]
typecode
];
[
self
.
navigationController
pushViewController
:
productVC
animated
:
NO
];
}
else
if
([
collectionView
isEqual
:
self
.
historyCollectionView
])
...
...
Lighting/Class/ShareViewController.m
View file @
3d29cf1b
...
...
@@ -61,15 +61,13 @@
[
self
dismissViewControllerAnimated
:
YES
completion
:
nil
];
NSData
*
imageData
=
UIImageJPEGRepresentation
(
self
.
shareImage
,
1
.
0
);
// 0b44439e5504e371015504f73d4f0025,0b44439e5504e371015504feae270028
NSDictionary
*
parameterDict
=
[
NSDictionary
dictionaryWithObjectsAndKeys
:
@"0b44439e5504e371015504f73d4f0025,0b44439e5504e371015504feae270028"
,
@"goodsIds"
,
@""
,
@"title"
,
@""
,
@"remark"
,
nil
];
NSDictionary
*
parameterDict
=
[
NSDictionary
dictionaryWithObjectsAndKeys
:
self
.
goodsIDs
,
@"goodsIds"
,
@""
,
@"title"
,
@""
,
@"remark"
,
nil
];
//上传图片
[[
NetworkRequestClassManager
Manager
]
UploadImageWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/system/shareGoods"
]
WithRequestType
:
0
WithImageDatas
:
imageData
WithParameter
:
parameterDict
WithReturnValueBlock
:^
(
id
returnValue
)
{
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
UMSocialUrlResource
*
resource
=
[[
UMSocialUrlResource
alloc
]
init
];
[
resource
setResourceType
:
UMSocialUrlResourceTypeImage
url
:
@"http://139.196.195.30:8090/opple-web/temp2/16052615120001.jpg"
];
NSString
*
shareWeb
=
returnValue
[
@"data"
][
@"url"
];
switch
(
sender
.
tag
)
{
case
101
:
//微信好友
...
...
@@ -77,7 +75,7 @@
//使用UMShareToWechatSession,UMShareToWechatTimeline,UMShareToWechatFavorite分别代表微信好友、微信朋友圈、微信收藏
[
UMSocialData
defaultData
].
extConfig
.
wechatSessionData
.
url
=
shareWeb
;
[[
UMSocialDataService
defaultDataService
]
postSNSWithTypes
:@[
UMShareToWechatSession
]
content
:
ShareTitle
image
:
nil
location
:
nil
urlResource
:
resource
presentedController
:
self
completion
:^
(
UMSocialResponseEntity
*
response
){
[[
UMSocialDataService
defaultDataService
]
postSNSWithTypes
:@[
UMShareToWechatSession
]
content
:
ShareTitle
image
:
self
.
shareImage
location
:
nil
urlResource
:
nil
presentedController
:
self
completion
:^
(
UMSocialResponseEntity
*
response
){
if
(
response
.
responseCode
==
UMSResponseCodeSuccess
)
{
[
self
SuccessMBProgressView
:
@"分享微信好友成功"
];
...
...
@@ -90,7 +88,7 @@
{
//使用UMShareToWechatSession,UMShareToWechatTimeline,UMShareToWechatFavorite分别代表微信好友、微信朋友圈、微信收藏
[
UMSocialData
defaultData
].
extConfig
.
wechatTimelineData
.
url
=
shareWeb
;
[[
UMSocialDataService
defaultDataService
]
postSNSWithTypes
:@[
UMShareToWechatTimeline
]
content
:
ShareTitle
image
:
nil
location
:
nil
urlResource
:
resource
presentedController
:
self
completion
:^
(
UMSocialResponseEntity
*
response
){
[[
UMSocialDataService
defaultDataService
]
postSNSWithTypes
:@[
UMShareToWechatTimeline
]
content
:
ShareTitle
image
:
self
.
shareImage
location
:
nil
urlResource
:
nil
presentedController
:
self
completion
:^
(
UMSocialResponseEntity
*
response
){
if
(
response
.
responseCode
==
UMSResponseCodeSuccess
)
{
[
self
SuccessMBProgressView
:
@"分享微信朋友圈成功"
];
...
...
@@ -103,7 +101,7 @@
//自定义分享样式
[
UMSocialData
defaultData
].
extConfig
.
sinaData
.
shareText
=
[
NSString
stringWithFormat
:
@"%@%@"
,
@"欧普照明"
,
shareWeb
];
[[
UMSocialDataService
defaultDataService
]
postSNSWithTypes
:@[
UMShareToSina
]
content
:
ShareTitle
image
:
nil
location
:
nil
urlResource
:
resource
presentedController
:
self
completion
:^
(
UMSocialResponseEntity
*
shareResponse
){
[[
UMSocialDataService
defaultDataService
]
postSNSWithTypes
:@[
UMShareToSina
]
content
:
ShareTitle
image
:
self
.
shareImage
location
:
nil
urlResource
:
nil
presentedController
:
self
completion
:^
(
UMSocialResponseEntity
*
shareResponse
){
if
(
shareResponse
.
responseCode
==
UMSResponseCodeSuccess
)
{
[
self
SuccessMBProgressView
:
@"分享新浪微博成功"
];
...
...
Lighting/Class/Shoppingcart/ShoppingViewController.h
View file @
3d29cf1b
...
...
@@ -32,4 +32,6 @@
*/
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
allSelectedButton
;
@end
Lighting/Class/Shoppingcart/ShoppingViewController.m
View file @
3d29cf1b
...
...
@@ -205,12 +205,12 @@
if
(
model
.
isSelected
)
{
goodsNumber
++
;
}
if
(
goodsNumber
==
0
)
{
self
.
allSelectedButton
.
selected
=
NO
;
}
if
(
goodsNumber
==
self
.
shopResponseArray
.
count
)
{
self
.
allSelectedButton
.
selected
=
YES
;
}
}
if
(
goodsNumber
==
self
.
shopResponseArray
.
count
)
{
self
.
allSelectedButton
.
selected
=
YES
;
}
else
{
self
.
allSelectedButton
.
selected
=
NO
;
}
[
self
CalculateSelectedGoodsAllprice
];
[
self
.
settlementButton
setTitle
:[
NSString
stringWithFormat
:
@"去结算(%ld)"
,
goodsNumber
]
forState
:
UIControlStateNormal
];
...
...
Lighting/Class/screeningSecondView.m
View file @
3d29cf1b
...
...
@@ -45,7 +45,8 @@
SelectedTableViewCell
*
cell
=
[
self
.
screeningTableview
cellForRowAtIndexPath
:[
NSIndexPath
indexPathForRow
:
_selectedIndex
inSection
:
0
]];
cell
.
titleLabe
.
backgroundColor
=
[
UIColor
whiteColor
];
cell
.
titleLabe
.
textColor
=
kMainBlueColor
;
[
self
.
screeningCollectionView
reloadData
];
}
...
...
@@ -204,6 +205,10 @@
//选中的key
NSString
*
selectedTypecode
=
nil
;
//选中状态
// ScreeningFirstCollectionViewCell *newCell = (ScreeningFirstCollectionViewCell *)[self.screeningCollectionView cellForItemAtIndexPath:indexpath];
// newCell.titleLabe.selected = YES;
// newCell.titleLabe.backgroundColor = kMainBlueColor;
if
(
self
.
selectedIndex
==
1
)
{
...
...
Lighting/Lighting.xcodeproj/project.pbxproj
View file @
3d29cf1b
...
...
@@ -62,6 +62,9 @@
2936F28C1D014147007CA67C
/* sceneScreeningCollectionViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
2936F28B1D014147007CA67C
/* sceneScreeningCollectionViewCell.m */
;
};
2936F28F1D0141FD007CA67C
/* ProductScreeningTableViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
2936F28E1D0141FD007CA67C
/* ProductScreeningTableViewCell.m */
;
};
2936F2931D016EB2007CA67C
/* SceneSelectedModel.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
2936F2921D016EB2007CA67C
/* SceneSelectedModel.m */
;
};
2936F2961D017BBD007CA67C
/* GoodsImageView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
2936F2951D017BBD007CA67C
/* GoodsImageView.m */
;
};
2936F29A1D01868E007CA67C
/* ShareGoodsViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
2936F2981D01868E007CA67C
/* ShareGoodsViewController.m */
;
};
2936F29B1D01868E007CA67C
/* ShareGoodsViewController.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
2936F2991D01868E007CA67C
/* ShareGoodsViewController.xib */
;
};
2942F8A61CDD80C2005B377E
/* authenticateView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
2942F8A51CDD80C2005B377E
/* authenticateView.m */
;
};
2942F8A81CDD80CE005B377E
/* authenticateView.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
2942F8A71CDD80CE005B377E
/* authenticateView.xib */
;
};
2949BABD1CD2EFA00049385A
/* InformationTableViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
2949BABC1CD2EFA00049385A
/* InformationTableViewCell.m */
;
};
...
...
@@ -265,6 +268,11 @@
2936F28E1D0141FD007CA67C
/* ProductScreeningTableViewCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ProductScreeningTableViewCell.m
;
sourceTree
=
"<group>"
;
};
2936F2911D016EB2007CA67C
/* SceneSelectedModel.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
SceneSelectedModel.h
;
sourceTree
=
"<group>"
;
};
2936F2921D016EB2007CA67C
/* SceneSelectedModel.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
SceneSelectedModel.m
;
sourceTree
=
"<group>"
;
};
2936F2941D017BBD007CA67C
/* GoodsImageView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
GoodsImageView.h
;
sourceTree
=
"<group>"
;
};
2936F2951D017BBD007CA67C
/* GoodsImageView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
GoodsImageView.m
;
sourceTree
=
"<group>"
;
};
2936F2971D01868E007CA67C
/* ShareGoodsViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ShareGoodsViewController.h
;
sourceTree
=
"<group>"
;
};
2936F2981D01868E007CA67C
/* ShareGoodsViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ShareGoodsViewController.m
;
sourceTree
=
"<group>"
;
};
2936F2991D01868E007CA67C
/* ShareGoodsViewController.xib */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
file.xib
;
path
=
ShareGoodsViewController.xib
;
sourceTree
=
"<group>"
;
};
2942F8A41CDD80C2005B377E
/* authenticateView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
authenticateView.h
;
sourceTree
=
"<group>"
;
};
2942F8A51CDD80C2005B377E
/* authenticateView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
authenticateView.m
;
sourceTree
=
"<group>"
;
};
2942F8A71CDD80CE005B377E
/* authenticateView.xib */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
file.xib
;
path
=
authenticateView.xib
;
sourceTree
=
"<group>"
;
};
...
...
@@ -799,6 +807,8 @@
2936F28B1D014147007CA67C
/* sceneScreeningCollectionViewCell.m */
,
2936F28D1D0141FD007CA67C
/* ProductScreeningTableViewCell.h */
,
2936F28E1D0141FD007CA67C
/* ProductScreeningTableViewCell.m */
,
2936F2941D017BBD007CA67C
/* GoodsImageView.h */
,
2936F2951D017BBD007CA67C
/* GoodsImageView.m */
,
);
name
=
view
;
sourceTree
=
"<group>"
;
...
...
@@ -1024,6 +1034,9 @@
children
=
(
29808A621CFEC41B001D1020
/* ExperienceCentreViewController.h */
,
29808A631CFEC41B001D1020
/* ExperienceCentreViewController.m */
,
2936F2971D01868E007CA67C
/* ShareGoodsViewController.h */
,
2936F2981D01868E007CA67C
/* ShareGoodsViewController.m */
,
2936F2991D01868E007CA67C
/* ShareGoodsViewController.xib */
,
);
name
=
Controller
;
sourceTree
=
"<group>"
;
...
...
@@ -1528,6 +1541,7 @@
29A938271CDAE31B00F21E54
/* ProductDetailsHeaderView.xib in Resources */
,
2908870C1CE5A308000B7097
/* DateSelectedViewController.xib in Resources */
,
2942F8A81CDD80CE005B377E
/* authenticateView.xib in Resources */
,
2936F29B1D01868E007CA67C
/* ShareGoodsViewController.xib in Resources */
,
29E384BF1CE9933300888199
/* AdditionalTableViewCell.xib in Resources */
,
29807C651CD20F0F00F111B8
/* StoryboardwithCYX.storyboard in Resources */
,
29EAAE901CDC3E9700C4DBA2
/* BillingInfoView.xib in Resources */
,
...
...
@@ -1685,6 +1699,7 @@
29834EB41CDF1EAA001A484F
/* screeningSecondView.m in Sources */
,
29706DA61CD082990003C412
/* main.m in Sources */
,
044CD6EE1CEB771C0004A715
/* SeceneCollectionPictureCell.m in Sources */
,
2936F2961D017BBD007CA67C
/* GoodsImageView.m in Sources */
,
291D6A621CFFE212007891AE
/* DataDictModel.m in Sources */
,
29A938251CDAE31200F21E54
/* ProductDetailsHeaderView.m in Sources */
,
291D6A6B1D000A2A007891AE
/* ProductScreeningCollectionViewCell.m in Sources */
,
...
...
@@ -1720,6 +1735,7 @@
2906B5D71CD89246000849B4
/* ClientDetailsTableViewCell.m in Sources */
,
29BB27801CD9DFD7009A0813
/* AboutViewController.m in Sources */
,
29F14BAA1CF6B60D0005D3E5
/* QRView.m in Sources */
,
2936F29A1D01868E007CA67C
/* ShareGoodsViewController.m in Sources */
,
29F725FE1CE1928F0072FE0E
/* opple_objc_json_client.m in Sources */
,
29834EC01CDF5E4E001A484F
/* ScreeningFirstCollectionViewCell.m in Sources */
,
29834EC51CDF76C1001A484F
/* UserViewController.m in Sources */
,
...
...
Lighting/Tools/ExperienceCentreViewController.m
View file @
3d29cf1b
...
...
@@ -11,6 +11,8 @@
#import "sceneScreeningCollectionViewCell.h"
#import "ProductScreeningTableViewCell.h"
#import "SceneSelectedModel.h"
#import "GoodsImageView.h"
#import "ShareGoodsViewController.h"
#define LEFTWIDTH 100
...
...
@@ -29,11 +31,6 @@
*/
@property
(
nonatomic
,
strong
)
NSMutableArray
*
productDatasArray
;
/**
* 选中灯
*/
@property
(
nonatomic
,
strong
)
UIImageView
*
imageView
;
@end
...
...
@@ -93,18 +90,29 @@
-
(
UICollectionViewCell
*
)
collectionView
:
(
UICollectionView
*
)
collectionView
cellForItemAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
sceneScreeningCollectionViewCell
*
cell
=
[
collectionView
dequeueReusableCellWithReuseIdentifier
:
@"sceneScreeningCollectionViewCell"
forIndexPath
:
indexPath
];
cell
.
selectedScrenImageView
.
image
=
[[
self
.
sceneDatasArray
objectAtIndex_opple
:
indexPath
.
item
]
sceneImage
];
SceneSelectedModel
*
model
=
[
self
.
sceneDatasArray
objectAtIndex_opple
:
indexPath
.
item
];
cell
.
selectedScrenImageView
.
image
=
[
model
sceneImage
];
cell
.
selectedScrenImageView
.
layer
.
masksToBounds
=
YES
;
cell
.
selectedScrenImageView
.
layer
.
cornerRadius
=
kCornerRadius
;
if
(
model
.
isSelectedState
)
{
cell
.
selectedScrenImageView
.
layer
.
borderWidth
=
2
.
0
f
;
cell
.
selectedScrenImageView
.
layer
.
borderColor
=
kMainBlueColor
.
CGColor
;
}
else
{
cell
.
selectedScrenImageView
.
layer
.
borderWidth
=
0
;
}
return
cell
;
}
-
(
void
)
collectionView
:
(
UICollectionView
*
)
collectionView
didSelectItemAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
sceneScreeningCollectionViewCell
*
cell
=
(
sceneScreeningCollectionViewCell
*
)[
collectionView
cellForItemAtIndexPath
:
indexPath
];
cell
.
selectedScrenImageView
.
layer
.
borderWidth
=
1
.
0
f
;
cell
.
selectedScrenImageView
.
layer
.
borderColor
=
kMainBlueColor
.
CGColor
;
self
.
sceneImageView
.
image
=
[[
self
.
sceneDatasArray
objectAtIndex_opple
:
indexPath
.
item
]
sceneImage
];
for
(
SceneSelectedModel
*
model
in
self
.
sceneDatasArray
)
{
model
.
isSelectedState
=
NO
;
}
SceneSelectedModel
*
model
=
[
self
.
sceneDatasArray
objectAtIndex_opple
:
indexPath
.
item
];
model
.
isSelectedState
=
YES
;
self
.
sceneImageView
.
image
=
[
model
sceneImage
];
[
self
.
sceneScrollview
reloadData
];
}
...
...
@@ -120,7 +128,15 @@
ProductScreeningTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
@"ProductScreeningTableViewCell"
forIndexPath
:
indexPath
];
cell
.
backgroundColor
=
[
UIColor
clearColor
];
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
cell
.
selectedGoodsImageView
.
image
=
[[
self
.
productDatasArray
objectAtIndex_opple
:
indexPath
.
row
]
sceneImage
];
SceneSelectedModel
*
model
=
[
self
.
productDatasArray
objectAtIndex_opple
:
indexPath
.
row
];
if
(
model
.
isSelectedState
)
{
cell
.
selectedGoodsImageView
.
layer
.
borderWidth
=
2
.
0
f
;
cell
.
selectedGoodsImageView
.
layer
.
borderColor
=
kMainBlueColor
.
CGColor
;
}
else
{
cell
.
selectedGoodsImageView
.
layer
.
borderWidth
=
0
;
}
cell
.
selectedGoodsImageView
.
image
=
[
model
sceneImage
];
return
cell
;
}
...
...
@@ -132,19 +148,26 @@
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
self
.
imageView
=
[[
UIImageView
alloc
]
initWithFrame
:
CGRectMake
(
200
,
200
,
133
,
100
)];
self
.
imageView
.
userInteractionEnabled
=
YES
;
self
.
imageView
.
image
=
[[
self
.
productDatasArray
objectAtIndex_opple
:
indexPath
.
row
]
sceneImage
];
[
self
addImageGestures
:
self
.
imageView
];
[
self
.
view
addSubview
:
self
.
imageView
];
ProductScreeningTableViewCell
*
cell
=
[
tableView
cellForRowAtIndexPath
:
indexPath
];
CGRect
cellRect
=
[
cell
convertRect
:
cell
.
bounds
toView
:
self
.
view
];
GoodsImageView
*
imageView
=
[[
GoodsImageView
alloc
]
initWithFrame
:
cellRect
];
imageView
.
userInteractionEnabled
=
YES
;
[
UIView
animateWithDuration
:
0
.
5
animations
:
^
{
imageView
.
frame
=
CGRectMake
(
ScreenWidth
/
2
,
ScreenHeight
/
2
,
266
,
200
);
}];
for
(
SceneSelectedModel
*
model
in
self
.
productDatasArray
)
{
model
.
isSelectedState
=
NO
;
}
SceneSelectedModel
*
model
=
[
self
.
productDatasArray
objectAtIndex_opple
:
indexPath
.
row
];
model
.
isSelectedState
=
YES
;
imageView
.
image
=
[
model
sceneImage
];
[
self
.
view
addSubview
:
imageView
];
[
self
.
productScrollview
reloadData
];
}
#pragma mark -返回
-
(
IBAction
)
ReturnButtonClickAction
:
(
UIButton
*
)
sender
{
...
...
@@ -154,16 +177,39 @@
#pragma mark -购物袋
-
(
IBAction
)
ShoppingBagButtonClickAction
:
(
UIButton
*
)
sender
{
}
#pragma mark -分享
-
(
IBAction
)
ShareButtonClickAction
:
(
UIButton
*
)
sender
{
ShareGoodsViewController
*
shareController
=
[[
ShareGoodsViewController
alloc
]
init
];
shareController
.
preferredContentSize
=
CGSizeMake
(
290
,
120
);
shareController
.
modalPresentationStyle
=
UIModalPresentationPopover
;
UIPopoverPresentationController
*
popover
=
shareController
.
popoverPresentationController
;
popover
.
permittedArrowDirections
=
UIPopoverArrowDirectionLeft
;
popover
.
sourceView
=
shareController
.
view
;
popover
.
sourceRect
=
CGRectMake
(
sender
.
mj_x
,
sender
.
mj_y
-
30
,
sender
.
mj_w
,
sender
.
mj_h
);
[
self
presentViewController
:
shareController
animated
:
YES
completion
:
nil
];
}
#pragma mark -拍照
-
(
IBAction
)
TakingPhotoButtonClickAction
:
(
UIButton
*
)
sender
{
}
#pragma mark -全屏
-
(
IBAction
)
AmplificationButtonClickAction
:
(
UIButton
*
)
sender
{
...
...
@@ -303,56 +349,6 @@
#pragma mark -添加图片缩放、移动、旋转手势
-
(
void
)
addImageGestures
:
(
UIImageView
*
)
imageView
{
UIRotationGestureRecognizer
*
rotationGes
=
[[
UIRotationGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
backGroundViewRotationAction
:
)];
rotationGes
.
delegate
=
self
;
[
imageView
addGestureRecognizer
:
rotationGes
];
UIPinchGestureRecognizer
*
pinchGes
=
[[
UIPinchGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
backGroundViewPinchAction
:
)];
pinchGes
.
delegate
=
self
;
[
imageView
addGestureRecognizer
:
pinchGes
];
UIPanGestureRecognizer
*
panGes
=
[[
UIPanGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
backGroundViewPanAction
:
)];
[
panGes
setMinimumNumberOfTouches
:
1
];
[
panGes
setMaximumNumberOfTouches
:
1
];
panGes
.
delegate
=
self
;
[
imageView
addGestureRecognizer
:
panGes
];
}
#pragma mark 手势触发事件
-
(
void
)
backGroundViewPinchAction
:
(
UIPinchGestureRecognizer
*
)
gesture
{
UIView
*
view
=
self
.
imageView
;
if
(
gesture
.
state
==
UIGestureRecognizerStateBegan
||
gesture
.
state
==
UIGestureRecognizerStateChanged
)
{
view
.
transform
=
CGAffineTransformScale
(
view
.
transform
,
gesture
.
scale
,
gesture
.
scale
);
gesture
.
scale
=
1
;
}
}
-
(
void
)
backGroundViewPanAction
:
(
UIPanGestureRecognizer
*
)
gesture
{
if
(
gesture
.
numberOfTouches
==
1
)
{
if
(
gesture
.
state
==
UIGestureRecognizerStateBegan
||
gesture
.
state
==
UIGestureRecognizerStateChanged
)
{
CGPoint
transLation
=
[
gesture
translationInView
:
self
.
view
];
self
.
imageView
.
center
=
CGPointMake
(
self
.
imageView
.
center
.
x
+
transLation
.
x
,
self
.
imageView
.
center
.
y
+
transLation
.
y
);
[
gesture
setTranslation
:
CGPointZero
inView
:
self
.
view
];
}
}
}
-
(
void
)
backGroundViewRotationAction
:
(
UIRotationGestureRecognizer
*
)
gesture
{
self
.
imageView
.
transform
=
CGAffineTransformRotate
(
self
.
imageView
.
transform
,
gesture
.
rotation
);
gesture
.
rotation
=
0
;
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
// Dispose of any resources that can be recreated.
...
...
Lighting/Tools/GoodsImageView.h
0 → 100644
View file @
3d29cf1b
//
// GoodsImageView.h
// Lighting
//
// Created by 曹云霄 on 16/6/3.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
GoodsImageView
:
UIImageView
<
UIGestureRecognizerDelegate
>
@end
Lighting/Tools/GoodsImageView.m
0 → 100644
View file @
3d29cf1b
//
// GoodsImageView.m
// Lighting
//
// Created by 曹云霄 on 16/6/3.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "GoodsImageView.h"
@implementation
GoodsImageView
-
(
instancetype
)
initWithFrame
:(
CGRect
)
frame
{
if
(
self
=
[
super
initWithFrame
:
frame
])
{
UIRotationGestureRecognizer
*
rotationGes
=
[[
UIRotationGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
backGroundViewRotationAction
:
)];
rotationGes
.
delegate
=
self
;
[
self
addGestureRecognizer
:
rotationGes
];
UIPinchGestureRecognizer
*
pinchGes
=
[[
UIPinchGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
backGroundViewPinchAction
:
)];
pinchGes
.
delegate
=
self
;
[
self
addGestureRecognizer
:
pinchGes
];
UIPanGestureRecognizer
*
panGes
=
[[
UIPanGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
backGroundViewPanAction
:
)];
[
panGes
setMinimumNumberOfTouches
:
1
];
[
panGes
setMaximumNumberOfTouches
:
1
];
panGes
.
delegate
=
self
;
[
self
addGestureRecognizer
:
panGes
];
UILongPressGestureRecognizer
*
longGes
=
[[
UILongPressGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
LongPressAction
:
)];
longGes
.
delegate
=
self
;
[
self
addGestureRecognizer
:
longGes
];
}
return
self
;
}
#pragma mark -缩放
-
(
void
)
backGroundViewPinchAction
:(
UIPinchGestureRecognizer
*
)
gesture
{
UIView
*
view
=
self
;
if
(
gesture
.
state
==
UIGestureRecognizerStateBegan
||
gesture
.
state
==
UIGestureRecognizerStateChanged
)
{
view
.
transform
=
CGAffineTransformScale
(
view
.
transform
,
gesture
.
scale
,
gesture
.
scale
);
gesture
.
scale
=
1
;
}
}
#pragma mark -拖拉
-
(
void
)
backGroundViewPanAction
:(
UIPanGestureRecognizer
*
)
gesture
{
UIView
*
view
=
gesture
.
view
;
if
(
gesture
.
state
==
UIGestureRecognizerStateBegan
||
gesture
.
state
==
UIGestureRecognizerStateChanged
)
{
CGPoint
translation
=
[
gesture
translationInView
:
view
.
superview
];
[
view
setCenter
:(
CGPoint
){
view
.
center
.
x
+
translation
.
x
,
view
.
center
.
y
+
translation
.
y
}];
[
gesture
setTranslation
:
CGPointZero
inView
:
view
.
superview
];
}
}
#pragma mark -旋转
-
(
void
)
backGroundViewRotationAction
:(
UIRotationGestureRecognizer
*
)
gesture
{
self
.
transform
=
CGAffineTransformRotate
(
self
.
transform
,
gesture
.
rotation
);
gesture
.
rotation
=
0
;
}
#pragma mark -长按
-
(
void
)
LongPressAction
:(
UILongPressGestureRecognizer
*
)
longPress
{
[
self
removeFromSuperview
];
}
@end
Lighting/Tools/SceneViewController.m
View file @
3d29cf1b
...
...
@@ -492,7 +492,7 @@
newModel
.
resellerInv
=
model
.
resellerInv
;
newModel
.
resellerTagPrice
=
model
.
resellerTagPrice
;
newModel
.
resellerState
=
model
.
resellerState
;
newModel
.
category
name
=
model
.
categoryn
ame
;
newModel
.
category
Name
=
model
.
categoryN
ame
;
newModel
.
brandName
=
model
.
brandName
;
newModel
.
fid
=
model
.
fid
;
newModel
.
createDate
=
model
.
createDate
;
...
...
Lighting/Tools/ShareGoodsViewController.h
0 → 100644
View file @
3d29cf1b
//
// ShareGoodsViewController.h
// Lighting
//
// Created by 曹云霄 on 16/6/3.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "BaseViewController.h"
@protocol
SharePicturedelegate
<
NSObject
>
//回调
-
(
void
)
ShareProductImage
:
(
UIImage
*
)
image
;
/**
* 上传图片进度(显示)
*/
-
(
void
)
UploadImageProgress
:(
double
)
progress
;
/**
* 上传完成
*/
-
(
void
)
UploadImageSuccess
;
/**
* 上传失败
*/
-
(
void
)
UploadImageFailue
;
@end
@interface
ShareGoodsViewController
:
BaseViewController
/**
* 需要分享的图片
*/
@property
(
nonatomic
,
strong
)
UIImage
*
shareImage
;
/**
* 分享的商品id
*/
@property
(
nonatomic
,
copy
)
NSString
*
goodsIds
;
/**
* 代理
*/
@property
(
nonatomic
,
assign
)
id
<
SharePicturedelegate
>
delegate
;
@end
Lighting/Tools/ShareGoodsViewController.m
0 → 100644
View file @
3d29cf1b
//
// ShareGoodsViewController.m
// Lighting
//
// Created by 曹云霄 on 16/6/3.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "ShareGoodsViewController.h"
@interface
ShareGoodsViewController
()
@end
@implementation
ShareGoodsViewController
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
// Do any additional setup after loading the view from its nib.
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
// Dispose of any resources that can be recreated.
}
#pragma mark -分享
-
(
IBAction
)
ShareWeiChatAntWeiboAction
:
(
UIButton
*
)
sender
{
[
self
dismissViewControllerAnimated
:
YES
completion
:
nil
];
NSData
*
imageData
=
UIImageJPEGRepresentation
(
self
.
shareImage
,
1
.
0
);
// 0b44439e5504e371015504f73d4f0025,0b44439e5504e371015504feae270028
NSDictionary
*
parameterDict
=
[
NSDictionary
dictionaryWithObjectsAndKeys
:
@"0b44439e5504e371015504f73d4f0025,0b44439e5504e371015504feae270028"
,
@"goodsIds"
,
@""
,
@"title"
,
@""
,
@"remark"
,
nil
];
//上传图片
[[
NetworkRequestClassManager
Manager
]
UploadImageWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/system/shareGoods"
]
WithRequestType
:
0
WithImageDatas
:
imageData
WithParameter
:
parameterDict
WithReturnValueBlock
:^
(
id
returnValue
)
{
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
UMSocialUrlResource
*
resource
=
[[
UMSocialUrlResource
alloc
]
init
];
[
resource
setResourceType
:
UMSocialUrlResourceTypeImage
url
:
@"http://139.196.195.30:8090/opple-web/temp2/16052615120001.jpg"
];
NSString
*
shareWeb
=
returnValue
[
@"data"
][
@"url"
];
switch
(
sender
.
tag
)
{
case
101
:
//微信好友
{
//自定义样式
//使用UMShareToWechatSession,UMShareToWechatTimeline,UMShareToWechatFavorite分别代表微信好友、微信朋友圈、微信收藏
[
UMSocialData
defaultData
].
extConfig
.
wechatSessionData
.
url
=
shareWeb
;
[[
UMSocialDataService
defaultDataService
]
postSNSWithTypes
:@[
UMShareToWechatSession
]
content
:
ShareTitle
image
:
nil
location
:
nil
urlResource
:
resource
presentedController
:
self
completion
:^
(
UMSocialResponseEntity
*
response
){
if
(
response
.
responseCode
==
UMSResponseCodeSuccess
)
{
[
self
SuccessMBProgressView
:
@"分享微信好友成功"
];
}
}];
}
break
;
case
102
:
//微信朋友圈
{
//使用UMShareToWechatSession,UMShareToWechatTimeline,UMShareToWechatFavorite分别代表微信好友、微信朋友圈、微信收藏
[
UMSocialData
defaultData
].
extConfig
.
wechatTimelineData
.
url
=
shareWeb
;
[[
UMSocialDataService
defaultDataService
]
postSNSWithTypes
:@[
UMShareToWechatTimeline
]
content
:
ShareTitle
image
:
nil
location
:
nil
urlResource
:
resource
presentedController
:
self
completion
:^
(
UMSocialResponseEntity
*
response
){
if
(
response
.
responseCode
==
UMSResponseCodeSuccess
)
{
[
self
SuccessMBProgressView
:
@"分享微信朋友圈成功"
];
}
}];
}
break
;
case
103
:
//新浪微博
{
//自定义分享样式
[
UMSocialData
defaultData
].
extConfig
.
sinaData
.
shareText
=
[
NSString
stringWithFormat
:
@"%@%@"
,
@"欧普照明"
,
shareWeb
];
[[
UMSocialDataService
defaultDataService
]
postSNSWithTypes
:@[
UMShareToSina
]
content
:
ShareTitle
image
:
nil
location
:
nil
urlResource
:
resource
presentedController
:
self
completion
:^
(
UMSocialResponseEntity
*
shareResponse
){
if
(
shareResponse
.
responseCode
==
UMSResponseCodeSuccess
)
{
[
self
SuccessMBProgressView
:
@"分享新浪微博成功"
];
}
}];
}
break
;
default
:
break
;
}
}
else
{
[
self
ErrorMBProgressView
:
returnValue
[
@"message"
]];
}
}
WithprogressBlock
:^
(
double
progress
)
{
if
(
progress
>=
1
)
{
if
([
self
.
delegate
respondsToSelector
:
@selector
(
UploadImageSuccess
)])
{
[
self
.
delegate
UploadImageSuccess
];
}
}
else
{
if
([
self
.
delegate
respondsToSelector
:
@selector
(
UploadImageProgress
:)])
{
[
self
.
delegate
UploadImageProgress
:
progress
];
}
}
}
WithErrorCodeBlock
:^
(
id
errorCodeValue
)
{
}
WithFailureBlock
:^
(
NSError
*
error
)
{
if
([
self
.
delegate
respondsToSelector
:
@selector
(
UploadImageFailue
)])
{
[
self
.
delegate
UploadImageFailue
];
}
[
self
ErrorMBProgressView
:
error
.
localizedDescription
];
}];
}
@end
Lighting/Tools/ShareGoodsViewController.xib
0 → 100644
View file @
3d29cf1b
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"10117"
systemVersion=
"15F34"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"10085"
/>
</dependencies>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"ShareGoodsViewController"
>
<connections>
<outlet
property=
"view"
destination=
"i5M-Pr-FkT"
id=
"sfx-zR-JGt"
/>
</connections>
</placeholder>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"-2"
customClass=
"UIResponder"
/>
<view
clearsContextBeforeDrawing=
"NO"
contentMode=
"scaleToFill"
id=
"i5M-Pr-FkT"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"290"
height=
"120"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<subviews>
<button
opaque=
"NO"
tag=
"100"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"rpz-DZ-thX"
>
<rect
key=
"frame"
x=
"17"
y=
"20"
width=
"80"
height=
"80"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<inset
key=
"titleEdgeInsets"
minX=
"-59"
minY=
"61"
maxX=
"0.0"
maxY=
"0.0"
/>
<inset
key=
"imageEdgeInsets"
minX=
"11"
minY=
"-22"
maxX=
"0.0"
maxY=
"0.0"
/>
<state
key=
"normal"
title=
"微信"
image=
"wechat"
>
<color
key=
"titleColor"
white=
"0.33333333333333331"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
</state>
<connections>
<action
selector=
"ShareWeiChatAntWeiboAction:"
destination=
"-1"
eventType=
"touchUpInside"
id=
"oQJ-kM-Ca6"
/>
</connections>
</button>
<button
opaque=
"NO"
tag=
"102"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"nwv-gn-bLJ"
>
<rect
key=
"frame"
x=
"193"
y=
"20"
width=
"80"
height=
"80"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<inset
key=
"titleEdgeInsets"
minX=
"-59"
minY=
"61"
maxX=
"0.0"
maxY=
"0.0"
/>
<inset
key=
"imageEdgeInsets"
minX=
"11"
minY=
"-22"
maxX=
"0.0"
maxY=
"0.0"
/>
<state
key=
"normal"
title=
"微博"
image=
"weibo"
>
<color
key=
"titleColor"
white=
"0.33333333333333331"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
</state>
<connections>
<action
selector=
"ShareWeiChatAntWeiboAction:"
destination=
"-1"
eventType=
"touchUpInside"
id=
"uFH-1Q-GMU"
/>
</connections>
</button>
<button
opaque=
"NO"
tag=
"101"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"z9x-vh-bIz"
>
<rect
key=
"frame"
x=
"105"
y=
"20"
width=
"80"
height=
"80"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<inset
key=
"titleEdgeInsets"
minX=
"-59"
minY=
"61"
maxX=
"0.0"
maxY=
"0.0"
/>
<inset
key=
"imageEdgeInsets"
minX=
"11"
minY=
"-22"
maxX=
"0.0"
maxY=
"0.0"
/>
<state
key=
"normal"
title=
"微信朋友圈"
image=
"Friends-Circle"
>
<color
key=
"titleColor"
white=
"0.33333333333333331"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
</state>
<connections>
<action
selector=
"ShareWeiChatAntWeiboAction:"
destination=
"-1"
eventType=
"touchUpInside"
id=
"IEt-es-A3G"
/>
</connections>
</button>
</subviews>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"calibratedWhite"
/>
<constraints>
<constraint
firstItem=
"rpz-DZ-thX"
firstAttribute=
"top"
secondItem=
"i5M-Pr-FkT"
secondAttribute=
"top"
constant=
"20"
id=
"2DR-cN-FHA"
/>
<constraint
firstItem=
"nwv-gn-bLJ"
firstAttribute=
"height"
secondItem=
"rpz-DZ-thX"
secondAttribute=
"height"
id=
"5z1-k0-fZq"
/>
<constraint
firstItem=
"z9x-vh-bIz"
firstAttribute=
"leading"
secondItem=
"rpz-DZ-thX"
secondAttribute=
"trailing"
constant=
"8"
id=
"CoU-bx-U60"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"z9x-vh-bIz"
secondAttribute=
"bottom"
constant=
"20"
id=
"I60-JS-uqx"
/>
<constraint
firstAttribute=
"trailing"
secondItem=
"nwv-gn-bLJ"
secondAttribute=
"trailing"
constant=
"17"
id=
"J8o-zb-XCs"
/>
<constraint
firstItem=
"z9x-vh-bIz"
firstAttribute=
"height"
secondItem=
"rpz-DZ-thX"
secondAttribute=
"height"
id=
"O9a-zj-XTx"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"rpz-DZ-thX"
secondAttribute=
"bottom"
constant=
"20"
id=
"PKX-Gz-Z7H"
/>
<constraint
firstItem=
"nwv-gn-bLJ"
firstAttribute=
"width"
secondItem=
"rpz-DZ-thX"
secondAttribute=
"width"
id=
"QEI-kO-Md0"
/>
<constraint
firstItem=
"z9x-vh-bIz"
firstAttribute=
"leading"
secondItem=
"rpz-DZ-thX"
secondAttribute=
"trailing"
constant=
"8"
id=
"QSy-bA-kCg"
/>
<constraint
firstAttribute=
"bottom"
secondItem=
"nwv-gn-bLJ"
secondAttribute=
"bottom"
constant=
"20"
id=
"T7S-pu-yWb"
/>
<constraint
firstItem=
"rpz-DZ-thX"
firstAttribute=
"leading"
secondItem=
"i5M-Pr-FkT"
secondAttribute=
"leading"
constant=
"17"
id=
"Wtr-rA-mBx"
/>
<constraint
firstItem=
"nwv-gn-bLJ"
firstAttribute=
"leading"
secondItem=
"z9x-vh-bIz"
secondAttribute=
"trailing"
constant=
"8"
id=
"ZhL-Kb-bqk"
/>
<constraint
firstItem=
"nwv-gn-bLJ"
firstAttribute=
"top"
secondItem=
"i5M-Pr-FkT"
secondAttribute=
"top"
constant=
"20"
id=
"dVy-iV-xhB"
/>
<constraint
firstItem=
"z9x-vh-bIz"
firstAttribute=
"width"
secondItem=
"rpz-DZ-thX"
secondAttribute=
"width"
id=
"hLP-b4-Xdo"
/>
<constraint
firstItem=
"z9x-vh-bIz"
firstAttribute=
"top"
secondItem=
"i5M-Pr-FkT"
secondAttribute=
"top"
constant=
"20"
id=
"p1r-W5-L6A"
/>
<constraint
firstItem=
"nwv-gn-bLJ"
firstAttribute=
"leading"
secondItem=
"z9x-vh-bIz"
secondAttribute=
"trailing"
constant=
"8"
id=
"rm9-Yx-kGd"
/>
</constraints>
<freeformSimulatedSizeMetrics
key=
"simulatedDestinationMetrics"
/>
<point
key=
"canvasLocation"
x=
"406"
y=
"219"
/>
</view>
</objects>
<resources>
<image
name=
"Friends-Circle"
width=
"60"
height=
"60"
/>
<image
name=
"wechat"
width=
"60"
height=
"60"
/>
<image
name=
"weibo"
width=
"60"
height=
"60"
/>
</resources>
</document>
Lighting/Tools/opple_objc_json_client.h
View file @
3d29cf1b
This diff is collapsed.
Click to expand it.
Lighting/Tools/opple_objc_json_client.m
View file @
3d29cf1b
...
...
@@ -61,9 +61,8 @@
@end
@implementation
DataDict
@synthesize
typename
;
@synthesize
typecode
;
@implementation
RsEmployeeRequest
@synthesize
employee
;
+
(
BOOL
)
propertyIsOptional
:(
NSString
*
)
propertyName
{
...
...
@@ -73,15 +72,10 @@
@end
@implementation
GoodsCondition
@synthesize
nameLike
;
@synthesize
categoryEquals
;
@synthesize
styleEquals
;
@synthesize
spaceEquals
;
@synthesize
materialEqueals
;
@synthesize
startprice
;
@synthesize
endprice
;
@synthesize
page
;
@implementation
GoodsCategory
@synthesize
fid
;
@synthesize
name
;
@synthesize
children
;
+
(
BOOL
)
propertyIsOptional
:(
NSString
*
)
propertyName
{
...
...
@@ -89,6 +83,14 @@
}
+
(
JSONKeyMapper
*
)
keyMapper
{
return
[[
JSONKeyMapper
alloc
]
initWithDictionary
:@{
@"id"
:
@"fid"
,
}];
}
@end
@implementation
GoodsFilter
...
...
@@ -106,12 +108,8 @@
@end
@implementation
OrderBill
@synthesize
datapage
;
@synthesize
order
;
@synthesize
orderdetailList
;
@synthesize
consumer
;
@synthesize
employee
;
@implementation
HotFilter
@synthesize
list
;
+
(
BOOL
)
propertyIsOptional
:(
NSString
*
)
propertyName
{
...
...
@@ -146,9 +144,10 @@
@end
@implementation
SceneFilter
@synthesize
styles
;
@synthesize
space
;
@implementation
SceneCondition
@synthesize
styleEquals
;
@synthesize
spaceEquals
;
@synthesize
page
;
+
(
BOOL
)
propertyIsOptional
:(
NSString
*
)
propertyName
{
...
...
@@ -158,8 +157,9 @@
@end
@implementation
RsShippingAddrEntity
@synthesize
list
;
@implementation
SceneFilter
@synthesize
styles
;
@synthesize
space
;
+
(
BOOL
)
propertyIsOptional
:(
NSString
*
)
propertyName
{
...
...
@@ -169,10 +169,8 @@
@end
@implementation
SaveShoppingCartRequest
@synthesize
consumerId
;
@synthesize
goodsId
;
@synthesize
count
;
@implementation
DeleteCartRequest
@synthesize
cartIds
;
+
(
BOOL
)
propertyIsOptional
:(
NSString
*
)
propertyName
{
...
...
@@ -194,21 +192,9 @@
@end
@implementation
TOConsumerEntity
@synthesize
fid
;
@synthesize
createName
;
@synthesize
createBy
;
@synthesize
createDate
;
@synthesize
sysOrgCode
;
@synthesize
name
;
@synthesize
mobile
;
@synthesize
province
;
@synthesize
city
;
@synthesize
country
;
@synthesize
address
;
@synthesize
picture
;
@synthesize
lastVisitedTime
;
@synthesize
company
;
@implementation
RsShareResponse
@synthesize
shareId
;
@synthesize
url
;
+
(
BOOL
)
propertyIsOptional
:(
NSString
*
)
propertyName
{
...
...
@@ -216,17 +202,14 @@
}
+
(
JSONKeyMapper
*
)
keyMapper
{
return
[[
JSONKeyMapper
alloc
]
initWithDictionary
:@{
@"id"
:
@"fid"
,
}];
}
@end
@implementation
VOResellerGoodsEntity
@implementation
TOGoodsEntity
@synthesize
resellerInv
;
@synthesize
resellerTagPrice
;
@synthesize
resellerState
;
@synthesize
categoryName
;
@synthesize
brandName
;
@synthesize
fid
;
@synthesize
createDate
;
@synthesize
onlineTime
;
...
...
@@ -261,9 +244,6 @@
@synthesize
lightNumber
;
@synthesize
pictures
;
@synthesize
barcode
;
@synthesize
resellerId
;
@synthesize
categoryName
;
@synthesize
brandName
;
+
(
BOOL
)
propertyIsOptional
:(
NSString
*
)
propertyName
{
...
...
@@ -281,13 +261,18 @@
@end
@implementation
TOGoodsCategoryEntity
@synthesize
upperName
;
@implementation
TOGoodsBrandEntity
@synthesize
fid
;
@synthesize
createName
;
@synthesize
createBy
;
@synthesize
createDate
;
@synthesize
sysOrgCode
;
@synthesize
sysCompanyCode
;
@synthesize
code
;
@synthesize
name
;
@synthesize
upperId
;
@synthesize
level
;
@synthesize
state
;
@synthesize
logo
;
@synthesize
fdescription
;
+
(
BOOL
)
propertyIsOptional
:(
NSString
*
)
propertyName
{
...
...
@@ -298,6 +283,7 @@
+
(
JSONKeyMapper
*
)
keyMapper
{
return
[[
JSONKeyMapper
alloc
]
initWithDictionary
:@{
@"description"
:
@"fdescription"
,
@"id"
:
@"fid"
,
}];
}
...
...
@@ -305,12 +291,13 @@
@end
@implementation
TOGoodsLabelCategoryEntity
@implementation
TOGoodsLabelEntity
@synthesize
category
;
@synthesize
fid
;
@synthesize
sysOrgCode
;
@synthesize
sysCompanyCode
;
@synthesize
code
;
@synthesize
name
;
@synthesize
categoryId
;
+
(
BOOL
)
propertyIsOptional
:(
NSString
*
)
propertyName
{
...
...
@@ -353,6 +340,7 @@
@synthesize
payType
;
@synthesize
consumerName
;
@synthesize
guideName
;
@synthesize
resellerName
;
+
(
BOOL
)
propertyIsOptional
:(
NSString
*
)
propertyName
{
...
...
@@ -533,33 +521,12 @@ NSString * const SORTDIRECTION_DESC = @"desc";
@end
@implementation
TOHottagEntity
@synthesize
fid
;
@synthesize
name
;
+
(
BOOL
)
propertyIsOptional
:(
NSString
*
)
propertyName
{
return
YES
;
}
+
(
JSONKeyMapper
*
)
keyMapper
{
return
[[
JSONKeyMapper
alloc
]
initWithDictionary
:@{
@"id"
:
@"fid"
,
}];
}
@end
@implementation
TOGoodsLabelEntity
@synthesize
category
;
@implementation
TOGoodsLabelCategoryEntity
@synthesize
fid
;
@synthesize
sysOrgCode
;
@synthesize
sysCompanyCode
;
@synthesize
code
;
@synthesize
name
;
@synthesize
categoryId
;
+
(
BOOL
)
propertyIsOptional
:(
NSString
*
)
propertyName
{
...
...
@@ -577,18 +544,13 @@ NSString * const SORTDIRECTION_DESC = @"desc";
@end
@implementation
TOGoodsBrandEntity
@implementation
TOGoodsCategoryEntity
@synthesize
upperName
;
@synthesize
fid
;
@synthesize
createName
;
@synthesize
createBy
;
@synthesize
createDate
;
@synthesize
sysOrgCode
;
@synthesize
sysCompanyCode
;
@synthesize
code
;
@synthesize
name
;
@synthesize
state
;
@synthesize
logo
;
@synthesize
fdescription
;
@synthesize
upperId
;
@synthesize
level
;
+
(
BOOL
)
propertyIsOptional
:(
NSString
*
)
propertyName
{
...
...
@@ -599,7 +561,6 @@ NSString * const SORTDIRECTION_DESC = @"desc";
+
(
JSONKeyMapper
*
)
keyMapper
{
return
[[
JSONKeyMapper
alloc
]
initWithDictionary
:@{
@"description"
:
@"fdescription"
,
@"id"
:
@"fid"
,
}];
}
...
...
@@ -607,12 +568,7 @@ NSString * const SORTDIRECTION_DESC = @"desc";
@end
@implementation
TOGoodsEntity
@synthesize
resellerInv
;
@synthesize
resellerTagPrice
;
@synthesize
resellerState
;
@synthesize
categoryname
;
@synthesize
brandName
;
@implementation
VOResellerGoodsEntity
@synthesize
fid
;
@synthesize
createDate
;
@synthesize
onlineTime
;
...
...
@@ -647,6 +603,9 @@ NSString * const SORTDIRECTION_DESC = @"desc";
@synthesize
lightNumber
;
@synthesize
pictures
;
@synthesize
barcode
;
@synthesize
resellerId
;
@synthesize
categoryName
;
@synthesize
brandName
;
+
(
BOOL
)
propertyIsOptional
:(
NSString
*
)
propertyName
{
...
...
@@ -664,9 +623,21 @@ NSString * const SORTDIRECTION_DESC = @"desc";
@end
@implementation
RsShareResponse
@synthesize
shareId
;
@synthesize
url
;
@implementation
TOConsumerEntity
@synthesize
fid
;
@synthesize
createName
;
@synthesize
createBy
;
@synthesize
createDate
;
@synthesize
sysOrgCode
;
@synthesize
name
;
@synthesize
mobile
;
@synthesize
province
;
@synthesize
city
;
@synthesize
country
;
@synthesize
address
;
@synthesize
picture
;
@synthesize
lastVisitedTime
;
@synthesize
company
;
+
(
BOOL
)
propertyIsOptional
:(
NSString
*
)
propertyName
{
...
...
@@ -674,10 +645,20 @@ NSString * const SORTDIRECTION_DESC = @"desc";
}
+
(
JSONKeyMapper
*
)
keyMapper
{
return
[[
JSONKeyMapper
alloc
]
initWithDictionary
:@{
@"id"
:
@"fid"
,
}];
}
@end
@implementation
DeleteCartRequest
@synthesize
cartIds
;
@implementation
SaveShoppingCartRequest
@synthesize
consumerId
;
@synthesize
goodsId
;
@synthesize
count
;
+
(
BOOL
)
propertyIsOptional
:(
NSString
*
)
propertyName
{
...
...
@@ -687,10 +668,8 @@ NSString * const SORTDIRECTION_DESC = @"desc";
@end
@implementation
SceneCondition
@synthesize
styleEquals
;
@synthesize
spaceEquals
;
@synthesize
page
;
@implementation
RsShippingAddrEntity
@synthesize
list
;
+
(
BOOL
)
propertyIsOptional
:(
NSString
*
)
propertyName
{
...
...
@@ -700,8 +679,12 @@ NSString * const SORTDIRECTION_DESC = @"desc";
@end
@implementation
HotTagResponse
@synthesize
list
;
@implementation
OrderBill
@synthesize
datapage
;
@synthesize
order
;
@synthesize
orderdetailList
;
@synthesize
consumer
;
@synthesize
employee
;
+
(
BOOL
)
propertyIsOptional
:(
NSString
*
)
propertyName
{
...
...
@@ -711,10 +694,15 @@ NSString * const SORTDIRECTION_DESC = @"desc";
@end
@implementation
GoodsCategory
@synthesize
fid
;
@synthesize
name
;
@synthesize
children
;
@implementation
GoodsCondition
@synthesize
nameLike
;
@synthesize
categoryEquals
;
@synthesize
styleEquals
;
@synthesize
spaceEquals
;
@synthesize
materialEqueals
;
@synthesize
startprice
;
@synthesize
endprice
;
@synthesize
page
;
+
(
BOOL
)
propertyIsOptional
:(
NSString
*
)
propertyName
{
...
...
@@ -722,11 +710,15 @@ NSString * const SORTDIRECTION_DESC = @"desc";
}
+
(
JSONKeyMapper
*
)
keyMapper
@end
@implementation
DataDict
@synthesize
typename
;
@synthesize
typecode
;
+
(
BOOL
)
propertyIsOptional
:(
NSString
*
)
propertyName
{
return
[[
JSONKeyMapper
alloc
]
initWithDictionary
:@{
@"id"
:
@"fid"
,
}];
return
YES
;
}
...
...
@@ -945,6 +937,7 @@ NSString * const SORTDIRECTION_DESC = @"desc";
@implementation
TOEmployee
@synthesize
positions
;
@synthesize
picture
;
@synthesize
positionsName
;
+
(
BOOL
)
propertyIsOptional
:(
NSString
*
)
propertyName
...
...
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