Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
ios1x
Overview
Overview
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
cemarose
ios1x
Commits
21d4ff21
Commit
21d4ff21
authored
7 years ago
by
houweibin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
搜索moncler商品后,商品详情页显示获取商品数据失败的问题。
parent
53469421
master
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
0 deletions
+51
-0
KWMProductResult.h
iCemarose/Class/Api/Cemarose/KWMProductResult.h
+2
-0
KWMProductResult.m
iCemarose/Class/Api/Cemarose/KWMProductResult.m
+1
-0
KWMNewProductVC.h
iCemarose/Class/UI/NewProduct/KWMNewProductVC.h
+3
-0
KWMNewProductVC.m
iCemarose/Class/UI/NewProduct/KWMNewProductVC.m
+43
-0
KWMSearchFeedbackVC.m
iCemarose/Class/UI/Product/KWMSearchFeedbackVC.m
+2
-0
No files found.
iCemarose/Class/Api/Cemarose/KWMProductResult.h
View file @
21d4ff21
...
...
@@ -12,6 +12,8 @@
@property
(
nonatomic
)
id
<
Optional
>
product
;
@property
(
nonatomic
)
NSDictionary
<
Ignore
>
*
productDict
;
@property
(
nonatomic
)
NSArray
<
Optional
>
*
products
;
@end
This diff is collapsed.
Click to expand it.
iCemarose/Class/Api/Cemarose/KWMProductResult.m
View file @
21d4ff21
...
...
@@ -17,6 +17,7 @@
if
(
self
)
{
NSDictionary
*
dataDictionary
=
dict
[
@"product"
];
if
(
dataDictionary
){
self
.
productDict
=
dataDictionary
;
self
.
product
=
[
self
buildData
:
modelClass
jsonDictionary
:
dataDictionary
];
}
...
...
This diff is collapsed.
Click to expand it.
iCemarose/Class/UI/NewProduct/KWMNewProductVC.h
View file @
21d4ff21
...
...
@@ -22,4 +22,7 @@
@property
(
nonatomic
)
NSNumber
*
productId
;
//当传入的vendor为moncler时,会进行处理
@property
(
nonatomic
)
NSString
*
vendor
;
@end
This diff is collapsed.
Click to expand it.
iCemarose/Class/UI/NewProduct/KWMNewProductVC.m
View file @
21d4ff21
...
...
@@ -115,8 +115,14 @@
[
self
requestBrandProducts
:
1
];
[
self
requestCategoryProducts
:
1
];
}
else
{
NSString
*
productVendor
=
self
.
vendor
?
[
self
.
vendor
lowercaseString
]
:
@""
;
BOOL
isMoncler
=
[
productVendor
isEqualToString
:
@"moncler"
];
if
(
isMoncler
&&
self
.
productId
){
[
self
requestAdminProductDetail
];
}
else
{
[
self
requestProductDetail
];
}
}
[
self
requestColorMetafield
];
[
self
requestAdminProduct
];
// [self initShopCartCount];
...
...
@@ -536,6 +542,43 @@
}
}
-
(
void
)
requestAdminProductDetail
{
NSNumber
*
productId
=
self
.
product
?
self
.
product
.
identifier
:
self
.
productId
;
if
(
!
productId
){
return
;
}
[
self
showLoading
];
__weak
KWMNewProductVC
*
weakSelf
=
self
;
void
(
^
failure
)(
NSURLSessionDataTask
*
,
NSError
*
)
=
^
(
NSURLSessionDataTask
*
task
,
NSError
*
error
){
[
weakSelf
hideLoading
];
[
weakSelf
showError
:
error
];
};
void
(
^
success
)(
NSURLSessionDataTask
*
,
KWMProductResult
*
)
=
^
(
NSURLSessionDataTask
*
task
,
KWMProductResult
*
result
){
[
weakSelf
hideLoading
];
BUYProduct
*
product
=
nil
;
if
(
result
&&
result
.
productDict
){
@try
{
BUYModelManager
*
modelManager
=
[[
BUYModelManager
alloc
]
init
];
product
=
(
BUYProduct
*
)[
modelManager
buy_objectWithEntityName
:[
BUYProduct
entityName
]
JSONDictionary
:
result
.
productDict
];
}
@catch
(
NSException
*
exception
){
NSLog
(
@"exception Name: %@"
,
exception
.
name
);
NSLog
(
@"exception Reason: %@"
,
exception
.
reason
);
}
}
if
(
product
){
weakSelf
.
product
=
product
;
weakSelf
.
productId
=
product
.
identifier
;
[
weakSelf
initBottomViewHidden
];
weakSelf
.
midDetailView
.
product
=
product
;
[
weakSelf
.
detailView1
setData
:
product
];
[
weakSelf
requestBrandProducts
:
1
];
[
weakSelf
requestCategoryProducts
:
1
];
}
};
[
self
.
api
getAdminProduct
:
nil
productId
:
productId
success
:
success
failure
:
failure
];
}
-
(
void
)
requestProductByColor
:
(
KWMColor
*
)
color
{
__weak
KWMNewProductVC
*
weakSelf
=
self
;
...
...
This diff is collapsed.
Click to expand it.
iCemarose/Class/UI/Product/KWMSearchFeedbackVC.m
View file @
21d4ff21
...
...
@@ -94,6 +94,7 @@ static NSString *idStr = @"KWMBrandCaramelCell";
-
(
void
)
kwm_onClickLeftIamge
:
(
KWMBrandCaramelCell
*
)
brandCell
{
KWMNewProductVC
*
productDetailVC
=
[
KWMNewProductVC
getNewInstance
];
productDetailVC
.
productId
=
brandCell
.
leftDataProduct
.
id
;
productDetailVC
.
vendor
=
brandCell
.
leftDataProduct
.
vendor
;
[
self
.
navigationController
pushViewController
:
productDetailVC
animated
:
YES
];
}
...
...
@@ -101,6 +102,7 @@ static NSString *idStr = @"KWMBrandCaramelCell";
-
(
void
)
kwm_onClickRightIamge
:
(
KWMBrandCaramelCell
*
)
brandCell
{
KWMNewProductVC
*
productDetailVC
=
[
KWMNewProductVC
getNewInstance
];
productDetailVC
.
productId
=
brandCell
.
rightDataProduct
.
id
;
productDetailVC
.
vendor
=
brandCell
.
rightDataProduct
.
vendor
;
[
self
.
navigationController
pushViewController
:
productDetailVC
animated
:
YES
];
}
...
...
This diff is collapsed.
Click to expand it.
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