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
a07e140b
Commit
a07e140b
authored
7 years ago
by
lee
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of git.oschina.net:kollway-kollway/newcemarose
parents
c5965b3d
058a9d44
master
No related merge requests found
Hide 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 @
a07e140b
...
@@ -280,6 +280,8 @@
...
@@ -280,6 +280,8 @@
}
}
self
.
product
=
product
;
self
.
product
=
product
;
self
.
productId
=
product
.
identifier
;
self
.
productId
=
product
.
identifier
;
self
.
colorMeterfield
=
nil
;
self
.
adminProduct
=
nil
;
[
self
.
scrollView
setContentOffset
:
CGPointMake
(
0
,
0
)
animated
:
YES
];
[
self
.
scrollView
setContentOffset
:
CGPointMake
(
0
,
0
)
animated
:
YES
];
[
self
initView
];
[
self
initView
];
[
self
clearSelect
];
[
self
clearSelect
];
...
@@ -427,11 +429,17 @@
...
@@ -427,11 +429,17 @@
[
weakSelf
showError
:
error
];
[
weakSelf
showError
:
error
];
}
else
if
(
product
){
}
else
if
(
product
){
weakSelf
.
product
=
product
;
weakSelf
.
product
=
product
;
weakSelf
.
productId
=
product
.
identifier
;
[
weakSelf
initMidViewHight
];
[
weakSelf
initMidViewHight
];
weakSelf
.
midDetailView
.
product
=
product
;
weakSelf
.
midDetailView
.
product
=
product
;
[
weakSelf
.
detailView1
setData
:
product
];
[
weakSelf
.
detailView1
setData
:
product
];
[
self
requestBrandProducts
:
1
];
[
self
requestBrandProducts
:
1
];
[
self
requestCategoryProducts
:
1
];
[
self
requestCategoryProducts
:
1
];
if
(
self
.
handle
){
[
self
requestAdminProduct
];
[
self
requestColorMetafield
];
}
}
}
};
};
if
(
self
.
handle
)
{
if
(
self
.
handle
)
{
...
@@ -500,6 +508,9 @@
...
@@ -500,6 +508,9 @@
#pragma mark -- API KWMApimanager
#pragma mark -- API KWMApimanager
-
(
void
)
requestAdminProduct
{
-
(
void
)
requestAdminProduct
{
NSNumber
*
productId
=
self
.
product
?
self
.
product
.
identifier
:
self
.
productId
;
NSNumber
*
productId
=
self
.
product
?
self
.
product
.
identifier
:
self
.
productId
;
if
(
!
productId
){
return
;
}
__weak
KWMNewProductVC
*
weakSelf
=
self
;
__weak
KWMNewProductVC
*
weakSelf
=
self
;
void
(
^
failure
)(
NSURLSessionDataTask
*
,
NSError
*
)
=
^
(
NSURLSessionDataTask
*
task
,
NSError
*
error
){
void
(
^
failure
)(
NSURLSessionDataTask
*
,
NSError
*
)
=
^
(
NSURLSessionDataTask
*
task
,
NSError
*
error
){
};
};
...
@@ -515,9 +526,12 @@
...
@@ -515,9 +526,12 @@
-
(
void
)
requestColorMetafield
{
-
(
void
)
requestColorMetafield
{
NSNumber
*
productId
=
self
.
product
?
self
.
product
.
identifier
:
self
.
productId
;
NSNumber
*
productId
=
self
.
product
?
self
.
product
.
identifier
:
self
.
productId
;
if
(
!
productId
){
return
;
}
__weak
KWMNewProductVC
*
weakSelf
=
self
;
__weak
KWMNewProductVC
*
weakSelf
=
self
;
void
(
^
failure
)(
NSURLSessionDataTask
*
,
NSError
*
)
=
^
(
NSURLSessionDataTask
*
task
,
NSError
*
error
){
void
(
^
failure
)(
NSURLSessionDataTask
*
,
NSError
*
)
=
^
(
NSURLSessionDataTask
*
task
,
NSError
*
error
){
[
weakSelf
showError
:
error
];
//
[weakSelf showError:error];
};
};
void
(
^
success
)(
NSURLSessionDataTask
*
,
KWMMetafieldResult
*
)
=
^
(
NSURLSessionDataTask
*
task
,
KWMMetafieldResult
*
result
){
void
(
^
success
)(
NSURLSessionDataTask
*
,
KWMMetafieldResult
*
)
=
^
(
NSURLSessionDataTask
*
task
,
KWMMetafieldResult
*
result
){
if
(
!
result
.
metafields
){
if
(
!
result
.
metafields
){
...
...
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