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
6009f25a
Commit
6009f25a
authored
Jun 06, 2016
by
曹云霄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug
parent
29f493ff
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
1108 additions
and
45 deletions
+1108
-45
ProductLibraryViewController.m
Lighting/Class/ProductLibraryViewController.m
+0
-1
SceneLibraryViewController.m
Lighting/Class/SceneLibraryViewController.m
+0
-1
ShoppingTableViewCell.h
Lighting/Class/Shoppingcart/ShoppingTableViewCell.h
+1
-0
ShoppingTableViewCell.m
Lighting/Class/Shoppingcart/ShoppingTableViewCell.m
+1
-2
ShoppingViewController.m
Lighting/Class/Shoppingcart/ShoppingViewController.m
+3
-1
CustomTabbarController.m
Lighting/Class/Tabbar/CustomTabbarController.m
+26
-5
UserViewController.m
Lighting/Class/UserViewController.m
+1
-0
project.pbxproj
Lighting/Lighting.xcodeproj/project.pbxproj
+18
-0
Info.plist
Lighting/Lighting/Info.plist
+1
-1
StoryboardwithCYX.storyboard
Lighting/Lighting/StoryboardwithCYX.storyboard
+319
-8
ExperienceCentreViewController.m
Lighting/Tools/ExperienceCentreViewController.m
+80
-16
GoodsImageView.m
Lighting/Tools/GoodsImageView.m
+5
-3
HelpController.h
Lighting/Tools/HelpController.h
+58
-0
HelpController.m
Lighting/Tools/HelpController.m
+128
-0
PrefixHeader.pch
Lighting/Tools/PrefixHeader.pch
+6
-1
SceneViewController.h
Lighting/Tools/SceneViewController.h
+10
-0
SceneViewController.m
Lighting/Tools/SceneViewController.m
+4
-0
ShareGoodsViewController.h
Lighting/Tools/ShareGoodsViewController.h
+1
-0
ShareGoodsViewController.m
Lighting/Tools/ShareGoodsViewController.m
+5
-6
ShoppingBagTableViewCell.h
Lighting/Tools/ShoppingBagTableViewCell.h
+20
-0
ShoppingBagTableViewCell.m
Lighting/Tools/ShoppingBagTableViewCell.m
+24
-0
ShoppingBagViewController.h
Lighting/Tools/ShoppingBagViewController.h
+55
-0
ShoppingBagViewController.m
Lighting/Tools/ShoppingBagViewController.m
+337
-0
TOGoodsEntityModel.h
Lighting/Tools/TOGoodsEntityModel.h
+5
-0
No files found.
Lighting/Class/ProductLibraryViewController.m
View file @
6009f25a
...
...
@@ -519,7 +519,6 @@
#pragma mark -筛选
-
(
void
)
ScreeningButtonClick
{
//
// ExperienceCentreViewController *ExperienceCenter = [[self getStoryboardWithName] instantiateViewControllerWithIdentifier:@"ExperienceCentre"];
// ExperienceCenter.modalPresentationStyle = UIModalPresentationOverFullScreen;
// UIPopoverPresentationController *popover = ExperienceCenter.popoverPresentationController;
...
...
Lighting/Class/SceneLibraryViewController.m
View file @
6009f25a
...
...
@@ -136,7 +136,6 @@
page
.
page
=
self
.
indexPage
;
page
.
rows
=
KROWS
;
self
.
conditionModel
.
page
=
page
;
[
self
.
seceneLibararyCollectionView
.
mj_footer
resetNoMoreData
];
[
self
getSceneLibrarydatas
:
self
.
conditionModel
isRemove
:
YES
];
}];
...
...
Lighting/Class/Shoppingcart/ShoppingTableViewCell.h
View file @
6009f25a
...
...
@@ -12,6 +12,7 @@
@protocol
ChangeGoodsNumberDelegate
<
NSObject
>
@optional
/**
* 当前商品数量、成交价
*/
...
...
Lighting/Class/Shoppingcart/ShoppingTableViewCell.m
View file @
6009f25a
...
...
@@ -90,8 +90,7 @@
break
;
}
//改变价格
self
.
productPriceLabe
.
text
=
[
NSString
stringWithFormat
:
@"¥%.2f"
,[
self
.
goodsNumbersLabe
.
text
integerValue
]
*
[
_model
.
costPrice
floatValue
]];
// _model.costPrice = [NSNumber numberWithFloat:[self.clinchTextfield.text floatValue]];
self
.
productPriceLabe
.
text
=
[
NSString
stringWithFormat
:
@"¥%.2f"
,[
self
.
goodsNumbersLabe
.
text
integerValue
]
*
[
self
.
clinchTextfield
.
text
floatValue
]];
if
([
self
.
delegate
respondsToSelector
:
@selector
(
ChangeGoodsNumber
:
WithcostPrice
:
Withcellindex
:
)])
{
[
self
.
delegate
ChangeGoodsNumber
:[
self
.
goodsNumbersLabe
.
text
intValue
]
WithcostPrice
:[
self
.
clinchTextfield
.
text
floatValue
]
Withcellindex
:
_cellindex
];
}
...
...
Lighting/Class/Shoppingcart/ShoppingViewController.m
View file @
6009f25a
...
...
@@ -366,6 +366,9 @@
[
self
.
shopResponseArray
removeObject
:
model
];
}
[
self
.
shoppingTableview
deleteRowsAtIndexPaths
:
delecteArray
withRowAnimation
:
UITableViewRowAnimationLeft
];
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
1
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
[
self
.
shoppingTableview
reloadData
];
});
[
self
SuccessMBProgressView
:
@"删除成功"
];
[
self
CalculateSelectedGoodsAllprice
];
self
.
allSelectedButton
.
selected
=
NO
;
...
...
@@ -428,7 +431,6 @@
NSLog
(
@"写入服务器失败"
);
[
self
RemoveMBProgressHUDLoding
];
}];
}
...
...
Lighting/Class/Tabbar/CustomTabbarController.m
View file @
6009f25a
...
...
@@ -22,6 +22,7 @@
#import "SearchViewController.h"
#import "BaseViewController.h"
#import "QRViewController.h"
#import "ExperienceCentreViewController.h"
@interface
CustomTabbarController
()
<
TabbarButtonClickdelegate
,
ChangpasswordDelegate
,
CancelButtondelegate
,
UITextFieldDelegate
>
...
...
@@ -321,14 +322,34 @@
#pragma mark -推出体验中心控制器
-
(
void
)
ShowFollowHeart
:
(
NSNotification
*
)
objc
{
UIStoryboard
*
storyboard
=
[
UIStoryboard
storyboardWithName
:
@"StoryboardwithCYX"
bundle
:
nil
];
FollowHeartViewController
*
followVC
=
[
storyboard
instantiateViewControllerWithIdentifier
:[
self
.
identifierArray
objectAtIndex_opple
:
3
]];
[
self
presentViewController
:
followVC
animated
:
YES
completion
:
nil
];
if
(
!
[
Shoppersmanager
manager
].
currentCustomer
)
{
MBProgressHUD
*
hud
=
[
MBProgressHUD
showHUDAddedTo
:
self
.
view
.
window
animated
:
YES
];
hud
.
labelText
=
@"必须设置当前客户才能访问购物车"
;
hud
.
margin
=
10
.
f
;
hud
.
color
=
[[
UIColor
blackColor
]
colorWithAlphaComponent
:
0
.
5
];
hud
.
minSize
=
CGSizeMake
(
200
,
50
);
hud
.
animationType
=
MBProgressHUDAnimationZoom
;
hud
.
mode
=
MBProgressHUDModeText
;
hud
.
removeFromSuperViewOnHide
=
YES
;
[
hud
hide
:
YES
afterDelay
:
1
.
0
f
];
}
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];
}
}
#pragma mark -禁止跳转
//- (void)
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
...
...
Lighting/Class/UserViewController.m
View file @
6009f25a
...
...
@@ -159,6 +159,7 @@
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
self
.
userName
.
text
forKey
:
USERNAME
];
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
self
.
passWord
.
text
forKey
:
PASSWORD
];
[[
NSUserDefaults
standardUserDefaults
]
synchronize
];
[
self
dismissViewControllerAnimated
:
YES
completion
:
nil
];
}
else
{
...
...
Lighting/Lighting.xcodeproj/project.pbxproj
View file @
6009f25a
...
...
@@ -67,6 +67,9 @@
2942F8A61CDD80C2005B377E
/* authenticateView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
2942F8A51CDD80C2005B377E
/* authenticateView.m */
;
};
2942F8A81CDD80CE005B377E
/* authenticateView.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
2942F8A71CDD80CE005B377E
/* authenticateView.xib */
;
};
29498C541D050DFC004FA79B
/* UIImagePickerController+SupportDirection.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29498C531D050DFC004FA79B
/* UIImagePickerController+SupportDirection.m */
;
};
29498C5A1D051C3F004FA79B
/* HelpController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29498C591D051C3F004FA79B
/* HelpController.m */
;
};
29498C5D1D053B2C004FA79B
/* ShoppingBagViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29498C5C1D053B2C004FA79B
/* ShoppingBagViewController.m */
;
};
29498C601D053B7C004FA79B
/* ShoppingBagTableViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29498C5F1D053B7C004FA79B
/* ShoppingBagTableViewCell.m */
;
};
2949BABD1CD2EFA00049385A
/* InformationTableViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
2949BABC1CD2EFA00049385A
/* InformationTableViewCell.m */
;
};
2949BAC21CD3055A0049385A
/* MMExampleDrawerVisualStateManager.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
2949BAC11CD3055A0049385A
/* MMExampleDrawerVisualStateManager.m */
;
};
294CF0EC1CEDCF480055F1D8
/* PromptinformationView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
294CF0EB1CEDCF480055F1D8
/* PromptinformationView.m */
;
};
...
...
@@ -276,6 +279,12 @@
2942F8A71CDD80CE005B377E
/* authenticateView.xib */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
file.xib
;
path
=
authenticateView.xib
;
sourceTree
=
"<group>"
;
};
29498C521D050DFC004FA79B
/* UIImagePickerController+SupportDirection.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
"UIImagePickerController+SupportDirection.h"
;
sourceTree
=
"<group>"
;
};
29498C531D050DFC004FA79B
/* UIImagePickerController+SupportDirection.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
"UIImagePickerController+SupportDirection.m"
;
sourceTree
=
"<group>"
;
};
29498C581D051C3F004FA79B
/* HelpController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
HelpController.h
;
sourceTree
=
"<group>"
;
};
29498C591D051C3F004FA79B
/* HelpController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
HelpController.m
;
sourceTree
=
"<group>"
;
};
29498C5B1D053B2C004FA79B
/* ShoppingBagViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ShoppingBagViewController.h
;
sourceTree
=
"<group>"
;
};
29498C5C1D053B2C004FA79B
/* ShoppingBagViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ShoppingBagViewController.m
;
sourceTree
=
"<group>"
;
};
29498C5E1D053B7C004FA79B
/* ShoppingBagTableViewCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ShoppingBagTableViewCell.h
;
sourceTree
=
"<group>"
;
};
29498C5F1D053B7C004FA79B
/* ShoppingBagTableViewCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ShoppingBagTableViewCell.m
;
sourceTree
=
"<group>"
;
};
2949BABB1CD2EFA00049385A
/* InformationTableViewCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
InformationTableViewCell.h
;
sourceTree
=
"<group>"
;
};
2949BABC1CD2EFA00049385A
/* InformationTableViewCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
InformationTableViewCell.m
;
sourceTree
=
"<group>"
;
};
2949BAC01CD3055A0049385A
/* MMExampleDrawerVisualStateManager.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
MMExampleDrawerVisualStateManager.h
;
sourceTree
=
"<group>"
;
};
...
...
@@ -810,6 +819,8 @@
2936F28E1D0141FD007CA67C
/* ProductScreeningTableViewCell.m */
,
2936F2941D017BBD007CA67C
/* GoodsImageView.h */
,
2936F2951D017BBD007CA67C
/* GoodsImageView.m */
,
29498C5E1D053B7C004FA79B
/* ShoppingBagTableViewCell.h */
,
29498C5F1D053B7C004FA79B
/* ShoppingBagTableViewCell.m */
,
);
name
=
view
;
sourceTree
=
"<group>"
;
...
...
@@ -1037,6 +1048,10 @@
2936F2971D01868E007CA67C
/* ShareGoodsViewController.h */
,
2936F2981D01868E007CA67C
/* ShareGoodsViewController.m */
,
2936F2991D01868E007CA67C
/* ShareGoodsViewController.xib */
,
29498C581D051C3F004FA79B
/* HelpController.h */
,
29498C591D051C3F004FA79B
/* HelpController.m */
,
29498C5B1D053B2C004FA79B
/* ShoppingBagViewController.h */
,
29498C5C1D053B2C004FA79B
/* ShoppingBagViewController.m */
,
);
name
=
Controller
;
sourceTree
=
"<group>"
;
...
...
@@ -1649,6 +1664,7 @@
04F662171CFB9F4A00384248
/* HelpViewController.m in Sources */
,
2928F8421CD0ABAC0036D761
/* ShoppingViewController.m in Sources */
,
29698D611CE2C11500D72CE7
/* SettlementViewController.m in Sources */
,
29498C5D1D053B2C004FA79B
/* ShoppingBagViewController.m in Sources */
,
291D6A5C1CFFDCCA007891AE
/* SceneListModel.m in Sources */
,
299876331CD997DF00C90D0A
/* OrderInformationTableViewCell.m in Sources */
,
29CB35421CFF0FB60061A5F3
/* ScreeningCollectionViewCell.m in Sources */
,
...
...
@@ -1675,6 +1691,7 @@
29CCA43C1CF7ED6100BC19DD
/* SelectedTableViewCell.m in Sources */
,
294CF0EC1CEDCF480055F1D8
/* PromptinformationView.m in Sources */
,
290887131CE5DF16000B7097
/* ShopcarModel.m in Sources */
,
29498C5A1D051C3F004FA79B
/* HelpController.m in Sources */
,
060A22311CFC518E00945BA4
/* CustomTOGoodsEntity.m in Sources */
,
04FCB1A41CF60A8F0056093B
/* DeviceDirectionManager.m in Sources */
,
29BB27681CD9D38E009A0813
/* AllpriceTableViewCell.m in Sources */
,
...
...
@@ -1686,6 +1703,7 @@
04F9EE1B1CF22B5900BD729F
/* ShoppingCell.m in Sources */
,
29360C2F1CDDC47E002A5D89
/* ScreeningView.m in Sources */
,
2985AEA21CE72F1500704C91
/* NSDictionary+ZXPUnicode.m in Sources */
,
29498C601D053B7C004FA79B
/* ShoppingBagTableViewCell.m in Sources */
,
29EAAE9C1CDC74CA00C4DBA2
/* AllCustomerViewController.m in Sources */
,
04A14A2B1CE0FC7F00DAD5F3
/* FootSubView.m in Sources */
,
2933934F1CD3158B000D997B
/* instructionsLabe.m in Sources */
,
...
...
Lighting/Lighting/Info.plist
View file @
6009f25a
...
...
@@ -15,7 +15,7 @@
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
1.0
<
/string
>
<
string
>
1.0
.1
<
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleURLTypes
<
/k
e
y
>
...
...
Lighting/Lighting/StoryboardwithCYX.storyboard
View file @
6009f25a
This diff is collapsed.
Click to expand it.
Lighting/Tools/ExperienceCentreViewController.m
View file @
6009f25a
...
...
@@ -13,6 +13,8 @@
#import "GoodsImageView.h"
#import "ShareGoodsViewController.h"
#import "DeviceDirectionManager.h"
#import "HelpController.h"
#import "ShoppingBagViewController.h"
#define LEFTWIDTH 100
...
...
@@ -170,7 +172,18 @@
GoodsImageView
*
imageView
=
[[
GoodsImageView
alloc
]
initWithFrame
:
cellRect
];
imageView
.
model
=
model
;
[
imageView
setDelectedBlock
:
^
(
TOGoodsEntityModel
*
delectedModel
)
{
[
self
.
shareGoodsArray
removeObject
:
delectedModel
];
//删除先判断数量
for
(
TOGoodsEntityModel
*
newModel
in
self
.
shareGoodsArray
)
{
if
([
newModel
.
fid
isEqualToString
:
delectedModel
.
fid
])
{
if
(
newModel
.
goodsNumber
<=
1
)
{
[
self
.
shareGoodsArray
removeObject
:
delectedModel
];
}
else
{
newModel
.
goodsNumber
--
;
}
break
;
}
}
}];
imageView
.
userInteractionEnabled
=
YES
;
[
UIView
animateWithDuration
:
0
.
5
animations
:
^
{
...
...
@@ -181,7 +194,19 @@
model
.
isSelectedState
=
NO
;
}
model
.
isSelectedState
=
YES
;
[
self
.
shareGoodsArray
addObject
:
model
];
//判断选中的商品是否已经存在
if
([
self
.
shareGoodsArray
containsObject
:
model
])
{
for
(
TOGoodsEntityModel
*
newModel
in
self
.
shareGoodsArray
)
{
if
([
newModel
.
fid
isEqualToString
:
model
.
fid
])
{
newModel
.
goodsNumber
++
;
break
;
}
}
}
else
{
[
self
.
shareGoodsArray
addObject
:
model
];
}
NSArray
*
imags
=
[
model
.
pictures
componentsSeparatedByString
:
@","
];
[
imageView
sd_setImageWithURL
:[
NSURL
URLWithString
:[
imags
firstObject
]]
placeholderImage
:
REPLACEIMAGE
];
[
self
.
sceneBackView
addSubview
:
imageView
];
...
...
@@ -201,7 +226,16 @@
#pragma mark -购物袋
-
(
IBAction
)
ShoppingBagButtonClickAction
:
(
UIButton
*
)
sender
{
sender
.
selected
=
YES
;
ShoppingBagViewController
*
shoppingBag
=
[[
self
getStoryboardWithName
]
instantiateViewControllerWithIdentifier
:
@"shoppingbagController"
];
[
shoppingBag
setDismissBlock
:
^
{
sender
.
selected
=
NO
;
}];
shoppingBag
.
modalPresentationStyle
=
UIModalPresentationOverFullScreen
;
UIPopoverPresentationController
*
pop
=
shoppingBag
.
popoverPresentationController
;
pop
.
sourceView
=
shoppingBag
.
view
;
shoppingBag
.
datasArray
=
self
.
shareGoodsArray
;
[
self
presentViewController
:
shoppingBag
animated
:
YES
completion
:
nil
];
}
#pragma mark -分享
...
...
@@ -223,12 +257,12 @@
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
{
sender
.
selected
=
YES
;
UIAlertController
*
alertView
=
[
UIAlertController
alertControllerWithTitle
:
nil
message
:
nil
preferredStyle
:
UIAlertControllerStyleAlert
];
UIImagePickerController
*
PcCamera
=
[[
UIImagePickerController
alloc
]
init
];
PcCamera
.
delegate
=
self
;
...
...
@@ -243,6 +277,7 @@
else
{
[
self
ErrorMBProgressView
:
@"相机无法使用"
];
sender
.
selected
=
NO
;
}
}]];
[
alertView
addAction
:[
UIAlertAction
actionWithTitle
:
@"从相册选择"
style
:
UIAlertActionStyleDefault
handler
:
^
(
UIAlertAction
*
_Nonnull
action
)
{
...
...
@@ -255,9 +290,11 @@
else
{
[
self
ErrorMBProgressView
:
@"相册无法打开"
];
sender
.
selected
=
NO
;
}
}]];
[
alertView
addAction
:[
UIAlertAction
actionWithTitle
:
@"取消"
style
:
UIAlertActionStyleCancel
handler
:
^
(
UIAlertAction
*
_Nonnull
action
)
{
self
.
takingPicturesButton
.
selected
=
NO
;
[
alertView
dismissViewControllerAnimated
:
YES
completion
:
nil
];
}]];
[
self
presentViewController
:
alertView
animated
:
YES
completion
:
nil
];
...
...
@@ -270,21 +307,10 @@
[
self
dismissViewControllerAnimated
:
YES
completion
:
nil
];
UIImage
*
Headimage
=
[
info
objectForKey
:
UIImagePickerControllerOriginalImage
];
self
.
sceneImageView
.
image
=
Headimage
;
self
.
takingPicturesButton
.
selected
=
NO
;
}
#pragma mark -截屏
-
(
UIImage
*
)
capture
{
...
...
@@ -299,6 +325,7 @@
return
img
;
}
#pragma mark -全屏
-
(
IBAction
)
AmplificationButtonClickAction
:
(
UIButton
*
)
sender
{
...
...
@@ -340,6 +367,27 @@
#pragma mark -帮助
-
(
IBAction
)
HelpButtonClickAction
:
(
UIButton
*
)
sender
{
sender
.
selected
=
YES
;
HelpController
*
helpView
=
[[
HelpController
alloc
]
init
];
helpView
.
backButtonPoint
=
self
.
returnButton
.
mj_origin
;
helpView
.
shoppingbagPoint
=
self
.
shoppingbagButton
.
mj_origin
;
helpView
.
sharePoint
=
self
.
shareButton
.
mj_origin
;
helpView
.
photoPoint
=
self
.
takingPicturesButton
.
mj_origin
;
helpView
.
fullScreenPoint
=
self
.
amplificationButton
.
mj_origin
;
helpView
.
helpPoint
=
self
.
helpButton
.
mj_origin
;
helpView
.
scenePoint
=
self
.
sceneSelectedButton
.
center
;
helpView
.
productPoint
=
self
.
productSelectedButton
.
center
;
UITapGestureRecognizer
*
tap
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
dismissAction
:
)];
[
helpView
.
view
addGestureRecognizer
:
tap
];
[
self
.
view
addSubview
:
helpView
.
view
];
}
#pragma mark -销毁
-
(
void
)
dismissAction
:
(
UITapGestureRecognizer
*
)
tap
{
self
.
helpButton
.
selected
=
NO
;
[
tap
.
view
removeFromSuperview
];
}
...
...
@@ -347,9 +395,14 @@
#pragma mark -场景筛选
-
(
IBAction
)
SceneSelectedButtonClickAction
:
(
UIButton
*
)
sender
{
sender
.
selected
=
YES
;
[[
NSUserDefaults
standardUserDefaults
]
setBool
:
YES
forKey
:
@"SCENE"
];
SceneViewController
*
sceneVC
=
[[
self
getStoryboardWithName
]
instantiateViewControllerWithIdentifier
:
@"SceneController"
];
[
sceneVC
setDismissBlock
:
^
{
sender
.
selected
=
NO
;
}];
sceneVC
.
view
.
backgroundColor
=
[
UIColor
clearColor
];
sceneVC
.
titleLabe
.
text
=
@"选择场景"
;
sceneVC
.
searchBackView
.
hidden
=
YES
;
sceneVC
.
materialButton
.
hidden
=
YES
;
sceneVC
.
priceButton
.
hidden
=
YES
;
...
...
@@ -365,9 +418,14 @@
#pragma mark -产品筛选
-
(
IBAction
)
ProductSelectedButtonClickAction
:
(
UIButton
*
)
sender
{
sender
.
selected
=
YES
;
[[
NSUserDefaults
standardUserDefaults
]
setBool
:
NO
forKey
:
@"SCENE"
];
SceneViewController
*
sceneVC
=
[[
self
getStoryboardWithName
]
instantiateViewControllerWithIdentifier
:
@"SceneController"
];
[
sceneVC
setDismissBlock
:
^
{
sender
.
selected
=
NO
;
}];
sceneVC
.
view
.
backgroundColor
=
[
UIColor
clearColor
];
sceneVC
.
titleLabe
.
text
=
@"选择商品"
;
sceneVC
.
searchBackView
.
hidden
=
NO
;
sceneVC
.
materialButton
.
hidden
=
NO
;
sceneVC
.
priceButton
.
hidden
=
NO
;
...
...
@@ -468,6 +526,12 @@
});
}
#pragma mark -分享失败
-
(
void
)
CodeNotEqualZero
:
(
NSString
*
)
message
{
[
self
ErrorMBProgressView
:
message
];
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
...
...
Lighting/Tools/GoodsImageView.m
View file @
6009f25a
...
...
@@ -69,10 +69,12 @@
#pragma mark -长按
-
(
void
)
LongPressAction
:(
UILongPressGestureRecognizer
*
)
longPress
{
if
(
self
.
delectedBlock
)
{
self
.
delectedBlock
(
self
.
model
);
if
(
longPress
.
state
==
UIGestureRecognizerStateBegan
)
{
if
(
self
.
delectedBlock
)
{
self
.
delectedBlock
(
self
.
model
);
}
[
self
removeFromSuperview
];
}
[
self
removeFromSuperview
];
}
...
...
Lighting/Tools/HelpController.h
0 → 100644
View file @
6009f25a
//
// HelpController.h
// Lighting
//
// Created by 曹云霄 on 16/6/6.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "BaseViewController.h"
@interface
HelpController
:
BaseViewController
/**
* 返回按钮
*/
@property
(
nonatomic
,
assign
)
CGPoint
backButtonPoint
;
/**
* 购物袋
*/
@property
(
nonatomic
,
assign
)
CGPoint
shoppingbagPoint
;
/**
* 分享
*/
@property
(
nonatomic
,
assign
)
CGPoint
sharePoint
;
/**
* 相机
*/
@property
(
nonatomic
,
assign
)
CGPoint
photoPoint
;
/**
* 全屏
*/
@property
(
nonatomic
,
assign
)
CGPoint
fullScreenPoint
;
/**
* 帮助
*
*/
@property
(
nonatomic
,
assign
)
CGPoint
helpPoint
;
/**
* 场景
*/
@property
(
nonatomic
,
assign
)
CGPoint
scenePoint
;
/**
* 产品
*/
@property
(
nonatomic
,
assign
)
CGPoint
productPoint
;
@end
Lighting/Tools/HelpController.m
0 → 100644
View file @
6009f25a
//
// HelpController.m
// Lighting
//
// Created by 曹云霄 on 16/6/6.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "HelpController.h"
@interface
HelpController
()
<
UIGestureRecognizerDelegate
>
/**
* 帮助文本
*/
@property
(
nonatomic
,
strong
)
NSArray
*
helpTitleArray
;
@end
@implementation
HelpController
-
(
NSArray
*
)
helpTitleArray
{
if
(
!
_helpTitleArray
)
{
_helpTitleArray
=
[
NSArray
arrayWithObjects
:
@"返回"
,
@"添加至购物袋"
,
@"分享方案"
,
@"自定义场景"
,
@"全屏"
,
@"帮助"
,
@"选择场景"
,
@"选择产品"
,
nil
];
}
return
_helpTitleArray
;
}
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
[
self
uiConfigAction
];
}
#pragma mark -UI
-
(
void
)
uiConfigAction
{
self
.
view
.
backgroundColor
=
[[
UIColor
blackColor
]
colorWithAlphaComponent
:
0
.
5
];
for
(
int
i
=
0
;
i
<
self
.
helpTitleArray
.
count
;
i
++
)
{
UIButton
*
helpButton
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
UIImage
*
helpImage
=
[
TCImage
(
@"lefttool1"
)
resizableImageWithCapInsets
:
UIEdgeInsetsMake
(
30
,
30
,
30
,
30
)
resizingMode
:
UIImageResizingModeStretch
];
[
helpButton
setBackgroundImage
:
helpImage
forState
:
UIControlStateNormal
];
[
helpButton
setTitleColor
:
kMainBlueColor
forState
:
UIControlStateNormal
];
NSString
*
content
=
[
self
.
helpTitleArray
objectAtIndex_opple
:
i
];
[
helpButton
setTitle
:
content
forState
:
UIControlStateNormal
];
helpButton
.
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
15
];
[
self
.
view
addSubview
:
helpButton
];
switch
(
i
)
{
case
0
:
//返回
{
helpButton
.
frame
=
CGRectMake
(
self
.
backButtonPoint
.
x
+
50
,
self
.
backButtonPoint
.
y
,
[
self
calculateStringLength
:
content
],
50
);
}
break
;
case
1
:
//添加至购物车
{
helpButton
.
frame
=
CGRectMake
(
self
.
shoppingbagPoint
.
x
+
50
,
self
.
shoppingbagPoint
.
y
,
[
self
calculateStringLength
:
content
],
50
);
}
break
;
case
2
:
//分享方案
{
helpButton
.
frame
=
CGRectMake
(
self
.
sharePoint
.
x
+
50
,
self
.
sharePoint
.
y
,
[
self
calculateStringLength
:
content
],
50
);
}
break
;
case
3
:
//自定义场景
{
helpButton
.
frame
=
CGRectMake
(
self
.
photoPoint
.
x
+
50
,
self
.
photoPoint
.
y
,
[
self
calculateStringLength
:
content
],
50
);
}
break
;
case
4
:
//全屏
{
helpButton
.
frame
=
CGRectMake
(
self
.
fullScreenPoint
.
x
+
50
,
self
.
fullScreenPoint
.
y
,
[
self
calculateStringLength
:
content
],
50
);
}
break
;
case
5
:
//帮助
{
helpButton
.
frame
=
CGRectMake
(
self
.
helpPoint
.
x
+
50
,
self
.
helpPoint
.
y
,
[
self
calculateStringLength
:
content
],
50
);
}
break
;
case
6
:
//选择场景
{
helpButton
.
frame
=
CGRectMake
(
self
.
scenePoint
.
x
+
40
,
self
.
scenePoint
.
y
-
20
,
[
self
calculateStringLength
:
content
],
50
);
}
break
;
case
7
:
//选择产品
{
UIImage
*
helpImage
=
[
TCImage
(
@"righttool"
)
resizableImageWithCapInsets
:
UIEdgeInsetsMake
(
30
,
30
,
30
,
30
)
resizingMode
:
UIImageResizingModeStretch
];
[
helpButton
setBackgroundImage
:
helpImage
forState
:
UIControlStateNormal
];
helpButton
.
frame
=
CGRectMake
(
self
.
productPoint
.
x
-
[
self
calculateStringLength
:
content
]
-
40
,
self
.
productPoint
.
y
-
20
,
[
self
calculateStringLength
:
content
],
50
);
}
break
;
default
:
break
;
}
}
}
#pragma mark -计算字符串长度
-
(
CGFloat
)
calculateStringLength
:
(
NSString
*
)
string
{
CGSize
s
=
[
string
boundingRectWithSize
:
CGSizeMake
(
999999
,
50
)
options
:
NSStringDrawingUsesLineFragmentOrigin
|
NSStringDrawingUsesFontLeading
attributes
:
@{
NSFontAttributeName
:
[
UIFont
systemFontOfSize
:
15
]}
context
:
nil
].
size
;
return
s
.
width
+
100
;
}
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
// Dispose of any resources that can be recreated.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
Lighting/Tools/PrefixHeader.pch
View file @
6009f25a
...
...
@@ -134,10 +134,15 @@
/**
* 服务器地址
* 服务器
开发
地址
*/
#define ServerAddress @"http://dg-dev.opple.com/opple-web/app"
/**
* 服务器测试地址
*/
//#define ServerAddress @"http://139.196.195.30:8090/opple-web/app"
/**
* 搜索框输入通知
...
...
Lighting/Tools/SceneViewController.h
View file @
6009f25a
...
...
@@ -48,6 +48,11 @@
*/
@property
(
weak
,
nonatomic
)
IBOutlet
UITableView
*
screeningTableView
;
/**
* 文本
*/
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
titleLabe
;
/**
* 风格
...
...
@@ -112,4 +117,9 @@
*/
@property
(
nonatomic
,
assign
)
id
<
AddImagesDelegate
>
delegate
;
/**
* dismiss回传
*/
@property
(
nonatomic
,
copy
)
void
(
^
dismissBlock
)();
@end
Lighting/Tools/SceneViewController.m
View file @
6009f25a
...
...
@@ -536,6 +536,7 @@
newModel
.
pictures
=
model
.
pictures
;
newModel
.
barcode
=
model
.
barcode
;
newModel
.
isSelectedState
=
NO
;
newModel
.
goodsNumber
=
1
;
[
weakSelf
.
productDatasArray
addObject
:
newModel
];
}
for
(
TOGoodsEntityModel
*
model
in
SHARED_APPDELEGATE
.
productArray
)
{
...
...
@@ -1012,6 +1013,9 @@
#pragma mark -销毁
-
(
void
)
ReturnButtonClickAction
{
if
(
self
.
dismissBlock
)
{
self
.
dismissBlock
();
}
[
self
dismissViewControllerAnimated
:
YES
completion
:
nil
];
}
...
...
Lighting/Tools/ShareGoodsViewController.h
View file @
6009f25a
...
...
@@ -57,4 +57,5 @@
*/
@property
(
nonatomic
,
assign
)
id
<
SharePicturedelegate
>
delegate
;
@end
Lighting/Tools/ShareGoodsViewController.m
View file @
6009f25a
...
...
@@ -29,8 +29,7 @@
[
self
dismissViewControllerAnimated
:
YES
completion
:
nil
];
NSData
*
imageData
=
UIImageJPEGRepresentation
(
self
.
shareImage
,
0
.
5
);
// 0b44439e5504e371015504f73d4f0025,0b44439e5504e371015504feae270028
NSDictionary
*
parameterDict
=
[
NSDictionary
dictionaryWithObjectsAndKeys
:
self
.
goodsIds
,
@"goodsIds"
,
@""
,
@"title"
,
@""
,
@"remark"
,
nil
];
NSDictionary
*
parameterDict
=
[
NSDictionary
dictionaryWithObjectsAndKeys
:[
self
.
goodsIds
substringToIndex
:
self
.
goodsIds
.
length
-
2
],
@"goodsIds"
,
@""
,
@"title"
,
@""
,
@"remark"
,
nil
];
//上传图片
[[
NetworkRequestClassManager
Manager
]
UploadImageWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/system/shareGoods"
]
WithRequestType
:
0
WithImageDatas
:
imageData
WithParameter
:
parameterDict
WithReturnValueBlock
:^
(
id
returnValue
)
{
...
...
@@ -46,7 +45,7 @@
[
UMSocialData
defaultData
].
extConfig
.
wechatSessionData
.
url
=
shareWeb
;
[[
UMSocialDataService
defaultDataService
]
postSNSWithTypes
:@[
UMShareToWechatSession
]
content
:
ShareTitle
image
:
self
.
shareImage
location
:
nil
urlResource
:
nil
presentedController
:
self
completion
:^
(
UMSocialResponseEntity
*
response
){
if
(
response
.
responseCode
==
UMSResponseCodeSuccess
)
{
[
self
SuccessMBProgressView
:
@"分享微信好友成功"
];
}
}];
...
...
@@ -59,7 +58,7 @@
[
UMSocialData
defaultData
].
extConfig
.
wechatTimelineData
.
url
=
shareWeb
;
[[
UMSocialDataService
defaultDataService
]
postSNSWithTypes
:@[
UMShareToWechatTimeline
]
content
:
ShareTitle
image
:
self
.
shareImage
location
:
nil
urlResource
:
nil
presentedController
:
self
completion
:^
(
UMSocialResponseEntity
*
response
){
if
(
response
.
responseCode
==
UMSResponseCodeSuccess
)
{
[
self
SuccessMBProgressView
:
@"分享微信朋友圈成功"
];
}
}];
...
...
@@ -72,7 +71,7 @@
[
UMSocialData
defaultData
].
extConfig
.
sinaData
.
shareText
=
[
NSString
stringWithFormat
:
@"%@%@"
,
@"欧普照明"
,
shareWeb
];
[[
UMSocialDataService
defaultDataService
]
postSNSWithTypes
:@[
UMShareToSina
]
content
:
ShareTitle
image
:
self
.
shareImage
location
:
nil
urlResource
:
nil
presentedController
:
self
completion
:^
(
UMSocialResponseEntity
*
shareResponse
){
if
(
shareResponse
.
responseCode
==
UMSResponseCodeSuccess
)
{
[
self
SuccessMBProgressView
:
@"分享新浪微博成功"
];
}
}];
...
...
@@ -91,7 +90,7 @@
}
}
WithprogressBlock
:^
(
double
progress
)
{
if
(
progress
>=
1
)
{
if
([
self
.
delegate
respondsToSelector
:
@selector
(
UploadImageSuccess
)])
{
...
...
Lighting/Tools/ShoppingBagTableViewCell.h
0 → 100644
View file @
6009f25a
//
// ShoppingBagTableViewCell.h
// Lighting
//
// Created by 曹云霄 on 16/6/6.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface
ShoppingBagTableViewCell
:
UITableViewCell
@end
Lighting/Tools/ShoppingBagTableViewCell.m
0 → 100644
View file @
6009f25a
//
// ShoppingBagTableViewCell.m
// Lighting
//
// Created by 曹云霄 on 16/6/6.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "ShoppingBagTableViewCell.h"
@implementation
ShoppingBagTableViewCell
-
(
void
)
awakeFromNib
{
[
super
awakeFromNib
];
// Initialization code
}
-
(
void
)
setSelected
:
(
BOOL
)
selected
animated
:
(
BOOL
)
animated
{
[
super
setSelected
:
selected
animated
:
animated
];
// Configure the view for the selected state
}
@end
Lighting/Tools/ShoppingBagViewController.h
0 → 100644
View file @
6009f25a
//
// ShoppingBagViewController.h
// Lighting
//
// Created by 曹云霄 on 16/6/6.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "BaseViewController.h"
@interface
ShoppingBagViewController
:
BaseViewController
/**
* 购物袋tableView
*/
@property
(
weak
,
nonatomic
)
IBOutlet
UITableView
*
shoppingBagTableView
;
/**
* 合计金额
*/
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
totalPriceLabe
;
/**
* 确认添加
*/
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
sureButton
;
/**
* 购物袋背景
*/
@property
(
weak
,
nonatomic
)
IBOutlet
UIView
*
shoppingBagBackView
;
/**
* 数据源
*/
@property
(
nonatomic
,
strong
)
NSMutableArray
*
datasArray
;
/**
* 全选
*/
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
totalSelectedButton
;
/**
* 删除
*/
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
delectedButton
;
/**
* dismiss回传
*/
@property
(
nonatomic
,
copy
)
void
(
^
dismissBlock
)();
@end
Lighting/Tools/ShoppingBagViewController.m
0 → 100644
View file @
6009f25a
This diff is collapsed.
Click to expand it.
Lighting/Tools/TOGoodsEntityModel.h
View file @
6009f25a
...
...
@@ -17,4 +17,9 @@
*/
@property
(
nonatomic
,
assign
)
BOOL
isSelectedState
;
/**
* 商品个数
*/
@property
(
nonatomic
,
assign
)
int
goodsNumber
;
@end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment