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
bebd9ebd
Commit
bebd9ebd
authored
May 17, 2016
by
zhu
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.oschina.net/gomore/Opple-iOS
parents
086d455e
665b0b70
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
174 additions
and
29 deletions
+174
-29
OrderdetailsViewController.m
Lighting/Class/OrderdetailsViewController.m
+22
-25
project.pbxproj
Lighting/Lighting.xcodeproj/project.pbxproj
+14
-0
Main.storyboard
Lighting/Lighting/Base.lproj/Main.storyboard
+7
-2
00登录-谭.jpg
Lighting/Lighting/Images.xcassets/00登录-谭.imageset/00登录-谭.jpg
+0
-0
Contents.json
...ng/Lighting/Images.xcassets/00登录-谭.imageset/Contents.json
+22
-0
Contents.json
...ting/Lighting/Images.xcassets/欧New.imageset/Contents.json
+22
-0
欧New@2x.png
Lighting/Lighting/Images.xcassets/欧New.imageset/欧New@2x.png
+0
-0
Contents.json
...ting/Images.xcassets/欧普照明零售全渠道营销平台.imageset/Contents.json
+22
-0
欧普照明零售全渠道营销平台@2x.png
...ages.xcassets/欧普照明零售全渠道营销平台.imageset/欧普照明零售全渠道营销平台@2x.png
+0
-0
NetworkRequestClassManager.m
Lighting/Tools/NetworkRequestClassManager.m
+6
-2
PDFViewController.h
Lighting/Tools/PDFViewController.h
+23
-0
PDFViewController.m
Lighting/Tools/PDFViewController.m
+36
-0
No files found.
Lighting/Class/OrderdetailsViewController.m
View file @
bebd9ebd
...
...
@@ -15,9 +15,9 @@
#import "SettlementViewController.h"
#import "AdditionalTableViewCell.h"
#import <QuickLook/QuickLook.h>
#import "PDFViewController.h"
@interface
OrderdetailsViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
QLPreviewControllerDataSource
>
@interface
OrderdetailsViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
>
/**
...
...
@@ -25,6 +25,11 @@
*/
@property
(
nonatomic
,
strong
)
OrderBill
*
orderDetails
;
/**
* 本地存储地址
*/
@property
(
nonatomic
,
copy
)
NSString
*
PDFpath
;
@end
...
...
@@ -361,7 +366,9 @@
[
self
CreateMBProgressHUDLoding
];
[[
NetworkRequestClassManager
Manager
]
NetworkWithDictionaryRequestWithURL
:[
NSString
stringWithFormat
:
@"%@%@%@"
,
ServerAddress
,
@"/order/UrlOfprintPDF/"
,
@"A0716051715560001"
]
WithRequestType
:
1
WithParameter
:
nil
WithReturnValueBlock
:^
(
id
returnValue
)
{
[[
NetworkRequestClassManager
Manager
]
DownloadPDFdatasWithURL
:[
NSString
stringWithFormat
:
@"%@%@"
,
PDFSERADDRESS
,
returnValue
[
@"data"
]]
WithReturnValueBlock
:
^
(
id
returnValue
)
{
NSString
*
url
=
[
NSString
stringWithFormat
:
@"%@%@"
,
PDFSERADDRESS
,
returnValue
[
@"data"
]];
self
.
PDFpath
=
url
;
[[
NetworkRequestClassManager
Manager
]
DownloadPDFdatasWithURL
:
url
WithReturnValueBlock
:
^
(
id
returnValue
)
{
[
self
RemoveMBProgressHUDLoding
];
success
(
returnValue
);
...
...
@@ -378,28 +385,18 @@
}];
}
//
//#pragma mark -预览订单
//- (void)PreviewButtonClick:(UIButton *)button
//{
// //初始化QLPreviewController对象
// QLPreviewController *previewController = [[QLPreviewController alloc] init];
// previewController.dataSource = self;
// [self.navigationController pushViewController:previewController animated:YES];
//}
//
//
////再实现QLPreviewControllerDataSource的两个方法即可显示
////显示文件数量
//- (NSInteger) numberOfPreviewItemsInPreviewController: (QLPreviewController *) controller
//{
// return 1;
//}
////文件路径URL
//- (id <QLPreviewItem>)previewController: (QLPreviewController *)controller previewItemAtIndex:(NSInteger)index
//{
//
//}
#pragma mark -预览订单
-
(
void
)
PreviewButtonClick
:
(
UIButton
*
)
button
{
[
self
DownloadPDF
:
^
(
id
returnValue
)
{
PDFViewController
*
pdfVc
=
[[
PDFViewController
alloc
]
init
];
[
self
presentViewController
:
pdfVc
animated
:
YES
completion
:
nil
];
}];
}
...
...
Lighting/Lighting.xcodeproj/project.pbxproj
View file @
bebd9ebd
...
...
@@ -82,6 +82,7 @@
29A938221CDADE4700F21E54
/* ProductDetailsTableViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29A938211CDADE4700F21E54
/* ProductDetailsTableViewCell.m */
;
};
29A938251CDAE31200F21E54
/* ProductDetailsHeaderView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29A938241CDAE31200F21E54
/* ProductDetailsHeaderView.m */
;
};
29A938271CDAE31B00F21E54
/* ProductDetailsHeaderView.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29A938261CDAE31B00F21E54
/* ProductDetailsHeaderView.xib */
;
};
29A9DCAE1CEB643C00A7567A
/* PDFViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29A9DCAC1CEB643C00A7567A
/* PDFViewController.m */
;
};
29BB27681CD9D38E009A0813
/* AllpriceTableViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29BB27671CD9D38E009A0813
/* AllpriceTableViewCell.m */
;
};
29BB276C1CD9DE74009A0813
/* FollowHeartViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29BB276B1CD9DE74009A0813
/* FollowHeartViewController.m */
;
};
29BB27741CD9DFAC009A0813
/* SceneLibraryViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
29BB27731CD9DFAC009A0813
/* SceneLibraryViewController.m */
;
};
...
...
@@ -254,6 +255,8 @@
29A938231CDAE31200F21E54
/* ProductDetailsHeaderView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ProductDetailsHeaderView.h
;
sourceTree
=
"<group>"
;
};
29A938241CDAE31200F21E54
/* ProductDetailsHeaderView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ProductDetailsHeaderView.m
;
sourceTree
=
"<group>"
;
};
29A938261CDAE31B00F21E54
/* ProductDetailsHeaderView.xib */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
file.xib
;
path
=
ProductDetailsHeaderView.xib
;
sourceTree
=
"<group>"
;
};
29A9DCAB1CEB643C00A7567A
/* PDFViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
PDFViewController.h
;
sourceTree
=
"<group>"
;
};
29A9DCAC1CEB643C00A7567A
/* PDFViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
PDFViewController.m
;
sourceTree
=
"<group>"
;
};
29BB27661CD9D38E009A0813
/* AllpriceTableViewCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
AllpriceTableViewCell.h
;
sourceTree
=
"<group>"
;
};
29BB27671CD9D38E009A0813
/* AllpriceTableViewCell.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
AllpriceTableViewCell.m
;
sourceTree
=
"<group>"
;
};
29BB276A1CD9DE74009A0813
/* FollowHeartViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
FollowHeartViewController.h
;
sourceTree
=
"<group>"
;
};
...
...
@@ -488,6 +491,7 @@
2928F7DE1CD085430036D761
/* Tools */
=
{
isa
=
PBXGroup
;
children
=
(
29A9DCAA1CEB63BD00A7567A
/* PreviewPDF */
,
2985AE9A1CE72F1500704C91
/* ZXPUnicode */
,
29BFBD841CE4288A00C238FB
/* Customercenter */
,
29F725F81CE17AE40072FE0E
/* Shopperscenter */
,
...
...
@@ -868,6 +872,15 @@
name
=
Clientdetails
;
sourceTree
=
"<group>"
;
};
29A9DCAA1CEB63BD00A7567A
/* PreviewPDF */
=
{
isa
=
PBXGroup
;
children
=
(
29A9DCAB1CEB643C00A7567A
/* PDFViewController.h */
,
29A9DCAC1CEB643C00A7567A
/* PDFViewController.m */
,
);
name
=
PreviewPDF
;
sourceTree
=
"<group>"
;
};
29BB27691CD9DDF3009A0813
/* FollowHeartVC */
=
{
isa
=
PBXGroup
;
children
=
(
...
...
@@ -1352,6 +1365,7 @@
29C584ED1CDA429500C6F677
/* ProductDetailsViewController.m in Sources */
,
0447085E1CD7C06B00555827
/* LoginViewController.m in Sources */
,
2928F83B1CD0A0CE0036D761
/* CustomTabbarController.m in Sources */
,
29A9DCAE1CEB643C00A7567A
/* PDFViewController.m in Sources */
,
29EAAE8E1CDC3E8E00C4DBA2
/* BillingInfoView.m in Sources */
,
0470D6141CE2938000647F0F
/* ProductLibraryView.m in Sources */
,
290887061CE58BC2000B7097
/* screeningButton.m in Sources */
,
...
...
Lighting/Lighting/Base.lproj/Main.storyboard
View file @
bebd9ebd
...
...
@@ -12,7 +12,7 @@
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"1024"
height=
"1366"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<subviews>
<imageView
userInteractionEnabled=
"NO"
contentMode=
"scaleToFill"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"
登录
"
id=
"CQr-RC-S14"
>
<imageView
userInteractionEnabled=
"NO"
contentMode=
"scaleToFill"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"
00登录-谭
"
id=
"CQr-RC-S14"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"1024"
height=
"1366"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
</imageView>
...
...
@@ -86,6 +86,10 @@
</subviews>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
</view>
<imageView
userInteractionEnabled=
"NO"
contentMode=
"scaleToFill"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"欧New"
id=
"bkO-7e-jCO"
>
<rect
key=
"frame"
x=
"137"
y=
"575"
width=
"239"
height=
"93"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMinY=
"YES"
flexibleMaxY=
"YES"
/>
</imageView>
</subviews>
<color
key=
"backgroundColor"
white=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"calibratedWhite"
/>
</view>
...
...
@@ -106,8 +110,9 @@
</scene>
</scenes>
<resources>
<image
name=
"00登录-谭"
width=
"1024"
height=
"768"
/>
<image
name=
"Lock-0"
width=
"17"
height=
"21"
/>
<image
name=
"User-Profile"
width=
"17"
height=
"17"
/>
<image
name=
"
登录"
width=
"1500"
height=
"1125
"
/>
<image
name=
"
欧New"
width=
"516"
height=
"201
"
/>
</resources>
</document>
Lighting/Lighting/Images.xcassets/00登录-谭.imageset/00登录-谭.jpg
0 → 100644
View file @
bebd9ebd
212 KB
Lighting/Lighting/Images.xcassets/00登录-谭.imageset/Contents.json
0 → 100644
View file @
bebd9ebd
{
"images"
:
[
{
"idiom"
:
"universal"
,
"filename"
:
"00登录-谭.jpg"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
Lighting/Lighting/Images.xcassets/欧New.imageset/Contents.json
0 → 100644
View file @
bebd9ebd
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"filename"
:
"欧New@2x.png"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
Lighting/Lighting/Images.xcassets/欧New.imageset/欧New@2x.png
0 → 100644
View file @
bebd9ebd
84.7 KB
Lighting/Lighting/Images.xcassets/欧普照明零售全渠道营销平台.imageset/Contents.json
0 → 100644
View file @
bebd9ebd
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"filename"
:
"欧普照明零售全渠道营销平台@2x.png"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
Lighting/Lighting/Images.xcassets/欧普照明零售全渠道营销平台.imageset/欧普照明零售全渠道营销平台@2x.png
0 → 100644
View file @
bebd9ebd
84.7 KB
Lighting/Tools/NetworkRequestClassManager.m
View file @
bebd9ebd
...
...
@@ -197,8 +197,12 @@ static NetworkRequestClassManager *manager = nil;
}
destination
:^
NSURL
*
_Nonnull
(
NSURL
*
_Nonnull
targetPath
,
NSURLResponse
*
_Nonnull
response
)
{
//返回下载到哪里(返回值是一个路径)
//拼接存放路径
NSURL
*
pathURL
=
[[
NSFileManager
defaultManager
]
URLForDirectory
:
NSDocumentDirectory
inDomain
:
NSUserDomainMask
appropriateForURL
:
nil
create
:
YES
error
:
nil
];
return
[
pathURL
URLByAppendingPathComponent
:[
response
suggestedFilename
]];
// 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
...
...
Lighting/Tools/PDFViewController.h
0 → 100644
View file @
bebd9ebd
//
// PDFViewController.h
// Lighting
//
// Created by 曹云霄 on 16/5/17.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "BaseViewController.h"
@interface
PDFViewController
:
BaseViewController
/**
* PDF文件URL
*/
@property
(
nonatomic
,
copy
)
NSString
*
pdfURLString
;
@end
Lighting/Tools/PDFViewController.m
0 → 100644
View file @
bebd9ebd
//
// PDFViewController.m
// Lighting
//
// Created by 曹云霄 on 16/5/17.
// Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//
#import "PDFViewController.h"
@interface
PDFViewController
()
@property
(
nonatomic
,
strong
)
UIWebView
*
webView
;
@end
@implementation
PDFViewController
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
// Do any additional setup after loading the view from its nib.
[
self
uiConfigAction
];
}
#pragma mark -UI
-
(
void
)
uiConfigAction
{
self
.
webView
=
[[
UIWebView
alloc
]
initWithFrame
:
self
.
view
.
bounds
];
[
self
.
view
addSubview
:
self
.
webView
];
NSURLRequest
*
request
=
[
NSURLRequest
requestWithURL
:[
NSURL
URLWithString
:
_pdfURLString
]];
[
self
.
webView
loadRequest
:
request
];
}
@end
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