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
7ba20fed
Commit
7ba20fed
authored
Jul 14, 2017
by
houweibin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
详情页404 toast问题
parent
2664fe89
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletions
+15
-1
KWMNewProductVC.m
iCemarose/Class/UI/NewProduct/KWMNewProductVC.m
+15
-1
No files found.
iCemarose/Class/UI/NewProduct/KWMNewProductVC.m
View file @
7ba20fed
...
...
@@ -271,6 +271,8 @@
}
self
.
product
=
product
;
self
.
productId
=
product
.
identifier
;
self
.
colorMeterfield
=
nil
;
self
.
adminProduct
=
nil
;
[
self
.
scrollView
setContentOffset
:
CGPointMake
(
0
,
0
)
animated
:
YES
];
[
self
initView
];
[
self
clearSelect
];
...
...
@@ -356,11 +358,17 @@
[
weakSelf
showError
:
error
];
}
else
if
(
product
){
weakSelf
.
product
=
product
;
weakSelf
.
productId
=
product
.
identifier
;
[
weakSelf
initMidViewHight
];
weakSelf
.
midDetailView
.
product
=
product
;
[
weakSelf
.
detailView1
setData
:
product
];
[
self
requestBrandProducts
:
1
];
[
self
requestCategoryProducts
:
1
];
if
(
self
.
handle
){
[
self
requestAdminProduct
];
[
self
requestColorMetafield
];
}
}
};
if
(
self
.
handle
)
{
...
...
@@ -429,6 +437,9 @@
#pragma mark -- API KWMApimanager
-
(
void
)
requestAdminProduct
{
NSNumber
*
productId
=
self
.
product
?
self
.
product
.
identifier
:
self
.
productId
;
if
(
!
productId
){
return
;
}
__weak
KWMNewProductVC
*
weakSelf
=
self
;
void
(
^
failure
)(
NSURLSessionDataTask
*
,
NSError
*
)
=
^
(
NSURLSessionDataTask
*
task
,
NSError
*
error
){
};
...
...
@@ -444,9 +455,12 @@
-
(
void
)
requestColorMetafield
{
NSNumber
*
productId
=
self
.
product
?
self
.
product
.
identifier
:
self
.
productId
;
if
(
!
productId
){
return
;
}
__weak
KWMNewProductVC
*
weakSelf
=
self
;
void
(
^
failure
)(
NSURLSessionDataTask
*
,
NSError
*
)
=
^
(
NSURLSessionDataTask
*
task
,
NSError
*
error
){
[
weakSelf
showError
:
error
];
//
[weakSelf showError:error];
};
void
(
^
success
)(
NSURLSessionDataTask
*
,
KWMMetafieldResult
*
)
=
^
(
NSURLSessionDataTask
*
task
,
KWMMetafieldResult
*
result
){
if
(
!
result
.
metafields
){
...
...
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