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
bae556a2
Commit
bae556a2
authored
Oct 28, 2016
by
曹云霄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug
parent
e6ea7308
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
18 deletions
+10
-18
OrderdetailsViewController.m
Class/OrderdetailsViewController.m
+2
-0
project.pbxproj
Lighting.xcodeproj/project.pbxproj
+6
-6
NetworkRequestClassManager.m
Tools/NetworkRequestClassManager.m
+0
-10
PrefixHeader.pch
Tools/PrefixHeader.pch
+2
-2
No files found.
Class/OrderdetailsViewController.m
View file @
bae556a2
...
...
@@ -610,11 +610,13 @@ NSString *const lotteryAction = @"lotteryAction";
}];
}
#pragma mark -下载PDF
-
(
void
)
DownloadPDF
:
(
void
(
^
)(
id
returnValue
))
success
{
WS
(
weakSelf
);
[
self
CreateMBProgressHUDLoding
];
// NSLog(@"%@",[NSString stringWithFormat:@"%@%@",SERVERREQUESTURL(DOWNLOADPDF),_orderCode]);
[[
NetworkRequestClassManager
Manager
]
NetworkWithDictionaryRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
SERVERREQUESTURL
(
DOWNLOADPDF
),
_orderCode
]
WithRequestType
:
1
WithParameter
:
nil
WithReturnValueBlock
:^
(
id
returnValue
)
{
[
weakSelf
RemoveMBProgressHUDLoding
];
...
...
Lighting.xcodeproj/project.pbxproj
View file @
bae556a2
...
...
@@ -2029,8 +2029,8 @@
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME
=
"Brand Assets"
;
CLANG_ENABLE_OBJC_WEAK
=
YES
;
CODE_SIGN_IDENTITY
=
"iPhone D
istribution: Shanghai Gomore Information Technology Co.,Ltd
"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone D
istribution: Shanghai Gomore Information Technology Co.,Ltd
"
;
CODE_SIGN_IDENTITY
=
"iPhone D
eveloper
"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone D
eveloper
"
;
COMPRESS_PNG_FILES
=
NO
;
ENABLE_BITCODE
=
NO
;
FRAMEWORK_SEARCH_PATHS
=
"$(inherited)"
;
...
...
@@ -2072,7 +2072,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER
=
com.gomore.opple
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PROVISIONING_PROFILE
=
"
10361169-d429-4810-90f6-528335fe4062
"
;
PROVISIONING_PROFILE
=
""
;
STRIP_PNG_TEXT
=
NO
;
TARGETED_DEVICE_FAMILY
=
2
;
USER_HEADER_SEARCH_PATHS
=
"$(PODS_ROOT)/**"
;
...
...
@@ -2086,8 +2086,8 @@
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME
=
"Brand Assets"
;
CLANG_ENABLE_OBJC_WEAK
=
YES
;
CODE_SIGN_IDENTITY
=
"iPhone D
istribution: Shanghai Gomore Information Technology Co.,Ltd
"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone D
istribution: Shanghai Gomore Information Technology Co.,Ltd
"
;
CODE_SIGN_IDENTITY
=
"iPhone D
eveloper
"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone D
eveloper
"
;
COMPRESS_PNG_FILES
=
NO
;
ENABLE_BITCODE
=
NO
;
FRAMEWORK_SEARCH_PATHS
=
"$(inherited)"
;
...
...
@@ -2129,7 +2129,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER
=
com.gomore.opple
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PROVISIONING_PROFILE
=
"
10361169-d429-4810-90f6-528335fe4062
"
;
PROVISIONING_PROFILE
=
""
;
STRIP_PNG_TEXT
=
NO
;
TARGETED_DEVICE_FAMILY
=
2
;
USER_HEADER_SEARCH_PATHS
=
"$(PODS_ROOT)/**"
;
...
...
Tools/NetworkRequestClassManager.m
View file @
bae556a2
...
...
@@ -188,7 +188,6 @@ static NetworkRequestClassManager *manager = nil;
manager
.
requestSerializer
=
[
AFJSONRequestSerializer
serializer
];
manager
.
requestSerializer
.
timeoutInterval
=
10
.
0
f
;
[
manager
.
requestSerializer
setValue
:
@"application/json;charset=utf-8"
forHTTPHeaderField
:
@"Content-Type"
];
//网络检测
if
(
SHARED_APPDELEGATE
.
Networkstatus
==
false
)
{
...
...
@@ -202,24 +201,16 @@ static NetworkRequestClassManager *manager = nil;
//使用系统类创建downLoad Task对象
NSURLSessionDownloadTask
*
task
=
[
manager
downloadTaskWithRequest
:
request
progress
:
^
(
NSProgress
*
_Nonnull
downloadProgress
)
{
NSLog
(
@"%@"
,
downloadProgress
);
//下载进度
}
destination
:^
NSURL
*
_Nonnull
(
NSURL
*
_Nonnull
targetPath
,
NSURLResponse
*
_Nonnull
response
)
{
//返回下载到哪里(返回值是一个路径)
//拼接存放路径
// NSURL *pathURL = [[NSFileManager defaultManager] URLForDirectory:NSDocumentDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:YES error:nil];
NSString
*
homeDictionary
=
[
NSSearchPathForDirectoriesInDomains
(
NSDocumentDirectory
,
NSUserDomainMask
,
YES
)
objectAtIndex
:
0
];
NSString
*
homepath
=
[
homeDictionary
stringByAppendingPathComponent
:[
response
suggestedFilename
]];
//添加储存的文件名
return
[
NSURL
fileURLWithPath
:
homepath
];
}
completionHandler
:^
(
NSURLResponse
*
_Nonnull
response
,
NSURL
*
_Nullable
filePath
,
NSError
*
_Nullable
error
)
{
//下载完成走这个block
if
(
!
error
)
{
successBlock
(
filePath
);
//如果请求没有错误(请求成功), 则打印地址
// NSLog(@"%@", filePath);
}
else
{
failureBlock
(
error
);
...
...
@@ -227,7 +218,6 @@ static NetworkRequestClassManager *manager = nil;
}];
//开始请求
[
task
resume
];
}
...
...
Tools/PrefixHeader.pch
View file @
bae556a2
...
...
@@ -115,12 +115,12 @@
/**
* 服务器开发地址
*/
//
#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://139.196.195.30:8090/opple-web/app%@",URL]
#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://139.196.195.30:8090/opple-web/app%@",URL]
/**
* 服务器测试地址
*/
#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://dg-dev.opple.com/opple-web/app%@",URL]
//
#define SERVERREQUESTURL(URL) [NSString stringWithFormat:@"http://dg-dev.opple.com/opple-web/app%@",URL]
///**
// * 服务器正式地址
...
...
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