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
b7e1281d
Commit
b7e1281d
authored
Jun 08, 2016
by
曹云霄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成客户、导购头像上传修改,筛选优化。。。。debug
parent
313eef06
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
247 additions
and
209 deletions
+247
-209
ClientViewController.m
Lighting/Class/ClientViewController.m
+12
-4
ClientdetailsViewController.m
Lighting/Class/ClientdetailsViewController.m
+0
-1
LoginViewController.m
Lighting/Class/Login/LoginViewController.m
+16
-35
ProductCollectionViewCell.h
Lighting/Class/ProductCollectionViewCell.h
+5
-0
ProductCollectionViewCell.m
Lighting/Class/ProductCollectionViewCell.m
+10
-0
ProductDetailsHeaderView.xib
Lighting/Class/ProductDetailsHeaderView.xib
+8
-9
ProductDetailsViewController.m
Lighting/Class/ProductDetailsViewController.m
+89
-26
ProductLibraryViewController.m
Lighting/Class/ProductLibraryViewController.m
+41
-49
AddressViewController.m
Lighting/Class/Shoppingcart/AddressViewController.m
+11
-27
CustomTabbarController.m
Lighting/Class/Tabbar/CustomTabbarController.m
+7
-8
UserViewController.m
Lighting/Class/UserViewController.m
+4
-5
goodsDetailsTableViewCell.xib
Lighting/Class/goodsDetailsTableViewCell.xib
+1
-1
AppDelegate.m
Lighting/Lighting/AppDelegate.m
+6
-1
Podfile.lock
Lighting/Podfile.lock
+3
-0
ExperienceCentreViewController.m
Lighting/Tools/ExperienceCentreViewController.m
+1
-1
PrefixHeader.pch
Lighting/Tools/PrefixHeader.pch
+15
-24
SceneViewController.m
Lighting/Tools/SceneViewController.m
+6
-16
ShareGoodsViewController.m
Lighting/Tools/ShareGoodsViewController.m
+2
-1
opple_objc_json_client.h
Lighting/Tools/opple_objc_json_client.h
+8
-1
opple_objc_json_client.m
Lighting/Tools/opple_objc_json_client.m
+1
-0
podfile
Lighting/podfile
+1
-0
No files found.
Lighting/Class/ClientViewController.m
View file @
b7e1281d
...
@@ -397,6 +397,15 @@
...
@@ -397,6 +397,15 @@
[
self
uploadUserHeader
:
Headimage
completeBlock
:
^
(
NSString
*
string
)
{
[
self
uploadUserHeader
:
Headimage
completeBlock
:
^
(
NSString
*
string
)
{
weskSelf
.
customerHeader
.
image
=
Headimage
;
weskSelf
.
customerHeader
.
image
=
Headimage
;
[
Customermanager
manager
].
model
.
picture
=
string
;
[
Customermanager
manager
].
model
.
picture
=
string
;
for
(
int
i
=
0
;
i
<
self
.
CustomerresultArray
.
count
;
i
++
)
{
MyclientEntityModel
*
customerModel
=
(
MyclientEntityModel
*
)[
self
.
CustomerresultArray
objectAtIndex_opple
:
i
];
if
([
customerModel
.
fid
isEqualToString
:[
Customermanager
manager
].
model
.
fid
])
{
customerModel
.
picture
=
string
;
NSIndexPath
*
indexPath
=
[
NSIndexPath
indexPathForRow
:
i
inSection
:
0
];
[
self
.
informationTableview
reloadRowsAtIndexPaths
:@[
indexPath
]
withRowAnimation
:
UITableViewRowAnimationBottom
];
break
;
}
}
}];
}];
}
}
...
@@ -417,10 +426,9 @@
...
@@ -417,10 +426,9 @@
}
}
}
WithprogressBlock
:^
(
double
progress
)
{
}
WithprogressBlock
:^
(
double
progress
)
{
if
(
progress
>=
1
)
{
if
(
progress
>=
1
)
{
weskSelf
.
TCHud
.
labelText
=
@"上传完成"
;
dispatch_async
(
dispatch_get_main_queue
(),
^
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
weskSelf
.
TCHud
.
labelText
=
@"上传完成"
;
[
weskSelf
RemoveMBProgressHUDLoding
];
[
weskSelf
RemoveMBProgressHUDLoding
];
});
});
}
else
}
else
...
@@ -430,13 +438,13 @@
...
@@ -430,13 +438,13 @@
});
});
}
}
}
WithErrorCodeBlock
:^
(
id
errorCodeValue
)
{
}
WithErrorCodeBlock
:^
(
id
errorCodeValue
)
{
weskSelf
.
TCHud
.
labelText
=
@"上传失败"
;
dispatch_async
(
dispatch_get_main_queue
(),
^
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
weskSelf
.
TCHud
.
labelText
=
@"上传失败"
;
[
weskSelf
RemoveMBProgressHUDLoding
];
[
weskSelf
RemoveMBProgressHUDLoding
];
});
});
}
WithFailureBlock
:^
(
NSError
*
error
)
{
}
WithFailureBlock
:^
(
NSError
*
error
)
{
weskSelf
.
TCHud
.
labelText
=
@"上传失败"
;
dispatch_async
(
dispatch_get_main_queue
(),
^
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
weskSelf
.
TCHud
.
labelText
=
@"上传失败"
;
[
weskSelf
RemoveMBProgressHUDLoding
];
[
weskSelf
RemoveMBProgressHUDLoding
];
});
});
}];
}];
...
...
Lighting/Class/ClientdetailsViewController.m
View file @
b7e1281d
...
@@ -184,7 +184,6 @@
...
@@ -184,7 +184,6 @@
}
}
else
if
(
self
.
orderRecordButton
.
selected
)
//订单记录
else
if
(
self
.
orderRecordButton
.
selected
)
//订单记录
{
{
self
.
orderRecordPage
=
1
;
if
(
self
.
orderRecordPage
++
>
self
.
orderRecordTotalPage
)
{
if
(
self
.
orderRecordPage
++
>
self
.
orderRecordTotalPage
)
{
[
self
.
ClientdetailsTableview
.
mj_footer
endRefreshingWithNoMoreData
];
[
self
.
ClientdetailsTableview
.
mj_footer
endRefreshingWithNoMoreData
];
}
else
}
else
...
...
Lighting/Class/Login/LoginViewController.m
View file @
b7e1281d
...
@@ -317,7 +317,7 @@
...
@@ -317,7 +317,7 @@
}
}
[
self
CreateMBProgressHUDLoding
];
[
self
CreateMBProgressHUDLoding
];
//发送验证码
//发送验证码
[[
NetworkRequestClassManager
Manager
]
NetworkWithDictionaryRequestWithURL
:[
NSString
stringWithFormat
:
@"%@
%@%@"
,
ServerAddress
,
@"/system/sendSms?mobilephone="
,
inputPhoneNumber
]
WithRequestType
:
1
WithParameter
:
nil
WithReturnValueBlock
:^
(
id
returnValue
)
{
[[
NetworkRequestClassManager
Manager
]
NetworkWithDictionaryRequestWithURL
:[
NSString
stringWithFormat
:
@"%@
/system/sendSms?mobilephone=%@&username=%@"
,
ServerAddress
,
inputPhoneNumber
,
self
.
identityView
.
userName
.
text
]
WithRequestType
:
1
WithParameter
:
nil
WithReturnValueBlock
:^
(
id
returnValue
)
{
[
self
RemoveMBProgressHUDLoding
];
[
self
RemoveMBProgressHUDLoding
];
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
...
@@ -383,38 +383,23 @@
...
@@ -383,38 +383,23 @@
{
{
// 验证码必须填写
// 验证码必须填写
if
(
self
.
identityView
.
verificationCode
.
text
.
length
==
0
)
{
if
(
self
.
identityView
.
verificationCode
.
text
.
length
==
0
)
{
[
self
ErrorMBProgressView
:
@"验证码不能为空"
];
[
self
ErrorMBProgressView
:
@"验证码不能为空"
];
return
;
return
;
}
else
{
}
else
{
//验证验证码
[
self
CreateMBProgressHUDLoding
];
[
self
.
sendTimer
invalidate
];
[[
NetworkRequestClassManager
Manager
]
NetworkWithDictionaryRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@%@"
,
ServerAddress
,
@"/employee/validateSmsCode?code="
,
self
.
identityView
.
verificationCode
.
text
]
WithRequestType
:
1
WithParameter
:
nil
WithReturnValueBlock
:^
(
id
returnValue
)
{
self
.
resetPasswordView
=
[[[
NSBundle
mainBundle
]
loadNibNamed
:
@"authenticateView"
owner
:
self
options
:
nil
]
lastObject
];
self
.
resetPasswordView
.
layer
.
masksToBounds
=
YES
;
[
self
RemoveMBProgressHUDLoding
];
self
.
resetPasswordView
.
layer
.
cornerRadius
=
10
;
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
self
.
resetPasswordView
.
frame
=
self
.
userNameLoginView
.
frame
;
[
self
.
resetPasswordView
.
backValidationView
addTarget
:
self
action
:
@selector
(
backButonClick
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
sendTimer
invalidate
];
[
self
.
resetPasswordView
.
resetPasswordNextButton
addTarget
:
self
action
:
@selector
(
ChangPassWordRequest
)
forControlEvents
:
UIControlEventTouchUpInside
];
self
.
resetPasswordView
=
[[[
NSBundle
mainBundle
]
loadNibNamed
:
@"authenticateView"
owner
:
self
options
:
nil
]
lastObject
];
[
self
.
view
addSubview
:
self
.
resetPasswordView
];
self
.
resetPasswordView
.
layer
.
masksToBounds
=
YES
;
self
.
resetPasswordView
.
alpha
=
0
;
self
.
resetPasswordView
.
layer
.
cornerRadius
=
10
;
[
UIView
animateWithDuration
:
0
.
2
animations
:
^
{
self
.
resetPasswordView
.
frame
=
self
.
userNameLoginView
.
frame
;
self
.
resetPasswordView
.
alpha
=
1
;
[
self
.
resetPasswordView
.
backValidationView
addTarget
:
self
action
:
@selector
(
backButonClick
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
resetPasswordView
.
resetPasswordNextButton
addTarget
:
self
action
:
@selector
(
ChangPassWordRequest
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
self
.
resetPasswordView
];
self
.
resetPasswordView
.
alpha
=
0
;
[
UIView
animateWithDuration
:
0
.
2
animations
:
^
{
self
.
resetPasswordView
.
alpha
=
1
;
}];
}
else
{
[
self
ErrorMBProgressView
:
returnValue
[
@"message"
]];
}
}
WithErrorCodeBlock
:^
(
id
errorCodeValue
)
{
}
WithFailureBlock
:^
(
NSError
*
error
)
{
[
self
ErrorMBProgressView
:
error
.
localizedDescription
];
[
self
RemoveMBProgressHUDLoding
];
}];
}];
}
}
}
}
...
@@ -444,6 +429,7 @@
...
@@ -444,6 +429,7 @@
ResetPasswordRequest
*
passwrod
=
[[
ResetPasswordRequest
alloc
]
init
];
ResetPasswordRequest
*
passwrod
=
[[
ResetPasswordRequest
alloc
]
init
];
passwrod
.
fnewPassword
=
self
.
resetPasswordView
.
newpass
.
text
;
passwrod
.
fnewPassword
=
self
.
resetPasswordView
.
newpass
.
text
;
passwrod
.
username
=
self
.
userName
.
text
;
passwrod
.
username
=
self
.
userName
.
text
;
passwrod
.
smsCode
=
self
.
identityView
.
verificationCode
.
text
;
[[
NetworkRequestClassManager
Manager
]
NetworkRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/employee/resetPassword"
]
WithRequestType
:
0
WithParameter
:
passwrod
WithReturnValueBlock
:^
(
id
returnValue
)
{
[[
NetworkRequestClassManager
Manager
]
NetworkRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/employee/resetPassword"
]
WithRequestType
:
0
WithParameter
:
passwrod
WithReturnValueBlock
:^
(
id
returnValue
)
{
...
@@ -464,9 +450,7 @@
...
@@ -464,9 +450,7 @@
[
self
ErrorMBProgressView
:
error
.
localizedDescription
];
[
self
ErrorMBProgressView
:
error
.
localizedDescription
];
[
self
RemoveMBProgressHUDLoding
];
[
self
RemoveMBProgressHUDLoding
];
}];
}];
}
}
...
@@ -495,9 +479,6 @@
...
@@ -495,9 +479,6 @@
-
(
void
)
didReceiveMemoryWarning
{
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
[
super
didReceiveMemoryWarning
];
// Dispose of any resources that can be recreated.
// Dispose of any resources that can be recreated.
...
...
Lighting/Class/ProductCollectionViewCell.h
View file @
b7e1281d
...
@@ -49,6 +49,11 @@
...
@@ -49,6 +49,11 @@
*/
*/
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
specifications
;
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
specifications
;
/**
* 数据源
*/
@property
(
nonatomic
,
strong
)
TOGoodsEntity
*
model
;
...
...
Lighting/Class/ProductCollectionViewCell.m
View file @
b7e1281d
...
@@ -32,4 +32,14 @@
...
@@ -32,4 +32,14 @@
}
}
-
(
void
)
setModel
:(
TOGoodsEntity
*
)
model
{
NSArray
*
imageArray
=
[
model
.
pictures
componentsSeparatedByString
:
@","
];
[
self
.
productImageView
sd_setImageWithURL
:[
NSURL
URLWithString
:[
imageArray
firstObject
]]
placeholderImage
:
REPLACEIMAGE
];
self
.
productPrice
.
text
=
[
NSString
stringWithFormat
:
@"¥%.2f"
,[
model
.
tagPrice
floatValue
]];
self
.
productParameter
.
text
=
model
.
name
;
self
.
specifications
.
text
=
[
NSString
stringWithFormat
:
@"%@(%@)"
,
model
.
code
,
model
.
size
];
}
@end
@end
Lighting/Class/ProductDetailsHeaderView.xib
View file @
b7e1281d
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB"
version=
"3.0"
toolsVersion=
"1011
6"
systemVersion=
"15E65
"
targetRuntime=
"iOS.CocoaTouch.iPad"
propertyAccessControl=
"none"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB"
version=
"3.0"
toolsVersion=
"1011
7"
systemVersion=
"15F34
"
targetRuntime=
"iOS.CocoaTouch.iPad"
propertyAccessControl=
"none"
>
<dependencies>
<dependencies>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"10085"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"10085"
/>
</dependencies>
</dependencies>
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
<rect
key=
"frame"
x=
"20"
y=
"21"
width=
"385"
height=
"358"
/>
<rect
key=
"frame"
x=
"20"
y=
"21"
width=
"385"
height=
"358"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
flexibleMaxX=
"YES"
heightSizable=
"YES"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
flexibleMaxX=
"YES"
heightSizable=
"YES"
/>
<subviews>
<subviews>
<imageView
userInteractionEnabled=
"NO"
contentMode=
"scaleToFill"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
i
mage=
"140046029-MX260-D112-03-星冠-5700K(4)"
i
d=
"tLl-kB-n3W"
>
<imageView
userInteractionEnabled=
"NO"
contentMode=
"scaleToFill"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
id=
"tLl-kB-n3W"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"385"
height=
"358"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"385"
height=
"358"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
</imageView>
</imageView>
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
<color
key=
"textColor"
red=
"0.59999999999999998"
green=
"0.59999999999999998"
blue=
"0.59999999999999998"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<color
key=
"textColor"
red=
"0.59999999999999998"
green=
"0.59999999999999998"
blue=
"0.59999999999999998"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
<nil
key=
"highlightedColor"
/>
</label>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"
LAD-89757
"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"b7B-yI-JEC"
>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
""
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"b7B-yI-JEC"
>
<rect
key=
"frame"
x=
"588"
y=
"42"
width=
"163"
height=
"20"
/>
<rect
key=
"frame"
x=
"588"
y=
"42"
width=
"163"
height=
"20"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
widthSizable=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
widthSizable=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"20"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"20"
/>
...
@@ -56,8 +56,8 @@
...
@@ -56,8 +56,8 @@
<color
key=
"textColor"
red=
"0.59999999999999998"
green=
"0.59999999999999998"
blue=
"0.59999999999999998"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<color
key=
"textColor"
red=
"0.59999999999999998"
green=
"0.59999999999999998"
blue=
"0.59999999999999998"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
<nil
key=
"highlightedColor"
/>
</label>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"
名称字段
"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"NlJ-8b-gcl"
>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
""
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"NlJ-8b-gcl"
>
<rect
key=
"frame"
x=
"588"
y=
"76"
width=
"1
30
"
height=
"17"
/>
<rect
key=
"frame"
x=
"588"
y=
"76"
width=
"1
63
"
height=
"17"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
widthSizable=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
widthSizable=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<color
key=
"textColor"
red=
"0.59999999999999998"
green=
"0.59999999999999998"
blue=
"0.59999999999999998"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<color
key=
"textColor"
red=
"0.59999999999999998"
green=
"0.59999999999999998"
blue=
"0.59999999999999998"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
...
@@ -70,7 +70,7 @@
...
@@ -70,7 +70,7 @@
<color
key=
"textColor"
red=
"0.59999999999999998"
green=
"0.59999999999999998"
blue=
"0.59999999999999998"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<color
key=
"textColor"
red=
"0.59999999999999998"
green=
"0.59999999999999998"
blue=
"0.59999999999999998"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
<nil
key=
"highlightedColor"
/>
</label>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"
欧普
"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"Hf9-WK-7u5"
>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
""
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"Hf9-WK-7u5"
>
<rect
key=
"frame"
x=
"588"
y=
"106"
width=
"130"
height=
"17"
/>
<rect
key=
"frame"
x=
"588"
y=
"106"
width=
"130"
height=
"17"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
widthSizable=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
widthSizable=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
<color
key=
"textColor"
red=
"0.59999999999999998"
green=
"0.59999999999999998"
blue=
"0.59999999999999998"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<color
key=
"textColor"
red=
"0.59999999999999998"
green=
"0.59999999999999998"
blue=
"0.59999999999999998"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
<nil
key=
"highlightedColor"
/>
</label>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"
¥12800
"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"Rka-oV-nyM"
>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
""
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"Rka-oV-nyM"
>
<rect
key=
"frame"
x=
"588"
y=
"148"
width=
"163"
height=
"20"
/>
<rect
key=
"frame"
x=
"588"
y=
"148"
width=
"163"
height=
"20"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
widthSizable=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
widthSizable=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"20"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"20"
/>
...
@@ -105,7 +105,7 @@
...
@@ -105,7 +105,7 @@
<color
key=
"textColor"
red=
"0.59999999999999998"
green=
"0.59999999999999998"
blue=
"0.59999999999999998"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<color
key=
"textColor"
red=
"0.59999999999999998"
green=
"0.59999999999999998"
blue=
"0.59999999999999998"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<nil
key=
"highlightedColor"
/>
<nil
key=
"highlightedColor"
/>
</label>
</label>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"
34
"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"zXN-Uh-XtZ"
>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
""
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
id=
"zXN-Uh-XtZ"
>
<rect
key=
"frame"
x=
"588"
y=
"272"
width=
"70"
height=
"17"
/>
<rect
key=
"frame"
x=
"588"
y=
"272"
width=
"70"
height=
"17"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
widthSizable=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
widthSizable=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
...
@@ -170,7 +170,6 @@
...
@@ -170,7 +170,6 @@
</view>
</view>
</objects>
</objects>
<resources>
<resources>
<image
name=
"140046029-MX260-D112-03-星冠-5700K(4)"
width=
"600"
height=
"450"
/>
<image
name=
"2"
width=
"45"
height=
"45"
/>
<image
name=
"2"
width=
"45"
height=
"45"
/>
<image
name=
"add"
width=
"49"
height=
"45"
/>
<image
name=
"add"
width=
"49"
height=
"45"
/>
<image
name=
"icon-2"
width=
"25"
height=
"15"
/>
<image
name=
"icon-2"
width=
"25"
height=
"15"
/>
...
...
Lighting/Class/ProductDetailsViewController.m
View file @
b7e1281d
...
@@ -13,6 +13,8 @@
...
@@ -13,6 +13,8 @@
#import "goodsDetailsTableViewCell.h"
#import "goodsDetailsTableViewCell.h"
#import "FullScreenViewController.h"
#import "FullScreenViewController.h"
@interface
ProductDetailsViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
UITextFieldDelegate
>
@interface
ProductDetailsViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
UITextFieldDelegate
>
@property
(
nonatomic
,
strong
)
ProductDetailsHeaderView
*
headerView
;
@property
(
nonatomic
,
strong
)
ProductDetailsHeaderView
*
headerView
;
...
@@ -70,7 +72,6 @@
...
@@ -70,7 +72,6 @@
[
self
uiConfigAction
];
[
self
uiConfigAction
];
[
self
getGoodsListDetails
];
[
self
getGoodsListDetails
];
}
}
#pragma mark -UI
#pragma mark -UI
...
@@ -81,7 +82,6 @@
...
@@ -81,7 +82,6 @@
self
.
productDetilsTableview
.
delegate
=
self
;
self
.
productDetilsTableview
.
delegate
=
self
;
[
self
.
productDetilsTableview
registerNib
:[
UINib
nibWithNibName
:
@"goodsDetailsTableViewCell"
bundle
:
nil
]
forCellReuseIdentifier
:
@"goodsdetailscell"
];
[
self
.
productDetilsTableview
registerNib
:[
UINib
nibWithNibName
:
@"goodsDetailsTableViewCell"
bundle
:
nil
]
forCellReuseIdentifier
:
@"goodsdetailscell"
];
[
self
CreateHeaderView
];
[
self
CreateHeaderView
];
}
}
...
@@ -216,10 +216,96 @@
...
@@ -216,10 +216,96 @@
return
170
;
return
170
;
}
}
return
ScreenWidth
*
3
/
4
;
NSURL
*
url
=
[
NSURL
URLWithString
:[
self
.
goodsDetailsArray
objectAtIndex_opple
:
indexPath
.
row
]];
return
[
ProductDetailsViewController
getImageSizeWithURL
:
url
].
height
;
}
#pragma mark -计算图片高度
+
(
CGSize
)
getImageSizeWithURL
:
(
id
)
imageURL
{
NSURL
*
URL
=
nil
;
if
([
imageURL
isKindOfClass
:[
NSURL
class
]]){
URL
=
imageURL
;
}
if
([
imageURL
isKindOfClass
:[
NSString
class
]]){
URL
=
[
NSURL
URLWithString
:
imageURL
];
}
if
(
URL
==
nil
)
return
CGSizeZero
;
// url不正确返回CGSizeZero
NSMutableURLRequest
*
request
=
[[
NSMutableURLRequest
alloc
]
initWithURL
:
URL
];
NSString
*
pathExtendsion
=
[
URL
.
pathExtension
lowercaseString
];
CGSize
size
=
CGSizeZero
;
if
([
pathExtendsion
isEqualToString
:
@"jpg"
]){
size
=
[
self
getJPGImageSizeWithRequest
:
request
];
}
if
(
CGSizeEqualToSize
(
CGSizeZero
,
size
))
// 如果获取文件头信息失败,发送异步请求请求原图
{
NSData
*
data
=
[
NSURLConnection
sendSynchronousRequest
:[
NSURLRequest
requestWithURL
:
URL
]
returningResponse
:
nil
error
:
nil
];
UIImage
*
image
=
[
UIImage
imageWithData
:
data
];
if
(
image
)
{
size
=
image
.
size
;
}
}
return
size
;
}
}
+
(
CGSize
)
getJPGImageSizeWithRequest
:
(
NSMutableURLRequest
*
)
request
{
[
request
setValue
:
@"bytes=0-209"
forHTTPHeaderField
:
@"Range"
];
NSData
*
data
=
[
NSURLConnection
sendSynchronousRequest
:
request
returningResponse
:
nil
error
:
nil
];
if
([
data
length
]
<=
0x58
)
{
return
CGSizeZero
;
}
if
([
data
length
]
<
210
)
{
// 肯定只有一个DQT字段
short
w1
=
0
,
w2
=
0
;
[
data
getBytes
:
&
w1
range
:
NSMakeRange
(
0x60
,
0x1
)];
[
data
getBytes
:
&
w2
range
:
NSMakeRange
(
0x61
,
0x1
)];
short
w
=
(
w1
<<
8
)
+
w2
;
short
h1
=
0
,
h2
=
0
;
[
data
getBytes
:
&
h1
range
:
NSMakeRange
(
0x5e
,
0x1
)];
[
data
getBytes
:
&
h2
range
:
NSMakeRange
(
0x5f
,
0x1
)];
short
h
=
(
h1
<<
8
)
+
h2
;
return
CGSizeMake
(
w
,
h
);
}
else
{
short
word
=
0x0
;
[
data
getBytes
:
&
word
range
:
NSMakeRange
(
0x15
,
0x1
)];
if
(
word
==
0xdb
)
{
[
data
getBytes
:
&
word
range
:
NSMakeRange
(
0x5a
,
0x1
)];
if
(
word
==
0xdb
)
{
// 两个DQT字段
short
w1
=
0
,
w2
=
0
;
[
data
getBytes
:
&
w1
range
:
NSMakeRange
(
0xa5
,
0x1
)];
[
data
getBytes
:
&
w2
range
:
NSMakeRange
(
0xa6
,
0x1
)];
short
w
=
(
w1
<<
8
)
+
w2
;
short
h1
=
0
,
h2
=
0
;
[
data
getBytes
:
&
h1
range
:
NSMakeRange
(
0xa3
,
0x1
)];
[
data
getBytes
:
&
h2
range
:
NSMakeRange
(
0xa4
,
0x1
)];
short
h
=
(
h1
<<
8
)
+
h2
;
return
CGSizeMake
(
w
,
h
);
}
else
{
// 一个DQT字段
short
w1
=
0
,
w2
=
0
;
[
data
getBytes
:
&
w1
range
:
NSMakeRange
(
0x60
,
0x1
)];
[
data
getBytes
:
&
w2
range
:
NSMakeRange
(
0x61
,
0x1
)];
short
w
=
(
w1
<<
8
)
+
w2
;
short
h1
=
0
,
h2
=
0
;
[
data
getBytes
:
&
h1
range
:
NSMakeRange
(
0x5e
,
0x1
)];
[
data
getBytes
:
&
h2
range
:
NSMakeRange
(
0x5f
,
0x1
)];
short
h
=
(
h1
<<
8
)
+
h2
;
return
CGSizeMake
(
w
,
h
);
}
}
else
{
return
CGSizeZero
;
}
}
}
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
tableView
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
tableView
{
{
return
2
;
return
2
;
...
@@ -281,7 +367,6 @@
...
@@ -281,7 +367,6 @@
#pragma mark -UITextFieldDelegate
#pragma mark -UITextFieldDelegate
-
(
void
)
textFieldDidEndEditing
:
(
UITextField
*
)
textField
-
(
void
)
textFieldDidEndEditing
:
(
UITextField
*
)
textField
{
{
NSLog
(
@"%@"
,
textField
.
text
);
NSString
*
inputString
=
textField
.
text
;
NSString
*
inputString
=
textField
.
text
;
if
(
!
[
self
isPureInt
:
inputString
])
{
if
(
!
[
self
isPureInt
:
inputString
])
{
...
@@ -289,7 +374,6 @@
...
@@ -289,7 +374,6 @@
textField
.
text
=
@"1"
;
textField
.
text
=
@"1"
;
return
;
return
;
}
}
if
([
inputString
integerValue
]
>
[
self
.
entity
.
number
integerValue
])
{
if
([
inputString
integerValue
]
>
[
self
.
entity
.
number
integerValue
])
{
[
self
ErrorMBProgressView
:
@"超过库存数量"
];
[
self
ErrorMBProgressView
:
@"超过库存数量"
];
...
@@ -298,26 +382,6 @@
...
@@ -298,26 +382,6 @@
}
}
}
}
//
//@synthesize fid;
//@synthesize createName;
//@synthesize createBy;
//@synthesize createDate;
//@synthesize updateName;
//@synthesize updateBy;
//@synthesize updateDate;
//@synthesize sysOrgCode;
////@synthesize goodsId;
//@synthesize goodsCode;
//@synthesize goodsName;
//@synthesize goodsCover;
//@synthesize goodsSpec;
//@synthesize goodsBrand;
//@synthesize goodsSellerPrice;
//@synthesize goodsNum;
//@synthesize goodsPrice;
//@synthesize goodsTotalPrice;
//@synthesize consumerId;
#pragma mark -开发加入购物车动画
#pragma mark -开发加入购物车动画
-
(
void
)
StartAddShoppingCarAnimationWithimage
:
(
UIImage
*
)
image
withStartpoint
:
(
CGPoint
)
point
withSize
:
(
CGSize
)
size
-
(
void
)
StartAddShoppingCarAnimationWithimage
:
(
UIImage
*
)
image
withStartpoint
:
(
CGPoint
)
point
withSize
:
(
CGSize
)
size
...
@@ -419,7 +483,6 @@
...
@@ -419,7 +483,6 @@
}
WithFailureBlock
:^
(
id
error
)
{
}
WithFailureBlock
:^
(
id
error
)
{
[
self
ErrorMBProgressView
:
@"添加购物车失败"
];
[
self
ErrorMBProgressView
:
@"添加购物车失败"
];
}];
}];
}
}
...
...
Lighting/Class/ProductLibraryViewController.m
View file @
b7e1281d
...
@@ -69,11 +69,6 @@
...
@@ -69,11 +69,6 @@
@property
(
nonatomic
,
assign
)
int
totalPages
;
@property
(
nonatomic
,
assign
)
int
totalPages
;
@end
@end
@implementation
ProductLibraryViewController
@implementation
ProductLibraryViewController
...
@@ -121,15 +116,11 @@
...
@@ -121,15 +116,11 @@
[
self
uiConfigAction
];
[
self
uiConfigAction
];
[
self
GetdatasAction
];
[
self
GetdatasAction
];
}
}
#pragma mark -获取商品列表数据
#pragma mark -获取商品列表数据
-
(
void
)
getGoodsListDatasisRemove
:
(
BOOL
)
remove
Withobject
:
(
GoodsCondition
*
)
conditon
-
(
void
)
getGoodsListDatasisRemove
:
(
BOOL
)
remove
Withobject
:
(
GoodsCondition
*
)
conditon
{
{
__weak
typeof
(
self
)
weakSelf
=
self
;
__weak
typeof
(
self
)
weakSelf
=
self
;
[
self
getGoodsListdatas
:
conditon
returnResponse
:
^
(
GoodsResponse
*
response
)
{
[
self
getGoodsListdatas
:
conditon
returnResponse
:
^
(
GoodsResponse
*
response
)
{
...
@@ -155,8 +146,6 @@
...
@@ -155,8 +146,6 @@
[
self
.
screeningDatas
removeAllObjects
];
[
self
.
screeningDatas
removeAllObjects
];
}
}
GoodsFilter
*
goodsStyle
=
[[
GoodsFilter
alloc
]
initWithDictionary
:
returnValue
[
@"data"
]
error
:
nil
];
GoodsFilter
*
goodsStyle
=
[[
GoodsFilter
alloc
]
initWithDictionary
:
returnValue
[
@"data"
]
error
:
nil
];
[
self
.
screeningDatas
addObject
:
goodsStyle
.
styles
];
[
self
.
screeningDatas
addObject
:
goodsStyle
.
styles
];
[
self
.
screeningDatas
addObject
:
goodsStyle
.
categories
];
[
self
.
screeningDatas
addObject
:
goodsStyle
.
categories
];
[
self
.
screeningDatas
addObject
:
goodsStyle
.
space
];
[
self
.
screeningDatas
addObject
:
goodsStyle
.
space
];
...
@@ -181,7 +170,6 @@
...
@@ -181,7 +170,6 @@
#pragma mark -获取商品列表数据
#pragma mark -获取商品列表数据
-
(
void
)
getGoodsListdatas
:
(
GoodsCondition
*
)
conditon
returnResponse
:
(
void
(
^
)(
GoodsResponse
*
))
finish
-
(
void
)
getGoodsListdatas
:
(
GoodsCondition
*
)
conditon
returnResponse
:
(
void
(
^
)(
GoodsResponse
*
))
finish
{
{
[
self
CreateMBProgressHUDLoding
];
[
self
CreateMBProgressHUDLoding
];
[[
NetworkRequestClassManager
Manager
]
NetworkRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/goods/query"
]
WithRequestType
:
0
WithParameter
:
conditon
WithReturnValueBlock
:^
(
id
returnValue
)
{
[[
NetworkRequestClassManager
Manager
]
NetworkRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/goods/query"
]
WithRequestType
:
0
WithParameter
:
conditon
WithReturnValueBlock
:^
(
id
returnValue
)
{
...
@@ -281,12 +269,10 @@
...
@@ -281,12 +269,10 @@
weakSelf
.
condtionModel
.
endprice
=
[
NSNumber
numberWithInteger
:[[
spacrArray
objectAtIndex_opple
:
1
]
integerValue
]];
weakSelf
.
condtionModel
.
endprice
=
[
NSNumber
numberWithInteger
:[[
spacrArray
objectAtIndex_opple
:
1
]
integerValue
]];
}
}
break
;
break
;
default:
default:
weakSelf
.
condtionModel
.
nameLike
=
weakSelf
.
selectedCode
;
weakSelf
.
condtionModel
.
nameLike
=
weakSelf
.
selectedCode
;
break
;
break
;
}
}
}
}
[
weakSelf
.
productCollectionView
.
mj_footer
resetNoMoreData
];
[
weakSelf
.
productCollectionView
.
mj_footer
resetNoMoreData
];
[
weakSelf
getScreeningdatasisRemoveArray
:
YES
];
[
weakSelf
getScreeningdatasisRemoveArray
:
YES
];
...
@@ -319,7 +305,39 @@
...
@@ -319,7 +305,39 @@
weakSelf
.
condtionModel
.
page
=
Newpage
;
weakSelf
.
condtionModel
.
page
=
Newpage
;
//搜索
//搜索
if
(
_selectedCode
)
{
if
(
_selectedCode
)
{
weakSelf
.
condtionModel
.
categoryEquals
=
_selectedCode
;
switch
(
weakSelf
.
selectedIndex
)
{
case
0
:
//风格
{
weakSelf
.
condtionModel
.
styleEquals
=
weakSelf
.
selectedCode
;
}
break
;
case
1
:
//类型
{
weakSelf
.
condtionModel
.
categoryEquals
=
weakSelf
.
selectedCode
;
}
break
;
case
2
:
//空间
{
weakSelf
.
condtionModel
.
spaceEquals
=
weakSelf
.
selectedCode
;
}
break
;
case
3
:
//材质
{
weakSelf
.
condtionModel
.
materialEqueals
=
weakSelf
.
selectedCode
;
}
break
;
case
4
:
//价格
{
//价格字符串切割
NSArray
*
spacrArray
=
[
weakSelf
.
selectedCode
componentsSeparatedByString
:
@"到"
];
weakSelf
.
condtionModel
.
startprice
=
[
NSNumber
numberWithInteger
:[[
spacrArray
objectAtIndex_opple
:
0
]
integerValue
]];
weakSelf
.
condtionModel
.
endprice
=
[
NSNumber
numberWithInteger
:[[
spacrArray
objectAtIndex_opple
:
1
]
integerValue
]];
}
break
;
default:
weakSelf
.
condtionModel
.
nameLike
=
weakSelf
.
selectedCode
;
break
;
}
}
}
[
weakSelf
getGoodsListDatasisRemove
:
NO
Withobject
:
self
.
condtionModel
];
[
weakSelf
getGoodsListDatasisRemove
:
NO
Withobject
:
self
.
condtionModel
];
}
}
...
@@ -367,7 +385,6 @@
...
@@ -367,7 +385,6 @@
}
}
#pragma mark -筛选按钮
#pragma mark -筛选按钮
-
(
void
)
CreatescreeningButton
-
(
void
)
CreatescreeningButton
{
{
...
@@ -401,13 +418,8 @@
...
@@ -401,13 +418,8 @@
{
{
ProductCollectionViewCell
*
cell
=
[
collectionView
dequeueReusableCellWithReuseIdentifier
:
@"productcell"
forIndexPath
:
indexPath
];
ProductCollectionViewCell
*
cell
=
[
collectionView
dequeueReusableCellWithReuseIdentifier
:
@"productcell"
forIndexPath
:
indexPath
];
TOGoodsEntity
*
model
=
[
self
.
datasArray
objectAtIndex_opple
:
indexPath
.
item
];
TOGoodsEntity
*
model
=
[
self
.
datasArray
objectAtIndex_opple
:
indexPath
.
item
];
NSArray
*
imageArray
=
[
model
.
pictures
componentsSeparatedByString
:
@","
];
cell
.
model
=
model
;
[
cell
.
productImageView
sd_setImageWithURL
:[
NSURL
URLWithString
:[
imageArray
firstObject
]]
placeholderImage
:
REPLACEIMAGE
];
cell
.
cellindex
=
indexPath
.
row
;
cell
.
productPrice
.
text
=
[
NSString
stringWithFormat
:
@"¥%@"
,
model
.
tagPrice
];
cell
.
cellindex
=
indexPath
.
item
;
cell
.
productParameter
.
text
=
model
.
name
;
cell
.
specifications
.
text
=
[
NSString
stringWithFormat
:
@"%@(%@)"
,
model
.
code
,
model
.
size
];
//加入购物车
//加入购物车
__weak
typeof
(
self
)
weakSelf
=
self
;
__weak
typeof
(
self
)
weakSelf
=
self
;
...
@@ -416,7 +428,6 @@
...
@@ -416,7 +428,6 @@
//判断是否有当前客户
//判断是否有当前客户
if
(
!
[
Shoppersmanager
manager
].
currentCustomer
)
{
if
(
!
[
Shoppersmanager
manager
].
currentCustomer
)
{
[
self
ErrorMBProgressView
:
@"必须设置当前客户"
];
[
self
ErrorMBProgressView
:
@"必须设置当前客户"
];
return
;
return
;
}
}
...
@@ -433,11 +444,11 @@
...
@@ -433,11 +444,11 @@
#pragma mark -开发加入购物车动画
#pragma mark -开发加入购物车动画
-
(
void
)
StartAddShoppingCarAnimationWithimage
:
(
UIImage
*
)
image
withStartpoint
:
(
CGPoint
)
point
withSize
:
(
CGSize
)
size
-
(
void
)
StartAddShoppingCarAnimationWithimage
:
(
UIImage
*
)
image
withStartpoint
:
(
CGPoint
)
point
withSize
:
(
CGSize
)
size
{
{
//
//
起点
//起点
CGPoint
startPoint
=
point
;
CGPoint
startPoint
=
point
;
//
//
终点
//终点
CGPoint
endPoint
=
SHARED_APPDELEGATE
.
shoppingCarPoint
;
CGPoint
endPoint
=
SHARED_APPDELEGATE
.
shoppingCarPoint
;
//
//
控点
//控点
CGPoint
controlPoint
=
CGPointMake
(
endPoint
.
x
,
startPoint
.
x
);
CGPoint
controlPoint
=
CGPointMake
(
endPoint
.
x
,
startPoint
.
x
);
...
@@ -456,7 +467,6 @@
...
@@ -456,7 +467,6 @@
//关键帧
//关键帧
CAKeyframeAnimation
*
moveAnim
=
[
CAKeyframeAnimation
animationWithKeyPath
:
@"position"
];
CAKeyframeAnimation
*
moveAnim
=
[
CAKeyframeAnimation
animationWithKeyPath
:
@"position"
];
moveAnim
.
path
=
movePath
.
CGPath
;
moveAnim
.
path
=
movePath
.
CGPath
;
moveAnim
.
removedOnCompletion
=
YES
;
moveAnim
.
removedOnCompletion
=
YES
;
...
@@ -521,11 +531,6 @@
...
@@ -521,11 +531,6 @@
#pragma mark -筛选
#pragma mark -筛选
-
(
void
)
ScreeningButtonClick
-
(
void
)
ScreeningButtonClick
{
{
// ExperienceCentreViewController *ExperienceCenter = [[self getStoryboardWithName] instantiateViewControllerWithIdentifier:@"ExperienceCentre"];
// ExperienceCenter.modalPresentationStyle = UIModalPresentationOverFullScreen;
// UIPopoverPresentationController *popover = ExperienceCenter.popoverPresentationController;
// popover.sourceView = ExperienceCenter.view;
// [self presentViewController:ExperienceCenter animated:YES completion:nil];
self
.
screenView
=
[[[
NSBundle
mainBundle
]
loadNibNamed
:
@"ScreeningView"
owner
:
self
options
:
nil
]
firstObject
];
self
.
screenView
=
[[[
NSBundle
mainBundle
]
loadNibNamed
:
@"ScreeningView"
owner
:
self
options
:
nil
]
firstObject
];
self
.
screenView
.
frame
=
CGRectMake
(
0
,
0
,
ScreenWidth
,
ScreenHeight
);
self
.
screenView
.
frame
=
CGRectMake
(
0
,
0
,
ScreenWidth
,
ScreenHeight
);
...
@@ -559,14 +564,12 @@
...
@@ -559,14 +564,12 @@
switch
(
sender
.
selectedSegmentIndex
)
{
switch
(
sender
.
selectedSegmentIndex
)
{
case
0
:
//分类
case
0
:
//分类
{
{
// self.selectedIndex = 0;
[
self
.
screenSecondView
removeFromSuperview
];
[
self
.
screenSecondView
removeFromSuperview
];
[
self
CreateClassificationView
];
[
self
CreateClassificationView
];
}
}
break
;
break
;
case
1
:
//筛选
case
1
:
//筛选
{
{
// self.selectedIndex = 0;
[
self
.
screenFirstView
removeFromSuperview
];
[
self
.
screenFirstView
removeFromSuperview
];
[
self
CreateScreenSubView
];
[
self
CreateScreenSubView
];
}
}
...
@@ -601,7 +604,6 @@
...
@@ -601,7 +604,6 @@
}
}
#pragma mark -ScreeningButtonClickdelegate代理
#pragma mark -ScreeningButtonClickdelegate代理
-
(
void
)
screeningButtonClick
:
(
NSInteger
)
buttontag
-
(
void
)
screeningButtonClick
:
(
NSInteger
)
buttontag
{
{
...
@@ -624,6 +626,7 @@
...
@@ -624,6 +626,7 @@
-
(
void
)
selectedItem
:
(
NSString
*
)
typecode
withTitle
:
(
NSString
*
)
title
-
(
void
)
selectedItem
:
(
NSString
*
)
typecode
withTitle
:
(
NSString
*
)
title
{
{
[
self
emptyModel
];
[
self
emptyModel
];
[
self
DismissScreenView
];
[
self
DismissScreenView
];
if
(
self
.
selectedIndex
==
4
)
{
if
(
self
.
selectedIndex
==
4
)
{
self
.
selectedCode
=
title
;
self
.
selectedCode
=
title
;
...
@@ -635,8 +638,6 @@
...
@@ -635,8 +638,6 @@
}
}
#pragma mark -筛选子模块的
#pragma mark -筛选子模块的
-
(
void
)
tableSelectedindex
:
(
NSInteger
)
index
-
(
void
)
tableSelectedindex
:
(
NSInteger
)
index
{
{
...
@@ -687,8 +688,6 @@
...
@@ -687,8 +688,6 @@
self
.
condtionModel
.
startprice
=
condition
.
startprice
;
self
.
condtionModel
.
startprice
=
condition
.
startprice
;
self
.
condtionModel
.
endprice
=
condition
.
endprice
;
self
.
condtionModel
.
endprice
=
condition
.
endprice
;
self
.
selectedCode
=
nil
;
//清空单选
self
.
selectedCode
=
nil
;
//清空单选
// [self.productCollectionView.mj_header beginRefreshing];
__weak
typeof
(
self
)
Weakself
=
self
;
__weak
typeof
(
self
)
Weakself
=
self
;
[
self
getGoodsListdatas
:
condition
returnResponse
:
^
(
GoodsResponse
*
response
)
{
[
self
getGoodsListdatas
:
condition
returnResponse
:
^
(
GoodsResponse
*
response
)
{
...
@@ -733,24 +732,15 @@
...
@@ -733,24 +732,15 @@
{
{
//取消子视图的的时间穿透,否则子视图的点击无效,会被传递到父视图响应
//取消子视图的的时间穿透,否则子视图的点击无效,会被传递到父视图响应
if
(
CGRectContainsPoint
(
self
.
screenView
.
backgroundView
.
frame
,
[
touch
locationInView
:
self
.
screenView
]))
{
if
(
CGRectContainsPoint
(
self
.
screenView
.
backgroundView
.
frame
,
[
touch
locationInView
:
self
.
screenView
]))
{
return
NO
;
return
NO
;
}
}
return
YES
;
return
YES
;
}
}
//#pragma mark -释放
//- (void)dealloc
//{
// [[NSNotificationCenter defaultCenter]removeObserver:self];
//}
#pragma mark -添加至购物车
#pragma mark -添加至购物车
-
(
void
)
addGoodsShoppingbags
:
(
TOGoodsEntity
*
)
model
complate
:
(
void
(
^
)())
response
-
(
void
)
addGoodsShoppingbags
:
(
TOGoodsEntity
*
)
model
complate
:
(
void
(
^
)())
response
{
{
SaveShoppingCartRequest
*
shopCar
=
[[
SaveShoppingCartRequest
alloc
]
init
];
SaveShoppingCartRequest
*
shopCar
=
[[
SaveShoppingCartRequest
alloc
]
init
];
shopCar
.
consumerId
=
[
Customermanager
manager
].
model
.
fid
;
shopCar
.
consumerId
=
[
Customermanager
manager
].
model
.
fid
;
shopCar
.
goodsId
=
model
.
fid
;
shopCar
.
goodsId
=
model
.
fid
;
...
@@ -807,6 +797,8 @@
...
@@ -807,6 +797,8 @@
-
(
void
)
didReceiveMemoryWarning
{
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
[
super
didReceiveMemoryWarning
];
[[
SDImageCache
sharedImageCache
]
clearDisk
];
NSLog
(
@"结算到内存警告"
);
// Dispose of any resources that can be recreated.
// Dispose of any resources that can be recreated.
}
}
...
...
Lighting/Class/Shoppingcart/AddressViewController.m
View file @
b7e1281d
...
@@ -146,6 +146,10 @@
...
@@ -146,6 +146,10 @@
-
(
IBAction
)
addAddressButtonClick
:
(
UIButton
*
)
sender
{
-
(
IBAction
)
addAddressButtonClick
:
(
UIButton
*
)
sender
{
NSString
*
phoneNumber
=
self
.
PhoneNumber
.
text
;
NSString
*
phoneNumber
=
self
.
PhoneNumber
.
text
;
if
(
phoneNumber
.
length
<=
0
)
{
[
self
ErrorMBProgressView
:
@"手机号码不能为空"
];
return
;
}
if
(
!
[
HENLENSONG
isValidateMobile
:
phoneNumber
])
{
if
(
!
[
HENLENSONG
isValidateMobile
:
phoneNumber
])
{
[
self
ErrorMBProgressView
:
@"手机号码格式不正确"
];
[
self
ErrorMBProgressView
:
@"手机号码格式不正确"
];
...
@@ -193,7 +197,13 @@
...
@@ -193,7 +197,13 @@
model
.
name
=
self
.
recipientPerson
.
text
;
model
.
name
=
self
.
recipientPerson
.
text
;
model
.
miblephone
=
self
.
PhoneNumber
.
text
;
model
.
miblephone
=
self
.
PhoneNumber
.
text
;
model
.
city
=
self
.
citySelected
.
currentTitle
;
model
.
city
=
self
.
citySelected
.
currentTitle
;
model
.
address
=
self
.
detailsAddress
.
text
;
//地址拼接
if
(
!
[
self
.
provincesString
isEqualToString
:[
self
.
citySelected
currentTitle
]])
{
model
.
address
=
[
NSString
stringWithFormat
:
@"%@%@%@"
,
self
.
provincesString
,
self
.
citySelected
.
currentTitle
,
self
.
detailsAddress
.
text
];
}
else
{
model
.
address
=
[
NSString
stringWithFormat
:
@"%@%@"
,
self
.
citySelected
.
currentTitle
,
self
.
detailsAddress
.
text
];
}
model
.
consumerId
=
[
Customermanager
manager
].
model
.
fid
;
model
.
consumerId
=
[
Customermanager
manager
].
model
.
fid
;
model
.
fid
=
returnValue
[
@"data"
];
model
.
fid
=
returnValue
[
@"data"
];
model
.
isSelected
=
NO
;
model
.
isSelected
=
NO
;
...
@@ -213,35 +223,9 @@
...
@@ -213,35 +223,9 @@
}
WithFailureBlock
:^
(
id
error
)
{
}
WithFailureBlock
:^
(
id
error
)
{
NSLog
(
@"%@"
,
error
);
[
self
RemoveMBProgressHUDLoding
];
[
self
RemoveMBProgressHUDLoding
];
}];
}];
}
}
//@synthesize fid;
//@synthesize createDate;
//@synthesize sysOrgCode;
//@synthesize name;
//@synthesize miblephone;
//@synthesize province;
//@synthesize city;
//@synthesize country;
//@synthesize address;
//@synthesize state;
//@synthesize consumerId;
//#pragma mark -修改地址数据源
//- (void)setModel:(AddressModel *)model
//{
// _model = model;
// self.recipientPerson.text = model.name;
// self.PhoneNumber.text = model.miblephone;
// [self.citySelected setTitle:model.city forState:UIControlStateNormal];
// self.detailsAddress.text = model.address;
//
//}
#pragma mark -更改地址
#pragma mark -更改地址
...
...
Lighting/Class/Tabbar/CustomTabbarController.m
View file @
b7e1281d
...
@@ -337,14 +337,13 @@
...
@@ -337,14 +337,13 @@
}
else
}
else
{
{
UIStoryboard
*
storyboard
=
[
UIStoryboard
storyboardWithName
:
@"StoryboardwithCYX"
bundle
:
nil
];
UIStoryboard
*
storyboard
=
[
UIStoryboard
storyboardWithName
:
@"StoryboardwithCYX"
bundle
:
nil
];
// ExperienceCentreViewController *ExperienceCenter = [storyboard instantiateViewControllerWithIdentifier:@"ExperienceCentre"];
ExperienceCentreViewController
*
ExperienceCenter
=
[
storyboard
instantiateViewControllerWithIdentifier
:
@"ExperienceCentre"
];
// ExperienceCenter.modalPresentationStyle = UIModalPresentationOverFullScreen;
ExperienceCenter
.
modalPresentationStyle
=
UIModalPresentationOverFullScreen
;
// UIPopoverPresentationController *popover = ExperienceCenter.popoverPresentationController;
UIPopoverPresentationController
*
popover
=
ExperienceCenter
.
popoverPresentationController
;
// popover.sourceView = ExperienceCenter.view;
popover
.
sourceView
=
ExperienceCenter
.
view
;
// [self presentViewController:ExperienceCenter animated:YES completion:nil];
[
self
presentViewController
:
ExperienceCenter
animated
:
YES
completion
:
nil
];
// FollowHeartViewController *followVC = [storyboard instantiateViewControllerWithIdentifier:[self.identifierArray objectAtIndex_opple:3]];
FollowHeartViewController
*
followVC
=
[
storyboard
instantiateViewControllerWithIdentifier
:[
self
.
identifierArray
objectAtIndex_opple
:
3
]];
// [self presentViewController:followVC animated:YES completion:nil];
[
self
presentViewController
:
followVC
animated
:
YES
completion
:
nil
];
}
}
}
}
...
...
Lighting/Class/UserViewController.m
View file @
b7e1281d
...
@@ -92,7 +92,7 @@
...
@@ -92,7 +92,7 @@
#pragma -mark -UIImagePickerControllerDelegate
#pragma -mark -UIImagePickerControllerDelegate
-
(
void
)
imagePickerController
:
(
UIImagePickerController
*
)
picker
didFinishPickingMediaWithInfo
:
(
NSDictionary
<
NSString
*
,
id
>
*
)
info
-
(
void
)
imagePickerController
:
(
UIImagePickerController
*
)
picker
didFinishPickingMediaWithInfo
:
(
NSDictionary
<
NSString
*
,
id
>
*
)
info
{
{
//
[DeviceDirectionManager instance].isHorizontal=NO;
[
DeviceDirectionManager
instance
].
isHorizontal
=
NO
;
[
self
dismissViewControllerAnimated
:
YES
completion
:
nil
];
[
self
dismissViewControllerAnimated
:
YES
completion
:
nil
];
UIImage
*
Headimage
=
[
info
objectForKey
:
UIImagePickerControllerOriginalImage
];
UIImage
*
Headimage
=
[
info
objectForKey
:
UIImagePickerControllerOriginalImage
];
__weak
typeof
(
self
)
weskSelf
=
self
;
__weak
typeof
(
self
)
weskSelf
=
self
;
...
@@ -117,12 +117,11 @@
...
@@ -117,12 +117,11 @@
{
{
[
self
ErrorMBProgressView
:
returnValue
[
@"message"
]];
[
self
ErrorMBProgressView
:
returnValue
[
@"message"
]];
}
}
}
WithprogressBlock
:^
(
double
progress
)
{
}
WithprogressBlock
:^
(
double
progress
)
{
if
(
progress
>=
1
)
{
if
(
progress
>=
1
)
{
self
.
TCHud
.
labelText
=
@"上传完成"
;
dispatch_async
(
dispatch_get_main_queue
(),
^
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
self
.
TCHud
.
labelText
=
@"上传完成"
;
[
self
RemoveMBProgressHUDLoding
];
[
self
RemoveMBProgressHUDLoding
];
});
});
}
else
}
else
...
@@ -132,13 +131,13 @@
...
@@ -132,13 +131,13 @@
});
});
}
}
}
WithErrorCodeBlock
:^
(
id
errorCodeValue
)
{
}
WithErrorCodeBlock
:^
(
id
errorCodeValue
)
{
self
.
TCHud
.
labelText
=
@"上传失败"
;
dispatch_async
(
dispatch_get_main_queue
(),
^
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
self
.
TCHud
.
labelText
=
@"上传失败"
;
[
self
RemoveMBProgressHUDLoding
];
[
self
RemoveMBProgressHUDLoding
];
});
});
}
WithFailureBlock
:^
(
NSError
*
error
)
{
}
WithFailureBlock
:^
(
NSError
*
error
)
{
self
.
TCHud
.
labelText
=
@"上传失败"
;
dispatch_async
(
dispatch_get_main_queue
(),
^
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
self
.
TCHud
.
labelText
=
@"上传失败"
;
[
self
RemoveMBProgressHUDLoding
];
[
self
RemoveMBProgressHUDLoding
];
});
});
}];
}];
...
...
Lighting/Class/goodsDetailsTableViewCell.xib
View file @
b7e1281d
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1011
6"
systemVersion=
"15E65
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"1011
7"
systemVersion=
"15F34
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
>
<dependencies>
<dependencies>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"10085"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"10085"
/>
</dependencies>
</dependencies>
...
...
Lighting/Lighting/AppDelegate.m
View file @
b7e1281d
...
@@ -9,6 +9,8 @@
...
@@ -9,6 +9,8 @@
#import "AppDelegate.h"
#import "AppDelegate.h"
#import "LoginViewController.h"
#import "LoginViewController.h"
#import "DeviceDirectionManager.h"
#import "DeviceDirectionManager.h"
#import <Bugly/Bugly.h>
@interface
AppDelegate
()
@interface
AppDelegate
()
@end
@end
...
@@ -18,7 +20,9 @@
...
@@ -18,7 +20,9 @@
-
(
BOOL
)
application
:(
UIApplication
*
)
application
didFinishLaunchingWithOptions
:(
NSDictionary
*
)
launchOptions
{
-
(
BOOL
)
application
:(
UIApplication
*
)
application
didFinishLaunchingWithOptions
:(
NSDictionary
*
)
launchOptions
{
// Override point for customization after application launch.
// Override point for customization after application launch.
//bug检测
[
Bugly
startWithAppId
:
@"900033734"
];
// [self performSelector:@selector(KclickAction) withObject:self afterDelay:3];
[
self
SetIQKeyboardManager
];
[
self
SetIQKeyboardManager
];
[
self
RootViewcontroller
];
[
self
RootViewcontroller
];
[
self
detectionNetwork
];
[
self
detectionNetwork
];
...
@@ -59,6 +63,7 @@
...
@@ -59,6 +63,7 @@
-
(
void
)
applicationDidReceiveMemoryWarning
:
(
UIApplication
*
)
application
-
(
void
)
applicationDidReceiveMemoryWarning
:
(
UIApplication
*
)
application
{
{
[[
SDImageCache
sharedImageCache
]
clearDisk
];
[[
SDImageCache
sharedImageCache
]
clearDisk
];
[[
SDImageCache
sharedImageCache
]
setValue
:
nil
forKey
:
@"memCache"
];
}
}
...
...
Lighting/Podfile.lock
View file @
b7e1281d
...
@@ -14,6 +14,7 @@ PODS:
...
@@ -14,6 +14,7 @@ PODS:
- AFNetworking/Serialization (3.1.0)
- AFNetworking/Serialization (3.1.0)
- AFNetworking/UIKit (3.1.0):
- AFNetworking/UIKit (3.1.0):
- AFNetworking/NSURLSession
- AFNetworking/NSURLSession
- Bugly (2.2.3)
- DZNEmptyDataSet (1.8.1)
- DZNEmptyDataSet (1.8.1)
- IQKeyboardManager (4.0.3)
- IQKeyboardManager (4.0.3)
- JSONModel (1.2.0)
- JSONModel (1.2.0)
...
@@ -41,6 +42,7 @@ PODS:
...
@@ -41,6 +42,7 @@ PODS:
DEPENDENCIES:
DEPENDENCIES:
- AFNetworking (~> 3.1.0)
- AFNetworking (~> 3.1.0)
- Bugly (~> 2.2.3)
- DZNEmptyDataSet (~> 1.8.1)
- DZNEmptyDataSet (~> 1.8.1)
- IQKeyboardManager (~> 4.0.0)
- IQKeyboardManager (~> 4.0.0)
- JSONModel (~> 1.2.0)
- JSONModel (~> 1.2.0)
...
@@ -55,6 +57,7 @@ DEPENDENCIES:
...
@@ -55,6 +57,7 @@ DEPENDENCIES:
SPEC CHECKSUMS:
SPEC CHECKSUMS:
AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67
AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67
Bugly: db578ea92b2a6b132cc19f79adf3bcd3b0fe6769
DZNEmptyDataSet: 9525833b9e68ac21c30253e1d3d7076cc828eaa7
DZNEmptyDataSet: 9525833b9e68ac21c30253e1d3d7076cc828eaa7
IQKeyboardManager: be9695ffc5a52077deb4847608f338771022d6d1
IQKeyboardManager: be9695ffc5a52077deb4847608f338771022d6d1
JSONModel: 12523685c4b623553ccf844bbbf7007624317b2c
JSONModel: 12523685c4b623553ccf844bbbf7007624317b2c
...
...
Lighting/Tools/ExperienceCentreViewController.m
View file @
b7e1281d
...
@@ -142,7 +142,7 @@
...
@@ -142,7 +142,7 @@
cell
.
selectedGoodsImageView
.
layer
.
borderWidth
=
0
;
cell
.
selectedGoodsImageView
.
layer
.
borderWidth
=
0
;
}
}
NSArray
*
imags
=
[
model
.
pictures
componentsSeparatedByString
:
@","
];
NSArray
*
imags
=
[
model
.
pictures
componentsSeparatedByString
:
@","
];
[
cell
.
selectedGoodsImageView
sd_setImageWithURL
:[
NSURL
URLWithString
:[
imags
firstObject
]]
placeholderImage
:
REPLACEIMAGE
];
[
cell
.
selectedGoodsImageView
sd_setImageWithURL
:[
NSURL
URLWithString
:[
imags
firstObject
]]];
return
cell
;
return
cell
;
}
}
...
...
Lighting/Tools/PrefixHeader.pch
View file @
b7e1281d
...
@@ -36,42 +36,33 @@
...
@@ -36,42 +36,33 @@
/**
/**
*
AppDelegate代理
*
禁止所有的打印,提交AppStore时使用
*/
*/
#define SHARED_APPDELEGATE ((AppDelegate *)([UIApplication sharedApplication].delegate))
//#ifdef DEBUG
//#define NSLog(...) NSLog(__VA_ARGS__)
//#define debugMethod() NSLog(@"%s", __func__)
//#else
//#define NSLog(...)
//#define debugMethod()
//#endif
/**
/**
*
屏幕的物理高度
*
AppDelegate代理
*/
*/
#define S
creenHeight [UIScreen mainScreen].bounds.size.height
#define S
HARED_APPDELEGATE ((AppDelegate *)([UIApplication sharedApplication].delegate))
/**
/**
* 导航栏高度
* 导航栏高度
*/
*/
#define NavigationHeight 64
#define NavigationHeight 64
/**
* 屏幕的物理宽度
*/
#define ScreenWidth [UIScreen mainScreen].bounds.size.width
/**
* 定义UIImage对象
*/
#define TCImage(imageName) [UIImage imageNamed:[NSString stringWithFormat:@"%@",imageName]]
/**
/**
* 默认显示头像
* 默认显示头像
*/
*/
#define ReplaceImage [UIImage imageNamed:@"矢量智能对象"]
#define ReplaceImage [UIImage imageNamed:@"矢量智能对象"]
/**
* AppDelegate代理
*/
#define SHARED_APPDELEGATE ((AppDelegate *)([UIApplication sharedApplication].delegate))
/**
/**
* 屏幕的物理高度
* 屏幕的物理高度
...
@@ -134,14 +125,14 @@
...
@@ -134,14 +125,14 @@
/**
/**
* 服务器
开发
地址
* 服务器
测试
地址
*/
*/
#define ServerAddress @"http://dg-dev.opple.com/opple-web/app"
//
#define ServerAddress @"http://dg-dev.opple.com/opple-web/app"
/**
/**
* 服务器
测试
地址
* 服务器
开发
地址
*/
*/
//
#define ServerAddress @"http://139.196.195.30:8090/opple-web/app"
#define ServerAddress @"http://139.196.195.30:8090/opple-web/app"
/**
/**
...
@@ -187,7 +178,7 @@
...
@@ -187,7 +178,7 @@
/**
/**
* 网络请求返回个数
* 网络请求返回个数
*/
*/
#define KROWS 1
0
#define KROWS 1
2
#define RGB(A, B, C, D) [UIColor colorWithRed:(A)/255.0 green:(B)/255.0 blue:(C)/255.0 alpha:(D)]
#define RGB(A, B, C, D) [UIColor colorWithRed:(A)/255.0 green:(B)/255.0 blue:(C)/255.0 alpha:(D)]
...
...
Lighting/Tools/SceneViewController.m
View file @
b7e1281d
...
@@ -236,7 +236,6 @@
...
@@ -236,7 +236,6 @@
//场景筛选条件
//场景筛选条件
[[
NetworkRequestClassManager
Manager
]
NetworkRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/scene/getSceneFilter"
]
WithRequestType
:
1
WithParameter
:
nil
WithReturnValueBlock
:^
(
id
returnValue
)
{
[[
NetworkRequestClassManager
Manager
]
NetworkRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/scene/getSceneFilter"
]
WithRequestType
:
1
WithParameter
:
nil
WithReturnValueBlock
:^
(
id
returnValue
)
{
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
SceneFilter
*
filterModel
=
[[
SceneFilter
alloc
]
initWithDictionary
:
returnValue
[
@"data"
]
error
:
nil
];
SceneFilter
*
filterModel
=
[[
SceneFilter
alloc
]
initWithDictionary
:
returnValue
[
@"data"
]
error
:
nil
];
...
@@ -414,12 +413,10 @@
...
@@ -414,12 +413,10 @@
[
weakSelf
.
productScreeningDatasArray
removeAllObjects
];
[
weakSelf
.
productScreeningDatasArray
removeAllObjects
];
}
}
GoodsFilter
*
goodsScreening
=
[[
GoodsFilter
alloc
]
initWithDictionary
:
returnValue
[
@"data"
]
error
:
nil
];
GoodsFilter
*
goodsScreening
=
[[
GoodsFilter
alloc
]
initWithDictionary
:
returnValue
[
@"data"
]
error
:
nil
];
for
(
int
i
=
0
;
i
<
5
;
i
++
)
{
for
(
int
i
=
0
;
i
<
5
;
i
++
)
{
NSMutableArray
*
array
=
[
NSMutableArray
array
];
NSMutableArray
*
array
=
[
NSMutableArray
array
];
[
weakSelf
.
productScreeningDatasArray
addObject
:
array
];
[
weakSelf
.
productScreeningDatasArray
addObject
:
array
];
}
}
for
(
DataDict
*
model
in
goodsScreening
.
styles
)
{
for
(
DataDict
*
model
in
goodsScreening
.
styles
)
{
DataDictModel
*
newModel
=
[[
DataDictModel
alloc
]
init
];
DataDictModel
*
newModel
=
[[
DataDictModel
alloc
]
init
];
newModel
.
typename
=
model
.
typename
;
newModel
.
typename
=
model
.
typename
;
...
@@ -476,7 +473,6 @@
...
@@ -476,7 +473,6 @@
#pragma mark -获取商品列表数据
#pragma mark -获取商品列表数据
-
(
void
)
getGoodsListDatasisRemove
:
(
BOOL
)
remove
Withobject
:
(
GoodsCondition
*
)
conditon
-
(
void
)
getGoodsListDatasisRemove
:
(
BOOL
)
remove
Withobject
:
(
GoodsCondition
*
)
conditon
{
{
__weak
typeof
(
self
)
weakSelf
=
self
;
__weak
typeof
(
self
)
weakSelf
=
self
;
[
self
getGoodsListdatas
:
conditon
returnResponse
:
^
(
GoodsResponse
*
response
)
{
[
self
getGoodsListdatas
:
conditon
returnResponse
:
^
(
GoodsResponse
*
response
)
{
...
@@ -547,7 +543,6 @@
...
@@ -547,7 +543,6 @@
__weak
typeof
(
self
)
weakSelf
=
self
;
__weak
typeof
(
self
)
weakSelf
=
self
;
[[
NetworkRequestClassManager
Manager
]
NetworkRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/goods/query"
]
WithRequestType
:
0
WithParameter
:
conditon
WithReturnValueBlock
:^
(
id
returnValue
)
{
[[
NetworkRequestClassManager
Manager
]
NetworkRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/goods/query"
]
WithRequestType
:
0
WithParameter
:
conditon
WithReturnValueBlock
:^
(
id
returnValue
)
{
[
weakSelf
endRefreshingForTableView
:
weakSelf
.
sceneOrProductClollectionView
];
[
weakSelf
endRefreshingForTableView
:
weakSelf
.
sceneOrProductClollectionView
];
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
if
([
returnValue
[
@"code"
]
isEqualToNumber
:
@0
])
{
...
@@ -603,7 +598,8 @@
...
@@ -603,7 +598,8 @@
ScreeningTableViewCell
*
cell
=
[
tableView
cellForRowAtIndexPath
:
indexPath
];
ScreeningTableViewCell
*
cell
=
[
tableView
cellForRowAtIndexPath
:
indexPath
];
cell
.
screeningLabe
.
backgroundColor
=
kTCColor
(
221
,
221
,
221
);
cell
.
screeningLabe
.
backgroundColor
=
kTCColor
(
221
,
221
,
221
);
cell
.
screeningLabe
.
textColor
=
kMainBlueColor
;
cell
.
screeningLabe
.
textColor
=
kMainBlueColor
;
self
.
goodsModel
.
categoryEquals
=
[[[
self
.
productScreeningDatasArray
objectAtIndex_opple
:
self
.
rightSelectedIndex
]
objectAtIndex_opple
:
indexPath
.
row
]
fid
];
GoodsCategoryModel
*
model
=
[[
self
.
productScreeningDatasArray
objectAtIndex_opple
:
self
.
rightSelectedIndex
]
objectAtIndex_opple
:
indexPath
.
section
];
self
.
goodsModel
.
categoryEquals
=
[[
model
.
children
objectAtIndex_opple
:
indexPath
.
row
]
fid
];
[
self
.
sceneOrProductClollectionView
.
mj_header
beginRefreshing
];
[
self
.
sceneOrProductClollectionView
.
mj_header
beginRefreshing
];
}
}
...
@@ -644,7 +640,6 @@
...
@@ -644,7 +640,6 @@
#pragma mark -区头选中
#pragma mark -区头选中
-
(
void
)
SectionButtonClickAction
:
(
UIButton
*
)
button
-
(
void
)
SectionButtonClickAction
:
(
UIButton
*
)
button
{
{
[
self
CancelTableviewSectionState
];
[
self
CancelTableviewSectionState
];
if
(
self
.
rightSelectedIndex
!=
2
)
{
if
(
self
.
rightSelectedIndex
!=
2
)
{
button
.
selected
=
YES
;
button
.
selected
=
YES
;
...
@@ -982,15 +977,13 @@
...
@@ -982,15 +977,13 @@
#pragma mark -搜索框
#pragma mark -搜索框
-
(
BOOL
)
textFieldShouldReturn
:
(
UITextField
*
)
textField
-
(
BOOL
)
textFieldShouldReturn
:
(
UITextField
*
)
textField
{
{
[
textField
resignFirstResponder
];
[
self
emptyModel
];
[
self
emptyModel
];
[
textField
resignFirstResponder
];
self
.
goodsModel
.
nameLike
=
textField
.
text
;
self
.
goodsModel
.
nameLike
=
textField
.
text
;
[
self
.
sceneOrProductClollectionView
.
mj_header
beginRefreshing
];
[
self
.
sceneOrProductClollectionView
.
mj_header
beginRefreshing
];
return
YES
;
return
YES
;
}
}
#pragma mark -返回手势
#pragma mark -返回手势
-
(
void
)
ReturnDismiss
-
(
void
)
ReturnDismiss
{
{
...
@@ -1012,7 +1005,6 @@
...
@@ -1012,7 +1005,6 @@
#pragma mark -清空模型
#pragma mark -清空模型
-
(
void
)
emptyModel
-
(
void
)
emptyModel
{
{
self
.
searchProductField
.
text
=
nil
;
self
.
goodsModel
.
nameLike
=
nil
;
self
.
goodsModel
.
nameLike
=
nil
;
self
.
goodsModel
.
styleEquals
=
nil
;
self
.
goodsModel
.
styleEquals
=
nil
;
self
.
goodsModel
.
spaceEquals
=
nil
;
self
.
goodsModel
.
spaceEquals
=
nil
;
...
@@ -1023,13 +1015,11 @@
...
@@ -1023,13 +1015,11 @@
}
}
-
(
void
)
dealloc
{
}
-
(
void
)
didReceiveMemoryWarning
{
-
(
void
)
didReceiveMemoryWarning
{
[
super
didReceiveMemoryWarning
];
[
super
didReceiveMemoryWarning
];
[[
SDImageCache
sharedImageCache
]
clearDisk
];
NSLog
(
@"结算到内存警告"
);
// Dispose of any resources that can be recreated.
// Dispose of any resources that can be recreated.
}
}
...
...
Lighting/Tools/ShareGoodsViewController.m
View file @
b7e1281d
...
@@ -29,7 +29,8 @@
...
@@ -29,7 +29,8 @@
[
self
dismissViewControllerAnimated
:
YES
completion
:
nil
];
[
self
dismissViewControllerAnimated
:
YES
completion
:
nil
];
NSData
*
imageData
=
UIImageJPEGRepresentation
(
self
.
shareImage
,
0
.
5
);
NSData
*
imageData
=
UIImageJPEGRepresentation
(
self
.
shareImage
,
0
.
5
);
NSDictionary
*
parameterDict
=
[
NSDictionary
dictionaryWithObjectsAndKeys
:[
self
.
goodsIds
substringToIndex
:
self
.
goodsIds
.
length
-
2
],
@"goodsIds"
,
@""
,
@"title"
,
@""
,
@"remark"
,
nil
];
NSString
*
goodsID
=
[
self
.
goodsIds
substringToIndex
:[
self
.
goodsIds
length
]
-
1
];
NSDictionary
*
parameterDict
=
[
NSDictionary
dictionaryWithObjectsAndKeys
:[
goodsID
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
)
{
[[
NetworkRequestClassManager
Manager
]
UploadImageWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
ServerAddress
,
@"/system/shareGoods"
]
WithRequestType
:
0
WithImageDatas
:
imageData
WithParameter
:
parameterDict
WithReturnValueBlock
:^
(
id
returnValue
)
{
...
...
Lighting/Tools/opple_objc_json_client.h
View file @
b7e1281d
...
@@ -2164,6 +2164,13 @@ extern NSString * const SORTDIRECTION_DESC;
...
@@ -2164,6 +2164,13 @@ extern NSString * const SORTDIRECTION_DESC;
*
*
*/
*/
@property
(
nonatomic
,
copy
)
NSString
*
username
;
@property
(
nonatomic
,
copy
)
NSString
*
username
;
/**
* 短信验证码,请先调用发送短信接口
* com.gomore.opple.rest.system.RsSystemService#sendSms(String)
*
*
*/
@property
(
nonatomic
,
copy
)
NSString
*
smsCode
;
/**
/**
* 新密码
* 新密码
*
*
...
@@ -2349,7 +2356,7 @@ extern NSString * const SORTDIRECTION_DESC;
...
@@ -2349,7 +2356,7 @@ extern NSString * const SORTDIRECTION_DESC;
*
*
*
*
*/
*/
@property
(
nonatomic
,
strong
)
NSData
*
signature
;
@property
(
nonatomic
,
copy
)
NSData
*
signature
;
/**
/**
* (no documentation provided)
* (no documentation provided)
*
*
...
...
Lighting/Tools/opple_objc_json_client.m
View file @
b7e1281d
...
@@ -726,6 +726,7 @@ NSString * const SORTDIRECTION_DESC = @"desc";
...
@@ -726,6 +726,7 @@ NSString * const SORTDIRECTION_DESC = @"desc";
@implementation
ResetPasswordRequest
@implementation
ResetPasswordRequest
@synthesize
username
;
@synthesize
username
;
@synthesize
smsCode
;
@synthesize
fnewPassword
;
@synthesize
fnewPassword
;
+
(
BOOL
)
propertyIsOptional
:(
NSString
*
)
propertyName
+
(
BOOL
)
propertyIsOptional
:(
NSString
*
)
propertyName
...
...
Lighting/podfile
View file @
b7e1281d
...
@@ -13,5 +13,6 @@ pod 'AFNetworking', '~> 3.1.0'
...
@@ -13,5 +13,6 @@ pod 'AFNetworking', '~> 3.1.0'
pod '
JSONModel
', '
~>
1.2
.
0
'
pod '
JSONModel
', '
~>
1.2
.
0
'
pod '
UMengSocial
', '
~>
5.0
'
pod '
UMengSocial
', '
~>
5.0
'
pod '
DZNEmptyDataSet
', '
~>
1.8
.
1
'
pod '
DZNEmptyDataSet
', '
~>
1.8
.
1
'
pod '
Bugly
', '
~>
2.2
.
3
'
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