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
f877d8f2
Commit
f877d8f2
authored
May 23, 2017
by
lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
u
parent
4a6dc266
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
11 deletions
+7
-11
KWMAPIManager.m
iCemarose/Class/Api/KWMAPIManager.m
+3
-3
KWMHomeVC.m
iCemarose/Class/UI/Home/KWMHomeVC.m
+2
-8
KWMEmailVC.m
iCemarose/Class/UI/Login/KWMEmailVC.m
+1
-0
KWMValidationVC.m
iCemarose/Class/UI/Login/KWMValidationVC.m
+1
-0
No files found.
iCemarose/Class/Api/KWMAPIManager.m
View file @
f877d8f2
...
...
@@ -375,10 +375,10 @@ static NSString *const passwordTest = @"9e84aae218c57cdf0762763c4cf5a651";
[
manager
setTaskWillPerformHTTPRedirectionBlock
:
^
NSURLRequest
*
_Nonnull
(
NSURLSession
*
_Nonnull
session
,
NSURLSessionTask
*
_Nonnull
task
,
NSURLResponse
*
_Nonnull
response
,
NSURLRequest
*
_Nonnull
request
)
{
NSString
*
url
=
request
.
URL
.
absoluteString
;
if
([
url
isEqualToString
:[
NSString
stringWithFormat
:
@"https://%@/account"
,
Shopify_SHOP_DOMAIN
]])
{
success
();
if
(
success
)
success
();
}
else
{
NSError
*
error
=
[[
NSError
alloc
]
initWithDomain
:
url
code
:
401
userInfo
:
@{
NSLocalizedDescriptionKey
:
@"email & password is invalid !"
}];
failure
(
error
);
if
(
failure
)
failure
(
error
);
}
return
nil
;
}];
...
...
@@ -391,7 +391,7 @@ static NSString *const passwordTest = @"9e84aae218c57cdf0762763c4cf5a651";
};
[
manager
POST
:
loginUrl
parameters
:
param
success
:^
(
NSURLSessionDataTask
*
_Nonnull
task
,
id
_Nonnull
responseObject
)
{
}
failure
:^
(
NSURLSessionDataTask
*
_Nullable
task
,
NSError
*
_Nonnull
error
)
{
failure
(
error
);
if
(
failure
)
failure
(
error
);
}];
}
...
...
iCemarose/Class/UI/Home/KWMHomeVC.m
View file @
f877d8f2
...
...
@@ -26,7 +26,7 @@
@implementation
KWMHomeVC
+
(
NSString
*
)
kwmTag
{
+
(
NSString
*
)
kwmTag
{
return
@"KWMHomeVC"
;
}
...
...
@@ -43,13 +43,7 @@
[
super
viewDidLoad
];
_dataArr
=
[
NSArray
array
];
[
self
requestBlogAPI
];
[
self
.
api
loginWebSuccess
:
^
{
// [[KWMShoppingCart sharedInstance] allItemsWithCallback:^(NSError *error, KWMCartResult *cart) {
//
// }];
}
failure
:
^
(
NSError
*
error
)
{
}];
[
self
.
api
loginWebSuccess
:
nil
failure
:
nil
];
}
-
(
UITableView
*
)
targetTableView
{
...
...
iCemarose/Class/UI/Login/KWMEmailVC.m
View file @
f877d8f2
...
...
@@ -192,6 +192,7 @@
//异步保存数据
dispatch_async
(
dispatch_get_global_queue
(
0
,
0
),
^
{
[
self
.
api
loginWebSuccess
:
nil
failure
:
nil
];
[
self
saveData
];
});
// NSString *path = NSHomeDirectory();
...
...
iCemarose/Class/UI/Login/KWMValidationVC.m
View file @
f877d8f2
...
...
@@ -441,6 +441,7 @@
NSLog
(
@"登录成功"
);
//异步保存数据
dispatch_async
(
dispatch_get_global_queue
(
0
,
0
),
^
{
[
self
.
api
loginWebSuccess
:
nil
failure
:
nil
];
[
self
saveData
];
});
[
self
dismissViewControllerAnimated
:
YES
completion
:
nil
];
...
...
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