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
Show 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
{
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
...
...
@@ -1272,7 +1272,7 @@
<color
key=
"backgroundColor"
red=
"0.93725490199999995"
green=
"0.93725490199999995"
blue=
"0.95686274510000002"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<prototypes>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
reuseIdentifier=
"productDetailscell"
rowHeight=
"170"
id=
"Sye-2R-IQf"
customClass=
"ProductDetailsTableViewCell"
>
<rect
key=
"frame"
x=
"0.0"
y=
"
49
.5"
width=
"768"
height=
"170"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"
113
.5"
width=
"768"
height=
"170"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"Sye-2R-IQf"
id=
"CXs-SR-gHP"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"768"
height=
"169.5"
/>
...
...
@@ -1880,7 +1880,7 @@
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<prototypes>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
selectionStyle=
"none"
indentationWidth=
"10"
reuseIdentifier=
"secondcell"
rowHeight=
"110"
id=
"LsY-i0-h5H"
customClass=
"PersonInformationTableViewCell"
>
<rect
key=
"frame"
x=
"0.0"
y=
"
28
"
width=
"768"
height=
"110"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"
92
"
width=
"768"
height=
"110"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"LsY-i0-h5H"
id=
"dPG-p9-V2i"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"768"
height=
"109.5"
/>
...
...
@@ -1957,7 +1957,7 @@
</connections>
</tableViewCell>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
reuseIdentifier=
"consigneecell"
rowHeight=
"56"
id=
"gfQ-UE-mXV"
customClass=
"GenerateOrdersTableViewCell"
>
<rect
key=
"frame"
x=
"0.0"
y=
"
138
"
width=
"768"
height=
"56"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"
202
"
width=
"768"
height=
"56"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"gfQ-UE-mXV"
id=
"za6-HU-VEw"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"768"
height=
"55.5"
/>
...
...
@@ -2025,7 +2025,7 @@
</connections>
</tableViewCell>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
reuseIdentifier=
"Modifycell"
rowHeight=
"70"
id=
"Kk4-Fh-HhL"
customClass=
"GenerateOrdersModifyTableViewCell"
>
<rect
key=
"frame"
x=
"0.0"
y=
"
194
"
width=
"768"
height=
"70"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"
258
"
width=
"768"
height=
"70"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"Kk4-Fh-HhL"
id=
"oRX-7p-HkY"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"768"
height=
"69.5"
/>
...
...
@@ -2060,7 +2060,7 @@
</connections>
</tableViewCell>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
selectionStyle=
"none"
indentationWidth=
"10"
reuseIdentifier=
"fourthcell"
rowHeight=
"80"
id=
"G7o-xS-1mB"
customClass=
"CommodityListTableViewCell"
>
<rect
key=
"frame"
x=
"0.0"
y=
"
264
"
width=
"768"
height=
"80"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"
328
"
width=
"768"
height=
"80"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"G7o-xS-1mB"
id=
"l3e-TL-GCT"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"768"
height=
"79.5"
/>
...
...
@@ -2132,7 +2132,7 @@
</connections>
</tableViewCell>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
reuseIdentifier=
"sixthcell"
rowHeight=
"50"
id=
"6K9-mc-7RW"
customClass=
"AllpriceTableViewCell"
>
<rect
key=
"frame"
x=
"0.0"
y=
"
344
"
width=
"768"
height=
"50"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"
408
"
width=
"768"
height=
"50"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"6K9-mc-7RW"
id=
"Vc7-f6-wGb"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"768"
height=
"49.5"
/>
...
...
@@ -3232,6 +3232,7 @@
<rect
key=
"frame"
x=
"40"
y=
"257"
width=
"45"
height=
"45"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMinY=
"YES"
flexibleMaxY=
"YES"
/>
<state
key=
"normal"
backgroundImage=
"gouwuche"
/>
<state
key=
"selected"
backgroundImage=
"selectshoping"
/>
<connections>
<action
selector=
"ShoppingBagButtonClickAction:"
destination=
"Gqn-uq-cA1"
eventType=
"touchUpInside"
id=
"4on-rf-6wU"
/>
</connections>
...
...
@@ -3240,6 +3241,7 @@
<rect
key=
"frame"
x=
"40"
y=
"342"
width=
"45"
height=
"45"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMinY=
"YES"
flexibleMaxY=
"YES"
/>
<state
key=
"normal"
backgroundImage=
"fenxiang"
/>
<state
key=
"selected"
backgroundImage=
"selectShare"
/>
<connections>
<action
selector=
"ShareButtonClickAction:"
destination=
"Gqn-uq-cA1"
eventType=
"touchUpInside"
id=
"SkX-Ud-eH9"
/>
</connections>
...
...
@@ -3248,6 +3250,7 @@
<rect
key=
"frame"
x=
"40"
y=
"427"
width=
"45"
height=
"45"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMinY=
"YES"
flexibleMaxY=
"YES"
/>
<state
key=
"normal"
backgroundImage=
"customchangjing"
/>
<state
key=
"selected"
backgroundImage=
"selectCamer"
/>
<connections>
<action
selector=
"TakingPhotoButtonClickAction:"
destination=
"Gqn-uq-cA1"
eventType=
"touchUpInside"
id=
"a1e-Ai-Itx"
/>
</connections>
...
...
@@ -3256,6 +3259,7 @@
<rect
key=
"frame"
x=
"40"
y=
"512"
width=
"45"
height=
"45"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMinY=
"YES"
flexibleMaxY=
"YES"
/>
<state
key=
"normal"
backgroundImage=
"quanping"
/>
<state
key=
"selected"
backgroundImage=
"xiaoping"
/>
<connections>
<action
selector=
"AmplificationButtonClickAction:"
destination=
"Gqn-uq-cA1"
eventType=
"touchUpInside"
id=
"NSd-sb-tbj"
/>
</connections>
...
...
@@ -3264,6 +3268,7 @@
<rect
key=
"frame"
x=
"40"
y=
"644"
width=
"45"
height=
"45"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMinY=
"YES"
flexibleMaxY=
"YES"
/>
<state
key=
"normal"
backgroundImage=
"bangzhu"
/>
<state
key=
"selected"
backgroundImage=
"selectHelp"
/>
<connections>
<action
selector=
"HelpButtonClickAction:"
destination=
"Gqn-uq-cA1"
eventType=
"touchUpInside"
id=
"vNb-YQ-vFg"
/>
</connections>
...
...
@@ -3272,6 +3277,7 @@
<rect
key=
"frame"
x=
"32"
y=
"921"
width=
"60"
height=
"60"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMinY=
"YES"
/>
<state
key=
"normal"
backgroundImage=
"场景2"
/>
<state
key=
"selected"
backgroundImage=
"场景1"
/>
<connections>
<action
selector=
"SceneSelectedButtonClickAction:"
destination=
"Gqn-uq-cA1"
eventType=
"touchUpInside"
id=
"wnw-wT-qrA"
/>
</connections>
...
...
@@ -3280,6 +3286,7 @@
<rect
key=
"frame"
x=
"650"
y=
"777"
width=
"60"
height=
"60"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMinY=
"YES"
/>
<state
key=
"normal"
backgroundImage=
"产品2"
/>
<state
key=
"selected"
backgroundImage=
"产品1"
/>
<connections>
<action
selector=
"ProductSelectedButtonClickAction:"
destination=
"Gqn-uq-cA1"
eventType=
"touchUpInside"
id=
"hpB-yH-WYT"
/>
</connections>
...
...
@@ -3482,11 +3489,11 @@
<color
key=
"backgroundColor"
white=
"0.0"
alpha=
"0.0"
colorSpace=
"calibratedWhite"
/>
</view>
<imageView
userInteractionEnabled=
"NO"
contentMode=
"scaleToFill"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"Folder"
id=
"KsJ-QO-PwN"
>
<rect
key=
"frame"
x=
"
34"
y=
"13
"
width=
"25"
height=
"25"
/>
<rect
key=
"frame"
x=
"
20"
y=
"15
"
width=
"25"
height=
"25"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
</imageView>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"选择场景"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"Dpv-8s-VU9"
>
<rect
key=
"frame"
x=
"
73"
y=
"15
"
width=
"113"
height=
"21"
/>
<rect
key=
"frame"
x=
"
59"
y=
"17
"
width=
"113"
height=
"21"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"15"
/>
<color
key=
"textColor"
white=
"0.33333333333333331"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
...
...
@@ -3605,6 +3612,7 @@
<outlet
property=
"searchProductField"
destination=
"kCx-iQ-d1X"
id=
"8gd-Ha-XzP"
/>
<outlet
property=
"spaceButton"
destination=
"pWS-6Q-Bfm"
id=
"nKl-ED-Tf6"
/>
<outlet
property=
"styleButton"
destination=
"d4v-Yx-CKR"
id=
"gpB-q9-V46"
/>
<outlet
property=
"titleLabe"
destination=
"Dpv-8s-VU9"
id=
"1up-dp-AhM"
/>
<outlet
property=
"typeButton"
destination=
"yqc-qb-xMr"
id=
"Q5A-oF-kSj"
/>
</connections>
</viewController>
...
...
@@ -3612,6 +3620,302 @@
</objects>
<point
key=
"canvasLocation"
x=
"1800"
y=
"15580"
/>
</scene>
<!--Shopping Bag View Controller-->
<scene
sceneID=
"bFG-TW-gKc"
>
<objects>
<viewController
storyboardIdentifier=
"shoppingbagController"
id=
"z4W-l4-4uY"
customClass=
"ShoppingBagViewController"
sceneMemberID=
"viewController"
>
<view
key=
"view"
contentMode=
"scaleToFill"
id=
"TGk-BQ-3Ep"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"1024"
height=
"1366"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<subviews>
<view
contentMode=
"scaleToFill"
id=
"fd8-5S-hPm"
>
<rect
key=
"frame"
x=
"134"
y=
"76"
width=
"756"
height=
"557"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<subviews>
<view
contentMode=
"scaleToFill"
id=
"Ruv-Bp-ECn"
>
<rect
key=
"frame"
x=
"0.0"
y=
"55"
width=
"756"
height=
"45"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
flexibleMaxY=
"YES"
/>
<subviews>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"产品信息"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"pCP-7a-y5V"
>
<rect
key=
"frame"
x=
"191"
y=
"12"
width=
"73"
height=
"21"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<color
key=
"textColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"吊牌价"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"Jbl-RI-WRD"
>
<rect
key=
"frame"
x=
"305.5"
y=
"12"
width=
"64"
height=
"21"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"15"
/>
<color
key=
"textColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"成交价"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"kk8-vx-XZS"
>
<rect
key=
"frame"
x=
"412"
y=
"12"
width=
"49"
height=
"21"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"15"
/>
<color
key=
"textColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"数量"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"FjQ-e2-Lga"
>
<rect
key=
"frame"
x=
"549.5"
y=
"12"
width=
"42"
height=
"21"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"15"
/>
<color
key=
"textColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"产品金额"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"Cgg-Aq-p7e"
>
<rect
key=
"frame"
x=
"661.5"
y=
"12"
width=
"74"
height=
"21"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"15"
/>
<color
key=
"textColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"图片"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"5H3-Lr-WpJ"
>
<rect
key=
"frame"
x=
"97.5"
y=
"12"
width=
"42"
height=
"21"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<color
key=
"textColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
</subviews>
<color
key=
"backgroundColor"
white=
"0.66666666666666663"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
</view>
<view
contentMode=
"scaleToFill"
id=
"WbM-Lk-b90"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"756"
height=
"55"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
flexibleMaxY=
"YES"
/>
<subviews>
<imageView
userInteractionEnabled=
"NO"
contentMode=
"scaleToFill"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"Folder"
id=
"OCD-kH-a79"
>
<rect
key=
"frame"
x=
"20"
y=
"17"
width=
"20"
height=
"20"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
</imageView>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"待添加至购物袋"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"9ML-uE-NEh"
>
<rect
key=
"frame"
x=
"55"
y=
"17"
width=
"144"
height=
"21"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<color
key=
"textColor"
white=
"0.33333333333333331"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
</subviews>
<color
key=
"backgroundColor"
red=
"0.90980392160000001"
green=
"0.90980392160000001"
blue=
"0.90980392160000001"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
</view>
<view
contentMode=
"scaleToFill"
id=
"PdL-NN-h2x"
>
<rect
key=
"frame"
x=
"0.0"
y=
"493"
width=
"756"
height=
"64"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
flexibleMinY=
"YES"
/>
<subviews>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"roundedRect"
lineBreakMode=
"middleTruncation"
id=
"dEM-te-Rpj"
>
<rect
key=
"frame"
x=
"574"
y=
"11"
width=
"165"
height=
"42"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxY=
"YES"
/>
<color
key=
"backgroundColor"
red=
"0.34901960780000002"
green=
"0.67450980390000004"
blue=
"0.86274509799999999"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"17"
/>
<state
key=
"normal"
title=
"确认添加(0)"
>
<color
key=
"titleColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
</state>
<connections>
<action
selector=
"addShoppingBagButtonClickAction:"
destination=
"z4W-l4-4uY"
eventType=
"touchUpInside"
id=
"YXh-Hm-XZq"
/>
<action
selector=
"settlementButtonClick:"
destination=
"4Ho-ZE-RT8"
eventType=
"touchUpInside"
id=
"8Kn-ag-YwB"
/>
</connections>
</button>
<label
opaque=
"NO"
multipleTouchEnabled=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"全选"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"DXO-Hu-TEV"
>
<rect
key=
"frame"
x=
"62"
y=
"21"
width=
"32"
height=
"21"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"12"
/>
<color
key=
"textColor"
white=
"0.66666666666666663"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
multipleTouchEnabled=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
""
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"79U-B2-y0R"
>
<rect
key=
"frame"
x=
"413"
y=
"18"
width=
"144"
height=
"25"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"24"
/>
<color
key=
"textColor"
red=
"0.98823529409999999"
green=
"0.33725490200000002"
blue=
"0.12941176469999999"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
multipleTouchEnabled=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"合计金额:"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"NPo-VN-SQr"
>
<rect
key=
"frame"
x=
"349"
y=
"21"
width=
"85"
height=
"21"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<nil
key=
"highlightedColor"
/>
</label>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
lineBreakMode=
"middleTruncation"
id=
"Of3-V6-dpd"
>
<rect
key=
"frame"
x=
"12"
y=
"7"
width=
"50"
height=
"50"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<color
key=
"backgroundColor"
white=
"0.0"
alpha=
"0.0"
colorSpace=
"calibratedWhite"
/>
<state
key=
"normal"
image=
"box-副本"
/>
<state
key=
"selected"
image=
"bg"
/>
<connections>
<action
selector=
"allSelectedButtonClick:"
destination=
"4Ho-ZE-RT8"
eventType=
"touchUpInside"
id=
"ma6-43-dJw"
/>
<action
selector=
"totalButtonSelectedAction:"
destination=
"z4W-l4-4uY"
eventType=
"touchUpInside"
id=
"KKL-a4-nir"
/>
</connections>
</button>
<view
contentMode=
"scaleToFill"
id=
"oAh-e4-XAZ"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"756"
height=
"1"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
flexibleMinY=
"YES"
/>
<color
key=
"backgroundColor"
red=
"0.86666666670000003"
green=
"0.86666666670000003"
blue=
"0.86666666670000003"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
</view>
<label
opaque=
"NO"
multipleTouchEnabled=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"删除"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"kGp-Fb-YW1"
>
<rect
key=
"frame"
x=
"152"
y=
"21"
width=
"32"
height=
"21"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"12"
/>
<color
key=
"textColor"
white=
"0.66666666666666663"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
lineBreakMode=
"middleTruncation"
id=
"Rka-Sf-RRr"
>
<rect
key=
"frame"
x=
"104"
y=
"7"
width=
"50"
height=
"50"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<color
key=
"backgroundColor"
white=
"0.0"
alpha=
"0.0"
colorSpace=
"calibratedWhite"
/>
<state
key=
"normal"
image=
"Trash"
/>
<connections>
<action
selector=
"delecteSelectedGoods:"
destination=
"4Ho-ZE-RT8"
eventType=
"touchUpInside"
id=
"qML-mT-wxA"
/>
<action
selector=
"delectedButtonSelectedAction:"
destination=
"z4W-l4-4uY"
eventType=
"touchUpInside"
id=
"AhK-k1-oCG"
/>
</connections>
</button>
</subviews>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
</view>
<tableView
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
alwaysBounceVertical=
"YES"
dataMode=
"prototypes"
style=
"plain"
separatorStyle=
"default"
rowHeight=
"44"
sectionHeaderHeight=
"28"
sectionFooterHeight=
"28"
id=
"dOw-id-UoT"
>
<rect
key=
"frame"
x=
"0.0"
y=
"100"
width=
"756"
height=
"393"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<prototypes>
<tableViewCell
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
selectionStyle=
"default"
indentationWidth=
"10"
reuseIdentifier=
"Shopping"
rowHeight=
"80"
id=
"g2L-9g-KsS"
customClass=
"ShoppingTableViewCell"
>
<rect
key=
"frame"
x=
"0.0"
y=
"28"
width=
"756"
height=
"80"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<tableViewCellContentView
key=
"contentView"
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
tableViewCell=
"g2L-9g-KsS"
id=
"XPi-Zc-aGh"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"756"
height=
"79.5"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<subviews>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
lineBreakMode=
"middleTruncation"
id=
"34f-aR-0gw"
>
<rect
key=
"frame"
x=
"13"
y=
"16"
width=
"50"
height=
"50"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<state
key=
"normal"
image=
"box-副本"
/>
<state
key=
"selected"
image=
"bg"
/>
<connections>
<action
selector=
"selectedButtonClick:"
destination=
"g2L-9g-KsS"
eventType=
"touchUpInside"
id=
"3lm-PW-pEn"
/>
</connections>
</button>
<imageView
userInteractionEnabled=
"NO"
contentMode=
"scaleToFill"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"05产品库-详情_03"
id=
"8v1-F3-RUS"
>
<rect
key=
"frame"
x=
"59.5"
y=
"6"
width=
"94"
height=
"70"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
</imageView>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"名称"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
numberOfLines=
"0"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"hV3-WW-RhX"
>
<rect
key=
"frame"
x=
"156.5"
y=
"12"
width=
"157"
height=
"18"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"13"
/>
<color
key=
"textColor"
white=
"0.33333333333333331"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"规格"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
numberOfLines=
"0"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"eQ1-ab-oCl"
>
<rect
key=
"frame"
x=
"156.5"
y=
"32"
width=
"157"
height=
"19"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"13"
/>
<color
key=
"textColor"
white=
"0.33333333333333331"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"¥5500"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"6S3-kx-Umm"
>
<rect
key=
"frame"
x=
"298"
y=
"29"
width=
"73"
height=
"21"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<color
key=
"textColor"
white=
"0.33333333333333331"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
<button
opaque=
"NO"
tag=
"101"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"roundedRect"
lineBreakMode=
"middleTruncation"
id=
"NrS-MR-H8O"
>
<rect
key=
"frame"
x=
"587.5"
y=
"24"
width=
"30"
height=
"30"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<color
key=
"backgroundColor"
red=
"0.97647058819999999"
green=
"0.95686274510000002"
blue=
"0.94509803920000002"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"15"
/>
<state
key=
"normal"
backgroundImage=
"add"
/>
<connections>
<action
selector=
"reduceAndaddButtonClick:"
destination=
"g2L-9g-KsS"
eventType=
"touchUpInside"
id=
"9lV-JS-Vib"
/>
</connections>
</button>
<button
opaque=
"NO"
tag=
"100"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"roundedRect"
lineBreakMode=
"middleTruncation"
id=
"CKk-HW-LGp"
>
<rect
key=
"frame"
x=
"528"
y=
"24"
width=
"30"
height=
"30"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<color
key=
"backgroundColor"
red=
"0.97647058819999999"
green=
"0.95686274510000002"
blue=
"0.94509803920000002"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<state
key=
"normal"
backgroundImage=
"reduce"
/>
<connections>
<action
selector=
"reduceAndaddButtonClick:"
destination=
"g2L-9g-KsS"
eventType=
"touchUpInside"
id=
"QeH-YR-HSz"
/>
</connections>
</button>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"1"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"LCn-vB-Gkk"
>
<rect
key=
"frame"
x=
"554"
y=
"28"
width=
"37"
height=
"21"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<color
key=
"textColor"
white=
"0.33333333333333331"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"¥5500"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"ZXB-7t-nrM"
>
<rect
key=
"frame"
x=
"641.5"
y=
"29"
width=
"106"
height=
"21"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"17"
/>
<color
key=
"textColor"
red=
"1"
green=
"0.39892781040000003"
blue=
"0.50448872310000004"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
</label>
<view
contentMode=
"scaleToFill"
id=
"PBi-J5-AtX"
>
<rect
key=
"frame"
x=
"396"
y=
"23"
width=
"80"
height=
"30"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<subviews>
<textField
opaque=
"NO"
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"left"
contentVerticalAlignment=
"center"
text=
"5500"
textAlignment=
"center"
minimumFontSize=
"17"
id=
"xSC-sH-Np9"
>
<rect
key=
"frame"
x=
"20"
y=
"0.0"
width=
"60"
height=
"30"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<textInputTraits
key=
"textInputTraits"
keyboardType=
"numberPad"
/>
</textField>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"¥"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"TDJ-jf-k5T"
>
<rect
key=
"frame"
x=
"1"
y=
"0.0"
width=
"20"
height=
"30"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"17"
/>
<color
key=
"textColor"
red=
"0.0"
green=
"0.0"
blue=
"0.0"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
</label>
</subviews>
<color
key=
"backgroundColor"
red=
"0.93333333330000001"
green=
"0.93333333330000001"
blue=
"0.93333333330000001"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
</view>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"代码"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
numberOfLines=
"0"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"DCT-vD-ifE"
>
<rect
key=
"frame"
x=
"156.5"
y=
"54"
width=
"157"
height=
"19"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"13"
/>
<color
key=
"textColor"
white=
"0.33333333333333331"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"highlightedColor"
/>
</label>
</subviews>
</tableViewCellContentView>
<color
key=
"backgroundColor"
red=
"1"
green=
"0.70412693910000002"
blue=
"0.69044467629999995"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<connections>
<outlet
property=
"ClinchPriceBackView"
destination=
"PBi-J5-AtX"
id=
"M3j-KK-GXq"
/>
<outlet
property=
"clinchTextfield"
destination=
"xSC-sH-Np9"
id=
"cIz-hr-rYN"
/>
<outlet
property=
"goodsCode"
destination=
"DCT-vD-ifE"
id=
"o7C-k5-24W"
/>
<outlet
property=
"goodsImageView"
destination=
"8v1-F3-RUS"
id=
"BIu-vu-js4"
/>
<outlet
property=
"goodsInformationLabe"
destination=
"hV3-WW-RhX"
id=
"gJS-3s-jqF"
/>
<outlet
property=
"goodsNumbersLabe"
destination=
"LCn-vB-Gkk"
id=
"QnQ-ni-opU"
/>
<outlet
property=
"productPriceLabe"
destination=
"ZXB-7t-nrM"
id=
"Exz-9A-R4F"
/>
<outlet
property=
"selectedButton"
destination=
"34f-aR-0gw"
id=
"V06-2T-LQP"
/>
<outlet
property=
"specifications"
destination=
"eQ1-ab-oCl"
id=
"bBm-ig-jmg"
/>
<outlet
property=
"tagsPriceLabe"
destination=
"6S3-kx-Umm"
id=
"1oO-E2-vZh"
/>
</connections>
</tableViewCell>
</prototypes>
</tableView>
</subviews>
<color
key=
"backgroundColor"
red=
"0.87182146355081735"
green=
"1"
blue=
"0.50273634798323685"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
</view>
</subviews>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
</view>
<simulatedScreenMetrics
key=
"simulatedDestinationMetrics"
type=
"iPadPro"
/>
<connections>
<outlet
property=
"delectedButton"
destination=
"Rka-Sf-RRr"
id=
"aTx-5E-kcV"
/>
<outlet
property=
"shoppingBagBackView"
destination=
"fd8-5S-hPm"
id=
"mLP-Qd-J5e"
/>
<outlet
property=
"shoppingBagTableView"
destination=
"dOw-id-UoT"
id=
"gxm-Kd-Znh"
/>
<outlet
property=
"sureButton"
destination=
"dEM-te-Rpj"
id=
"15q-hV-6PA"
/>
<outlet
property=
"totalPriceLabe"
destination=
"79U-B2-y0R"
id=
"8Xe-Fn-1vM"
/>
<outlet
property=
"totalSelectedButton"
destination=
"Of3-V6-dpd"
id=
"G1w-tV-40K"
/>
</connections>
</viewController>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"ohn-yT-Gd7"
userLabel=
"First Responder"
sceneMemberID=
"firstResponder"
/>
</objects>
<point
key=
"canvasLocation"
x=
"1845"
y=
"17058"
/>
</scene>
<!--Navigation Controller-->
<scene
sceneID=
"mef-so-Hgk"
>
<objects>
...
...
@@ -3668,7 +3972,14 @@
<image
name=
"now"
width=
"110"
height=
"110"
/>
<image
name=
"quanping"
width=
"45"
height=
"45"
/>
<image
name=
"reduce"
width=
"49"
height=
"45"
/>
<image
name=
"selectCamer"
width=
"45"
height=
"45"
/>
<image
name=
"selectHelp"
width=
"45"
height=
"45"
/>
<image
name=
"selectShare"
width=
"45"
height=
"45"
/>
<image
name=
"selectshoping"
width=
"45"
height=
"45"
/>
<image
name=
"xiaoping"
width=
"45"
height=
"45"
/>
<image
name=
"产品1"
width=
"50"
height=
"50"
/>
<image
name=
"产品2"
width=
"50"
height=
"50"
/>
<image
name=
"场景1"
width=
"50"
height=
"50"
/>
<image
name=
"场景2"
width=
"50"
height=
"50"
/>
<image
name=
"已完成"
width=
"88"
height=
"87"
/>
<image
name=
"登录"
width=
"1024"
height=
"768"
/>
...
...
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
)
{
//删除先判断数量
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
;
//判断选中的商品是否已经存在
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
(
longPress
.
state
==
UIGestureRecognizerStateBegan
)
{
if
(
self
.
delectedBlock
)
{
self
.
delectedBlock
(
self
.
model
);
}
[
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
)
{
...
...
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
//
// ShoppingBagViewController.m
// Lighting
//
// Created by 曹云霄 on 16/6/6.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "ShoppingBagViewController.h"
#import "ShoppingTableViewCell.h"
#import "TOGoodsEntityModel.h"
#import "ShopcarModel.h"
@interface
ShoppingBagViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
UIGestureRecognizerDelegate
,
DZNEmptyDataSetSource
,
ChangeGoodsNumberDelegate
>
@end
@implementation
ShoppingBagViewController
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
[
self
uiConfigAction
];
[
self
setDelegateandDataSource
];
}
#pragma mark -UI
-
(
void
)
uiConfigAction
{
self
.
view
.
backgroundColor
=
[
UIColor
clearColor
];
UITapGestureRecognizer
*
tap
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
dismissAction
:
)];
tap
.
delegate
=
self
;
[
self
.
view
addGestureRecognizer
:
tap
];
self
.
sureButton
.
layer
.
masksToBounds
=
YES
;
self
.
sureButton
.
layer
.
cornerRadius
=
kCornerRadius
;
}
#pragma mark -数据源
-
(
void
)
setDatasArray
:
(
NSMutableArray
*
)
datasArray
{
NSMutableArray
*
array
=
[
NSMutableArray
array
];
for
(
TOGoodsEntityModel
*
model
in
datasArray
)
{
ShopcarModel
*
shopModel
=
[[
ShopcarModel
alloc
]
init
];
VOResellerGoodsEntity
*
newModel
=
[[
VOResellerGoodsEntity
alloc
]
init
];
newModel
.
categoryName
=
model
.
categoryName
;
newModel
.
brandName
=
model
.
brandName
;
newModel
.
fid
=
model
.
fid
;
newModel
.
createDate
=
model
.
createDate
;
newModel
.
onlineTime
=
model
.
onlineTime
;
newModel
.
company
=
model
.
company
;
newModel
.
code
=
model
.
code
;
newModel
.
name
=
model
.
name
;
newModel
.
number
=
model
.
number
;
newModel
.
categoryId
=
model
.
categoryId
;
newModel
.
brandId
=
model
.
brandId
;
newModel
.
keyword
=
model
.
keyword
;
newModel
.
guidePrice
=
model
.
guidePrice
;
newModel
.
tagPrice
=
model
.
tagPrice
;
newModel
.
costPrice
=
model
.
costPrice
;
newModel
.
state
=
model
.
state
;
newModel
.
inv
=
model
.
inv
;
newModel
.
detailedIntro
=
model
.
detailedIntro
;
newModel
.
weight
=
model
.
weight
;
newModel
.
unit
=
model
.
unit
;
newModel
.
productProfile
=
model
.
productProfile
;
newModel
.
power
=
model
.
power
;
newModel
.
colorTemperature
=
model
.
colorTemperature
;
newModel
.
spec
=
model
.
spec
;
newModel
.
function
=
model
.
function
;
newModel
.
material
=
model
.
material
;
newModel
.
lightSource
=
model
.
lightSource
;
newModel
.
goodsStyle
=
model
.
goodsStyle
;
newModel
.
series
=
model
.
series
;
newModel
.
area
=
model
.
area
;
newModel
.
size
=
model
.
size
;
newModel
.
space
=
model
.
space
;
newModel
.
installMethod
=
model
.
installMethod
;
newModel
.
lightNumber
=
model
.
lightNumber
;
newModel
.
pictures
=
model
.
pictures
;
newModel
.
barcode
=
model
.
barcode
;
shopModel
.
goods
=
newModel
;
shopModel
.
costPrice
=
model
.
costPrice
;
shopModel
.
goodsNum
=
model
.
goodsNumber
;
[
array
addObject
:
shopModel
];
}
_datasArray
=
[
NSMutableArray
arrayWithArray
:
array
];
[
self
.
shoppingBagTableView
reloadData
];
}
#pragma mark -tableview
-
(
void
)
setDelegateandDataSource
{
self
.
shoppingBagTableView
.
delegate
=
self
;
self
.
shoppingBagTableView
.
dataSource
=
self
;
self
.
shoppingBagTableView
.
emptyDataSetSource
=
self
;
self
.
shoppingBagTableView
.
tableFooterView
=
[
UIView
new
];
}
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
ShoppingTableViewCell
*
cell
=
[
tableView
dequeueReusableCellWithIdentifier
:
@"Shopping"
forIndexPath
:
indexPath
];
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
cell
.
model
=
[
self
.
datasArray
objectAtIndex_opple
:
indexPath
.
row
];
cell
.
delegate
=
self
;
cell
.
cellindex
=
indexPath
.
row
;
//cell选中回调
__weak
typeof
(
self
)
weakSelf
=
self
;
[
cell
setReturnCellblock
:
^
(
NSInteger
index
)
{
[
weakSelf
setSelectedButton
:
index
];
}];
//提示框回调
[
cell
setPromptStringBlock
:
^
(
NSString
*
string
)
{
[
weakSelf
promptCustomerWithString
:
string
];
}];
return
cell
;
}
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
return
self
.
datasArray
.
count
;
}
-
(
CGFloat
)
tableView
:
(
UITableView
*
)
tableView
heightForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
return
80
;
}
#pragma mark -选中商品回调
-
(
void
)
setSelectedButton
:
(
NSInteger
)
index
;
{
ShopcarModel
*
model
=
[
self
.
datasArray
objectAtIndex_opple
:
index
];
model
.
isSelected
=
!
model
.
isSelected
;
NSInteger
goodsNumber
=
0
;
for
(
ShopcarModel
*
model
in
self
.
datasArray
)
{
if
(
model
.
isSelected
)
{
goodsNumber
++
;
}
}
if
(
goodsNumber
==
self
.
datasArray
.
count
)
{
self
.
totalSelectedButton
.
selected
=
YES
;
}
else
{
self
.
totalSelectedButton
.
selected
=
NO
;
}
[
self
CalculateSelectedGoodsAllprice
];
[
self
.
sureButton
setTitle
:[
NSString
stringWithFormat
:
@"去结算(%ld)"
,
goodsNumber
]
forState
:
UIControlStateNormal
];
}
#pragma mark -计算选中后的商品总金额
-
(
void
)
CalculateSelectedGoodsAllprice
{
CGFloat
allPrice
=
0
;
for
(
ShopcarModel
*
model
in
self
.
datasArray
)
{
if
(
model
.
isSelected
)
{
allPrice
+=
([
model
.
costPrice
floatValue
]?[
model
.
costPrice
floatValue
]:[
model
.
goods
.
tagPrice
floatValue
])
*
model
.
goodsNum
;
}
}
self
.
totalPriceLabe
.
text
=
[
NSString
stringWithFormat
:
@"¥%.2f"
,
allPrice
];
}
#pragma mark -全选
-
(
IBAction
)
totalButtonSelectedAction
:
(
UIButton
*
)
sender
{
sender
.
selected
=
!
sender
.
selected
;
if
(
sender
.
selected
)
{
//全部选中
for
(
ShoppingTableViewCell
*
cell
in
self
.
shoppingBagTableView
.
visibleCells
)
{
cell
.
selectedButton
.
selected
=
YES
;
}
for
(
ShopcarModel
*
model
in
self
.
datasArray
)
{
model
.
isSelected
=
YES
;
}
[
self
.
sureButton
setTitle
:[
NSString
stringWithFormat
:
@"确认添加(%ld)"
,
self
.
datasArray
.
count
]
forState
:
UIControlStateNormal
];
}
else
{
//取消全部选中
for
(
ShoppingTableViewCell
*
cell
in
self
.
shoppingBagTableView
.
visibleCells
)
{
cell
.
selectedButton
.
selected
=
NO
;
}
for
(
ShopcarModel
*
model
in
self
.
datasArray
)
{
model
.
isSelected
=
NO
;
}
[
self
.
sureButton
setTitle
:
@"确认添加(0)"
forState
:
UIControlStateNormal
];
}
//计算总金额
[
self
CalculateSelectedGoodsAllprice
];
}
#pragma mark -删除
-
(
IBAction
)
delectedButtonSelectedAction
:
(
UIButton
*
)
sender
{
NSMutableArray
*
indexpathArray
=
[
NSMutableArray
array
];
NSMutableArray
*
delectedModelArray
=
[
NSMutableArray
array
];
for
(
int
i
=
0
;
i
<
self
.
datasArray
.
count
;
i
++
)
{
ShopcarModel
*
model
=
[
self
.
datasArray
objectAtIndex_opple
:
i
];
if
(
model
.
isSelected
)
{
NSIndexPath
*
indexPath
=
[
NSIndexPath
indexPathForRow
:
i
inSection
:
0
];
[
indexpathArray
addObject
:
indexPath
];
[
delectedModelArray
addObject
:
model
];
}
}
if
(
!
indexpathArray
.
count
)
{
[
self
ErrorMBProgressView
:
@"未选中任何商品"
];
}
else
{
for
(
ShopcarModel
*
model
in
delectedModelArray
)
{
[
self
.
datasArray
removeObject
:
model
];
}
[
self
.
sureButton
setTitle
:
@"确认添加(0)"
forState
:
UIControlStateNormal
];
self
.
totalSelectedButton
.
selected
=
NO
;
self
.
totalPriceLabe
.
text
=
nil
;
[
self
.
shoppingBagTableView
deleteRowsAtIndexPaths
:
indexpathArray
withRowAnimation
:
UITableViewRowAnimationLeft
];
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
1
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
[
self
.
shoppingBagTableView
reloadData
];
});
}
}
#pragma mark -添加至购物车
-
(
IBAction
)
addShoppingBagButtonClickAction
:
(
UIButton
*
)
sender
{
NSMutableArray
*
array
=
[
NSMutableArray
array
];
for
(
int
i
=
0
;
i
<
self
.
datasArray
.
count
;
i
++
)
{
ShopcarModel
*
model
=
[
self
.
datasArray
objectAtIndex_opple
:
i
];
if
(
model
.
isSelected
)
{
[
array
addObject
:
model
];
}
}
if
(
!
array
.
count
)
{
[
self
ErrorMBProgressView
:
@"请先勾选商品"
];
return
;
}
[
self
CreateMBProgressHUDLoding
];
NSMutableString
*
goodsIds
=
[[
NSMutableString
alloc
]
init
];
NSMutableString
*
goodsCounts
=
[[
NSMutableString
alloc
]
init
];
for
(
ShopcarModel
*
model
in
self
.
datasArray
)
{
if
(
model
.
isSelected
)
{
[
goodsIds
appendFormat
:
@"%@,"
,
model
.
goods
.
fid
];
[
goodsCounts
appendFormat
:
@"%d,"
,
model
.
goodsNum
];
}
}
SaveShoppingCartRequest
*
shopCar
=
[[
SaveShoppingCartRequest
alloc
]
init
];
shopCar
.
consumerId
=
[
Customermanager
manager
].
model
.
fid
;
shopCar
.
goodsId
=
[
goodsIds
substringToIndex
:
goodsIds
.
length
-
1
];
shopCar
.
count
=
[
goodsCounts
substringToIndex
:
goodsCounts
.
length
-
1
];
[[
NetworkRequestClassManager
Manager
]
NetworkRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/shopcart/save"
]
WithRequestType
:
0
WithParameter
:
shopCar
WithReturnValueBlock
:^
(
id
returnValue
)
{
[
self
RemoveMBProgressHUDLoding
];
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
[
self
SuccessMBProgressView
:
@"加入购物车成功"
];
}
else
{
[
self
ErrorMBProgressView
:
returnValue
[
@"message"
]];
}
}
WithErrorCodeBlock
:^
(
id
errorCodeValue
)
{
[
self
RemoveMBProgressHUDLoding
];
}
WithFailureBlock
:^
(
id
error
)
{
[
self
ErrorMBProgressView
:
@"加入购物车失败"
];
[
self
RemoveMBProgressHUDLoding
];
}];
}
#pragma mark -改变商品数量
-
(
void
)
ChangeGoodsNumber
:
(
int
)
goodsNumber
WithcostPrice
:
(
CGFloat
)
costprice
Withcellindex
:
(
NSInteger
)
cellindex
{
//保存商品数量
ShopcarModel
*
model
=
[
self
.
datasArray
objectAtIndex_opple
:
cellindex
];
model
.
goodsNum
=
goodsNumber
;
//保存成交价格
ShopcarModel
*
Newmodel
=
[
self
.
datasArray
objectAtIndex_opple
:
cellindex
];
Newmodel
.
costPrice
=
[
NSNumber
numberWithFloat
:
costprice
];
[
self
CalculateSelectedGoodsAllprice
];
}
#pragma mark -销毁
-
(
void
)
dismissAction
:
(
UITapGestureRecognizer
*
)
tap
{
if
(
self
.
dismissBlock
)
{
self
.
dismissBlock
();
}
[
self
dismissViewControllerAnimated
:
YES
completion
:
nil
];
}
#pragma mark -UIGestureRecognizerDelegate代理
-
(
BOOL
)
gestureRecognizer
:
(
UIGestureRecognizer
*
)
gestureRecognizer
shouldReceiveTouch
:
(
UITouch
*
)
touch
{
//取消子视图的的时间穿透,否则子视图的点击无效,会被传递到父视图响应
if
(
CGRectContainsPoint
(
self
.
shoppingBagBackView
.
frame
,
[
touch
locationInView
:
self
.
view
.
window
]))
{
return
NO
;
}
return
YES
;
}
#pragma mark -友好界面
-
(
UIImage
*
)
imageForEmptyDataSet
:
(
UIScrollView
*
)
scrollView
{
return
TCImage
(
@"圆角矩形-3-副本"
);
}
-
(
NSAttributedString
*
)
titleForEmptyDataSet
:
(
UIScrollView
*
)
scrollView
{
return
[[
NSAttributedString
alloc
]
initWithString
:
@"暂无数据"
attributes
:
nil
];
}
-
(
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/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