Commit 42e62770 authored by xiejb's avatar xiejb

添加资讯web页面

parent ec29891c
...@@ -510,9 +510,6 @@ ...@@ -510,9 +510,6 @@
B5A97FC5257F5891007B1AF8 /* IDMWeChatBindingHttpPostCmdTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5A97FC4257F5891007B1AF8 /* IDMWeChatBindingHttpPostCmdTest.swift */; }; B5A97FC5257F5891007B1AF8 /* IDMWeChatBindingHttpPostCmdTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5A97FC4257F5891007B1AF8 /* IDMWeChatBindingHttpPostCmdTest.swift */; };
B5A980862580CB15007B1AF8 /* SinglePointWeChatVC+IdmWeChat.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5A980852580CB14007B1AF8 /* SinglePointWeChatVC+IdmWeChat.swift */; }; B5A980862580CB15007B1AF8 /* SinglePointWeChatVC+IdmWeChat.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5A980852580CB14007B1AF8 /* SinglePointWeChatVC+IdmWeChat.swift */; };
B5A980882580D301007B1AF8 /* WeChatBindingVC+IdmHttp.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5A980872580D301007B1AF8 /* WeChatBindingVC+IdmHttp.swift */; }; B5A980882580D301007B1AF8 /* WeChatBindingVC+IdmHttp.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5A980872580D301007B1AF8 /* WeChatBindingVC+IdmHttp.swift */; };
B5AD2BC228325980006BA9CF /* ScanKitFrameWork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B5AD2BC028325980006BA9CF /* ScanKitFrameWork.framework */; };
B5AD2BC328325980006BA9CF /* ScanKitFrameWorkBundle.bundle in Resources */ = {isa = PBXBuildFile; fileRef = B5AD2BC128325980006BA9CF /* ScanKitFrameWorkBundle.bundle */; };
B5AD2BE0283259AD006BA9CF /* ScanKitFrameWork.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = B5AD2BC028325980006BA9CF /* ScanKitFrameWork.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
B5B7AFC124F35523007E3E3E /* SinglePointWeChatVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5B7AFC024F35523007E3E3E /* SinglePointWeChatVC.swift */; }; B5B7AFC124F35523007E3E3E /* SinglePointWeChatVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5B7AFC024F35523007E3E3E /* SinglePointWeChatVC.swift */; };
B5B7AFC324F35547007E3E3E /* SinglePointWeChatVC+LoginView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5B7AFC224F35547007E3E3E /* SinglePointWeChatVC+LoginView.swift */; }; B5B7AFC324F35547007E3E3E /* SinglePointWeChatVC+LoginView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5B7AFC224F35547007E3E3E /* SinglePointWeChatVC+LoginView.swift */; };
B5B7AFC524F35562007E3E3E /* SinglePointWeChatVC+Http.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5B7AFC424F35562007E3E3E /* SinglePointWeChatVC+Http.swift */; }; B5B7AFC524F35562007E3E3E /* SinglePointWeChatVC+Http.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5B7AFC424F35562007E3E3E /* SinglePointWeChatVC+Http.swift */; };
...@@ -663,7 +660,6 @@ ...@@ -663,7 +660,6 @@
dstPath = ""; dstPath = "";
dstSubfolderSpec = 10; dstSubfolderSpec = 10;
files = ( files = (
B5AD2BE0283259AD006BA9CF /* ScanKitFrameWork.framework in CopyFiles */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -1452,8 +1448,6 @@ ...@@ -1452,8 +1448,6 @@
B5A97FC4257F5891007B1AF8 /* IDMWeChatBindingHttpPostCmdTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IDMWeChatBindingHttpPostCmdTest.swift; sourceTree = "<group>"; }; B5A97FC4257F5891007B1AF8 /* IDMWeChatBindingHttpPostCmdTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IDMWeChatBindingHttpPostCmdTest.swift; sourceTree = "<group>"; };
B5A980852580CB14007B1AF8 /* SinglePointWeChatVC+IdmWeChat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SinglePointWeChatVC+IdmWeChat.swift"; sourceTree = "<group>"; wrapsLines = 1; }; B5A980852580CB14007B1AF8 /* SinglePointWeChatVC+IdmWeChat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SinglePointWeChatVC+IdmWeChat.swift"; sourceTree = "<group>"; wrapsLines = 1; };
B5A980872580D301007B1AF8 /* WeChatBindingVC+IdmHttp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "WeChatBindingVC+IdmHttp.swift"; sourceTree = "<group>"; wrapsLines = 1; }; B5A980872580D301007B1AF8 /* WeChatBindingVC+IdmHttp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "WeChatBindingVC+IdmHttp.swift"; sourceTree = "<group>"; wrapsLines = 1; };
B5AD2BC028325980006BA9CF /* ScanKitFrameWork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = ScanKitFrameWork.framework; sourceTree = "<group>"; };
B5AD2BC128325980006BA9CF /* ScanKitFrameWorkBundle.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = ScanKitFrameWorkBundle.bundle; sourceTree = "<group>"; };
B5B7AFC024F35523007E3E3E /* SinglePointWeChatVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SinglePointWeChatVC.swift; sourceTree = "<group>"; wrapsLines = 1; }; B5B7AFC024F35523007E3E3E /* SinglePointWeChatVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SinglePointWeChatVC.swift; sourceTree = "<group>"; wrapsLines = 1; };
B5B7AFC224F35547007E3E3E /* SinglePointWeChatVC+LoginView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SinglePointWeChatVC+LoginView.swift"; sourceTree = "<group>"; wrapsLines = 1; }; B5B7AFC224F35547007E3E3E /* SinglePointWeChatVC+LoginView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SinglePointWeChatVC+LoginView.swift"; sourceTree = "<group>"; wrapsLines = 1; };
B5B7AFC424F35562007E3E3E /* SinglePointWeChatVC+Http.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SinglePointWeChatVC+Http.swift"; sourceTree = "<group>"; wrapsLines = 1; }; B5B7AFC424F35562007E3E3E /* SinglePointWeChatVC+Http.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SinglePointWeChatVC+Http.swift"; sourceTree = "<group>"; wrapsLines = 1; };
...@@ -1631,7 +1625,6 @@ ...@@ -1631,7 +1625,6 @@
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
179EF499231E68270085BCDB /* CoreTelephony.framework in Frameworks */, 179EF499231E68270085BCDB /* CoreTelephony.framework in Frameworks */,
B5AD2BC228325980006BA9CF /* ScanKitFrameWork.framework in Frameworks */,
B59715B52465269900E5D7D5 /* iflyMSC.framework in Frameworks */, B59715B52465269900E5D7D5 /* iflyMSC.framework in Frameworks */,
179EF48F231E67F60085BCDB /* SystemConfiguration.framework in Frameworks */, 179EF48F231E67F60085BCDB /* SystemConfiguration.framework in Frameworks */,
B5D5353224346D6B00CA1E07 /* GLKit.framework in Frameworks */, B5D5353224346D6B00CA1E07 /* GLKit.framework in Frameworks */,
...@@ -3893,8 +3886,6 @@ ...@@ -3893,8 +3886,6 @@
B5AD2BBF28325980006BA9CF /* ScanKit */ = { B5AD2BBF28325980006BA9CF /* ScanKit */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
B5AD2BC028325980006BA9CF /* ScanKitFrameWork.framework */,
B5AD2BC128325980006BA9CF /* ScanKitFrameWorkBundle.bundle */,
); );
path = ScanKit; path = ScanKit;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -4410,7 +4401,6 @@ ...@@ -4410,7 +4401,6 @@
17458071231F9D00008976CC /* MineInfoTableViewCell.xib in Resources */, 17458071231F9D00008976CC /* MineInfoTableViewCell.xib in Resources */,
1787F6AF231F57760087B20E /* MBProgressHUD.bundle in Resources */, 1787F6AF231F57760087B20E /* MBProgressHUD.bundle in Resources */,
179EF4AC231E6EEC0085BCDB /* meta_vad_16k.jet in Resources */, 179EF4AC231E6EEC0085BCDB /* meta_vad_16k.jet in Resources */,
B5AD2BC328325980006BA9CF /* ScanKitFrameWorkBundle.bundle in Resources */,
B57312DE243C82DE003B07FC /* CustomerTableViewCell.xib in Resources */, B57312DE243C82DE003B07FC /* CustomerTableViewCell.xib in Resources */,
B529504A2473B4A90001A4B9 /* voice_play_animation_4.png in Resources */, B529504A2473B4A90001A4B9 /* voice_play_animation_4.png in Resources */,
174580C7231FAA81008976CC /* ServiceCollectionViewCell.xib in Resources */, 174580C7231FAA81008976CC /* ServiceCollectionViewCell.xib in Resources */,
...@@ -5306,13 +5296,12 @@ ...@@ -5306,13 +5296,12 @@
CODE_SIGN_ENTITLEMENTS = MobilePortal/MobilePortal.entitlements; CODE_SIGN_ENTITLEMENTS = MobilePortal/MobilePortal.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution: Shanghai Pharmaceutical Co., Ltd."; CODE_SIGN_IDENTITY = "iPhone Distribution: Shanghai Pharmaceutical Co., Ltd.";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2.4; CURRENT_PROJECT_VERSION = 3.4;
DEVELOPMENT_TEAM = 7FYU37G7W6; DEVELOPMENT_TEAM = 7FYU37G7W6;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"$(PROJECT_DIR)", "$(PROJECT_DIR)",
"$(PROJECT_DIR)/MobilePortal/Thirdparty/ScanKit",
); );
GCC_PREFIX_HEADER = "$(SRCROOT)/MobilePortal/PrefixHeader.pch"; GCC_PREFIX_HEADER = "$(SRCROOT)/MobilePortal/PrefixHeader.pch";
INFOPLIST_FILE = MobilePortal/Info.plist; INFOPLIST_FILE = MobilePortal/Info.plist;
...@@ -5326,7 +5315,7 @@ ...@@ -5326,7 +5315,7 @@
"$(PROJECT_DIR)/MobilePortal/Thirdparty/BDVoice/BDSClientLib", "$(PROJECT_DIR)/MobilePortal/Thirdparty/BDVoice/BDSClientLib",
"$(PROJECT_DIR)/MobilePortal/Thirdparty/WXApiManager/WeChatSDK", "$(PROJECT_DIR)/MobilePortal/Thirdparty/WXApiManager/WeChatSDK",
); );
MARKETING_VERSION = 2.4; MARKETING_VERSION = 3.4;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"$(inherited)", "$(inherited)",
...@@ -5407,13 +5396,12 @@ ...@@ -5407,13 +5396,12 @@
CODE_SIGN_ENTITLEMENTS = MobilePortal/MobilePortal.entitlements; CODE_SIGN_ENTITLEMENTS = MobilePortal/MobilePortal.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution: Shanghai Pharmaceutical Co., Ltd."; CODE_SIGN_IDENTITY = "iPhone Distribution: Shanghai Pharmaceutical Co., Ltd.";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2.4; CURRENT_PROJECT_VERSION = 3.4;
DEVELOPMENT_TEAM = 7FYU37G7W6; DEVELOPMENT_TEAM = 7FYU37G7W6;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"$(PROJECT_DIR)", "$(PROJECT_DIR)",
"$(PROJECT_DIR)/MobilePortal/Thirdparty/ScanKit",
); );
GCC_PREFIX_HEADER = "$(SRCROOT)/MobilePortal/PrefixHeader.pch"; GCC_PREFIX_HEADER = "$(SRCROOT)/MobilePortal/PrefixHeader.pch";
INFOPLIST_FILE = MobilePortal/Info.plist; INFOPLIST_FILE = MobilePortal/Info.plist;
...@@ -5427,7 +5415,7 @@ ...@@ -5427,7 +5415,7 @@
"$(PROJECT_DIR)/MobilePortal/Thirdparty/BDVoice/BDSClientLib", "$(PROJECT_DIR)/MobilePortal/Thirdparty/BDVoice/BDSClientLib",
"$(PROJECT_DIR)/MobilePortal/Thirdparty/WXApiManager/WeChatSDK", "$(PROJECT_DIR)/MobilePortal/Thirdparty/WXApiManager/WeChatSDK",
); );
MARKETING_VERSION = 2.4; MARKETING_VERSION = 3.4;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"$(inherited)", "$(inherited)",
"-ObjC", "-ObjC",
......
...@@ -32,7 +32,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate,WXApiDelegate { ...@@ -32,7 +32,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate,WXApiDelegate {
/// 键盘 /// 键盘
IQKeyboardManager.shared.enable = true IQKeyboardManager.shared.enable = true
// 2体验版 1 测试版 0正式 106785 // 2体验版 1 测试版 0正式 106785
AccountInfo.sharedInstance().isTest = "2" AccountInfo.sharedInstance().isTest = "1"
AccountInfo.sharedInstance().messageNumber = "0" AccountInfo.sharedInstance().messageNumber = "0"
// 1新接口 0老接口 // 1新接口 0老接口
if AccountInfo.sharedInstance().oldType == nil { if AccountInfo.sharedInstance().oldType == nil {
......
...@@ -8,6 +8,14 @@ ...@@ -8,6 +8,14 @@
import UIKit import UIKit
/// 是否是TabBar页面
enum IsTabBarVC: String{
///TabBar 页面
case isTabBarVC
/// 非TabBar页面
case noIsTabBarVC
}
/// 应用的服务范围 /// 应用的服务范围
enum IsUMSMessageType: String{ enum IsUMSMessageType: String{
/// 消息统一平台 /// 消息统一平台
......
//
//
// Copyright (c) Huawei Technologies Co., Ltd. 2020-2028. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import "HmsScanFormat.h"
#import <AVFoundation/AVFoundation.h>
@interface HmsBitMap : NSObject
/*
get result from the UIImage
*/
+(NSDictionary *)bitMapForImage:(UIImage *)image withOptions:(HmsScanOptions *)options;
/*
get multiple result from the UIImage
*/
+ (NSArray *)multiDecodeBitMapForImage:(UIImage *)image withOptions:(HmsScanOptions *)options;
/*
get result from the sampleBuffer
*/
+(NSDictionary *)bitMapForSampleBuffer:(CMSampleBufferRef)sampleBuffer withOptions:(HmsScanOptions *)options;
/*
get multiple result from the sampleBuffer
*/
+(NSArray *)multiDecodeBitMapForSampleBuffer:(CMSampleBufferRef)sampleBuffer withOptions:(HmsScanOptions *)options;
@end
//
//
// Copyright (c) Huawei Technologies Co., Ltd. 2020-2028. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "HmsScanFormat.h"
@class HmsCustomScanViewController;
@protocol CustomizedScanDelegate <NSObject>
@optional
/*CustomizedScan Delegate
Data returned by code scanning
*/
- (void)customizedScanDelegateForResult:(NSDictionary *)resultDic;
@end
@interface HmsCustomScanViewController : UIViewController
@property (nonatomic, weak) id <CustomizedScanDelegate> customizedScanDelegate;
/*
set scan format
*/
-(instancetype)initCustomizedScanWithFormatType:(HmsScanOptions *)scanOptions;
/*
hide back button bool, (ture: show; false: hide) defaults to show
*/
@property (nonatomic) BOOL backButtonHidden;
/*
Identification area
*/
@property (nonatomic) CGRect cutArea;
/*
Bool, (ture:continue scanning; false:end scanning and viewController can be back), defaults to end scanning
*/
@property (nonatomic) BOOL continuouslyScan;
/*
back action
*/
-(void)backAction;
@end
//
//
// Copyright (c) Huawei Technologies Co., Ltd. 2020-2028. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "HmsScanFormat.h"
@protocol DefaultScanDelegate <NSObject>
@optional
/*DefaultScan Delegate
Data returned by code scanning
*/
- (void)defaultScanDelegateForDicResult:(NSDictionary *)resultDic;
/*DefaultScan Delegate
Data returned by album pictures
*/
- (void)defaultScanImagePickerDelegateForImage:(UIImage *)image;
@end
@interface HmsDefaultScanViewController : UIViewController
@property (nonatomic, weak) id <DefaultScanDelegate> defaultScanDelegate;
/*
set scan format
*/
-(instancetype)initDefaultScanWithFormatType:(HmsScanOptions *)scanOptions;
@end
//
//
// Copyright (c) Huawei Technologies Co., Ltd. 2020-2028. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "HmsScanFormat.h"
@interface HmsMultiFormatWriter : NSObject
/*Error
* Thrown when a barcode was successfully detected and decoded, but
* was not returned because its checksum feature failed.
code = 1000,
* Thrown when a barcode was successfully detected, but some aspect of
* the content did not conform to the barcode's format rules. This could have
* been due to a mis-detection.
code = 1001,
* Thrown when a barcode was not found in the image. It might have been
* partially detected but could not be confirmed.
code = 1002,
* Thrown when an exception occurs during Reed-Solomon decoding, such as when
* there are too many errors to correct.
code = 1003,
* This general error is thrown when something goes wrong during decoding of a barcode.
* This includes, but is not limited to, failing checksums / error correction algorithms, being
* unable to locate finder timing patterns, and so on.
code = 1004,
* Covers the range of error which may occur when encoding a barcode using the Writer framework.
code = 1005,
*/
+ (UIImage *)createCodeWithString:(NSString*)str size:(CGSize)size CodeFomart:(HMSScanFormatTypeCode)format error:(NSError **)error;
@end
//
//
// Copyright (c) Huawei Technologies Co., Ltd. 2020-2028. All rights reserved.
//
#import <Foundation/Foundation.h>
typedef NS_ENUM(int, HMSScanFormatTypeCode) {
AZTEC = 1 << 0,
CODABAR = 1 << 1,
CODE_39 = 1 << 2,
CODE_93 = 1 << 3,
CODE_128 = 1 << 4,
DATA_MATRIX = 1 << 5,
EAN_8 = 1 << 6,
EAN_13 = 1 << 7,
ITF = 1 << 8,
PDF_417 = 1 << 9,
QR_CODE = 1 << 10,
UPC_A = 1 << 11,
UPC_E = 1 << 12,
ALL = (1<<13)-1
};
@interface HmsScanOptions : NSObject
@property (nonatomic, assign) unsigned int scanFormatType;
@property (nonatomic, assign) BOOL photoMode;
- (instancetype)initWithScanFormatType:(unsigned int)type;
- (instancetype)initWithScanFormatType:(unsigned int)type Photo:(BOOL)photo;
@end
//
//
// Copyright (c) Huawei Technologies Co., Ltd. 2020-2028. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "HmsDefaultScanViewController.h"
#import "HmsCustomScanViewController.h"
#import "HmsBitMap.h"
#import "HmsMultiFormatWriter.h"
#import "HmsScanFormat.h"
//! Project version number for ScanKitFrameWork.
FOUNDATION_EXPORT double ScanKitFrameWorkVersionNumber;
//! Project version string for ScanKitFrameWork.
FOUNDATION_EXPORT const unsigned char ScanKitFrameWorkVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <ScanKitFrameWork/PublicHeader.h>
framework module ScanKitFrameWork {
umbrella header "ScanKitFrameWork.h"
export *
module * { export * }
}
# ScanKit iOS SDK
ScanKit Huawei code scanning service(Scan Kit)Provide convenient barcode and QR code scanning, parsing, generation capabilities, help you quickly build the scanning function in the application.
Thanks to Huawei's ability to accumulate in the field of computer vision, Scan Kit can realize the detection and automatic amplification of long-distance code or small code. At the same time, it makes targeted identification optimization for common complex code scanning scenes (such as reflection, dark light, stain, blur, cylinder), so as to improve the success rate of code scanning and user experience.
## SDK Access
### Add SDK
1. Open a command line window and 'cd' to the location of the Xcode project.
2. Create a 'Podfile' file. If it already exists, skip this step.
```
cd project-directory
pod init
```
3. Add the pod of SDK to podfile. The currently supported services are shown in the following table.
```
pod 'ScanKitFrameWork', '~> 1.0.1.300'
```
|service|collocation method|
|----|-----|
|Certification services|pod ‘ScanKitFrameWork’|
4. install pod,Then open it .xcworkspace file add view the project。
```
pod install
```
## LICENSE
see[Huawei License file](./LICENSE)
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait"> <device id="retina4_7" orientation="portrait" appearance="light"/>
<adaptation id="fullscreen"/>
</device>
<dependencies> <dependencies>
<deployment identifier="iOS"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
<scenes> <scenes>
...@@ -64,7 +62,7 @@ ...@@ -64,7 +62,7 @@
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="LJR-wM-KyR" userLabel="First Responder" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="LJR-wM-KyR" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects> </objects>
<point key="canvasLocation" x="8" y="112"/> <point key="canvasLocation" x="-593" y="63"/>
</scene> </scene>
</scenes> </scenes>
<resources> <resources>
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#import <AssetsLibrary/AssetsLibrary.h> #import <AssetsLibrary/AssetsLibrary.h>
#import <CoreLocation/CoreLocation.h> #import <CoreLocation/CoreLocation.h>
#import "UIView+Additions.h" #import "UIView+Additions.h"
#import <ScanKitFrameWork/ScanKitFrameWork.h> //#import <ScanKitFrameWork/ScanKitFrameWork.h>
@interface QRCodeSwiftView ()<AVCaptureMetadataOutputObjectsDelegate,AVCaptureVideoDataOutputSampleBufferDelegate>{ @interface QRCodeSwiftView ()<AVCaptureMetadataOutputObjectsDelegate,AVCaptureVideoDataOutputSampleBufferDelegate>{
int num; int num;
BOOL upOrdown; BOOL upOrdown;
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
@property (strong,nonatomic)AVCaptureDeviceInput * input; @property (strong,nonatomic)AVCaptureDeviceInput * input;
//@property (strong,nonatomic)AVCaptureMetadataOutput * output; //@property (strong,nonatomic)AVCaptureMetadataOutput * output;
@property (strong,nonatomic)AVCaptureVideoDataOutput * output; @property (strong,nonatomic)AVCaptureVideoDataOutput * output;
@property (strong,nonatomic)HmsScanOptions *options; //@property (strong,nonatomic)HmsScanOptions *options;
@property (strong,nonatomic)AVCaptureSession * session; @property (strong,nonatomic)AVCaptureSession * session;
@property (strong,nonatomic)AVCaptureVideoPreviewLayer * preview; @property (strong,nonatomic)AVCaptureVideoPreviewLayer * preview;
@property (nonatomic, strong) UIImageView * line; @property (nonatomic, strong) UIImageView * line;
...@@ -204,7 +204,7 @@ ...@@ -204,7 +204,7 @@
_preview.frame =self.layer.bounds; _preview.frame =self.layer.bounds;
[self.layer insertSublayer:_preview atIndex:0]; [self.layer insertSublayer:_preview atIndex:0];
// _options = [[HmsScanOptions alloc] initWithScanFormatType:ALL]; // _options = [[HmsScanOptions alloc] initWithScanFormatType:ALL];
_options = [[HmsScanOptions alloc] initWithScanFormatType:ALL]; // _options = [[HmsScanOptions alloc] initWithScanFormatType:ALL];
// typedef NS_ENUM(int, HMSScanFormatTypeCode) { // typedef NS_ENUM(int, HMSScanFormatTypeCode) {
// AZTEC = 1 << 0, // AZTEC = 1 << 0,
// CODABAR = 1 << 1, // CODABAR = 1 << 1,
...@@ -236,16 +236,16 @@ ...@@ -236,16 +236,16 @@
// QR_CODE | DATA_MATRIX表示只扫描QR和DataMatrix的码 // QR_CODE | DATA_MATRIX表示只扫描QR和DataMatrix的码
// HmsScanOptions *options = [[HmsScanOptions alloc] initWithScanFormatType:ALL]; // HmsScanOptions *options = [[HmsScanOptions alloc] initWithScanFormatType:ALL];
// 获取单码结果 // 获取单码结果
NSDictionary *sampleBufferDic = [HmsBitMap bitMapForSampleBuffer:sampleBuffer withOptions:_options]; // NSDictionary *sampleBufferDic = [HmsBitMap bitMapForSampleBuffer:sampleBuffer withOptions:_options];
//
if (sampleBufferDic && [sampleBufferDic objectForKey:@"parserDic"] && ![[sampleBufferDic objectForKey:@"parserDic"] isEqual:[NSNull null]]) { // if (sampleBufferDic && [sampleBufferDic objectForKey:@"parserDic"] && ![[sampleBufferDic objectForKey:@"parserDic"] isEqual:[NSNull null]]) {
NSLog(@"dic==%@",sampleBufferDic); // NSLog(@"dic==%@",sampleBufferDic);
NSLog(@"parserDic==%@",[sampleBufferDic objectForKey:@"parserDic"]); // NSLog(@"parserDic==%@",[sampleBufferDic objectForKey:@"parserDic"]);
NSDictionary *parserDic = [sampleBufferDic objectForKey:@"parserDic"]; // NSDictionary *parserDic = [sampleBufferDic objectForKey:@"parserDic"];
[_session stopRunning]; // [_session stopRunning];
[timer setFireDate:[NSDate distantFuture]]; // [timer setFireDate:[NSDate distantFuture]];
[self.delegate getQRCodeSwiftViewValue:[parserDic objectForKey:@"result"]]; // [self.delegate getQRCodeSwiftViewValue:[parserDic objectForKey:@"result"]];
} // }
} }
- (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputMetadataObjects:(NSArray *)metadataObjects fromConnection:(AVCaptureConnection *)connection - (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputMetadataObjects:(NSArray *)metadataObjects fromConnection:(AVCaptureConnection *)connection
......
...@@ -67,11 +67,18 @@ class RootTabBarViewController: UITabBarController,UITabBarControllerDelegate { ...@@ -67,11 +67,18 @@ class RootTabBarViewController: UITabBarController,UITabBarControllerDelegate {
return self.getNavigationWithVc(vc: homevc, title: "首页", img1: "tabbar_one_nor", selectImg:"tabbar_one_select") return self.getNavigationWithVc(vc: homevc, title: "首页", img1: "tabbar_one_nor", selectImg:"tabbar_one_select")
} }
func gainAdvisory()->UINavigationController{ func gainAdvisory()->UINavigationController{
let vc:AdvisoryRootViewController=AdvisoryRootViewController() // let vc:AdvisoryRootViewController=AdvisoryRootViewController()
let vc:WebSwiftViewController = WebSwiftViewController()
// let vc:WebSwiftTwoViewController = WebSwiftTwoViewController()
vc.isShowTitleType = IsShowTitleType.NoShowTitleType
vc.newType = NewType.OrdinaryNewsType
vc.appid = ""
vc.isTabBarVC = IsTabBarVC.isTabBarVC
vc.isEncryptionType = IsEncryptionType.NoEncryptionType
vc.isHomePushType = IsHomePushType.NOIsHomePushType
vc.webViewUrl = "http://222.66.127.246:8021/syqxerp/#/doneList?userId=199476&sysUserId=135965"
return self.getNavigationWithVc(vc: vc, title: "资讯", img1: "tabbar_two_nor", selectImg:"tabbar_two_select") return self.getNavigationWithVc(vc: vc, title: "资讯", img1: "tabbar_two_nor", selectImg:"tabbar_two_select")
} }
func gainService()->UINavigationController{ func gainService()->UINavigationController{
// let vc:ServiceViewController=ServiceViewController() // let vc:ServiceViewController=ServiceViewController()
let vc:UpcomingViewController = UpcomingViewController() let vc:UpcomingViewController = UpcomingViewController()
......
...@@ -30,18 +30,24 @@ class WebSwiftTwoViewController: BaseViewController { ...@@ -30,18 +30,24 @@ class WebSwiftTwoViewController: BaseViewController {
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
} }
func addWebView(){ func addWebView(){
if self.isShowTitleType == .NoShowTitleType {
self.navigationController?.setNavigationBarHidden(true, animated: true)
setNeedsStatusBarAppearanceUpdate()
webView.frame = CGRect(x:0, y: getStatusBarH(), width:SCREEN_WHIDTH() , height:SCREEN_HEIGHT()-getStatusBarH()-HEIGHT_BOTTOM_MARGIN() )
// setStatusBarBackgroundColor()
}else{
self.navigationController?.setNavigationBarHidden(false, animated: true)
self.wr_setNavBarBackgroundAlpha(1)
self.wr_setNavBarShadowImageHidden(false)
if #available(iOS 11.0, *) { if #available(iOS 11.0, *) {
webView.frame = CGRect(x:0, y: getStatusBarH(), width:SCREEN_WHIDTH() , height:SCREEN_HEIGHT()+HEIGHT_BOTTOM_MARGIN()-getStatusBarH() ) webView.frame = CGRect(x:0, y: getStatusBarH(), width:SCREEN_WHIDTH() , height:SCREEN_HEIGHT()+HEIGHT_BOTTOM_MARGIN()-getStatusBarH() )
// WKWebsiteDataStore.default().httpCookieStore
}else{ }else{
webView.frame = CGRect(x:0, y: 0, width:SCREEN_WHIDTH() , height:SCREEN_HEIGHT()+HEIGHT_BOTTOM_MARGIN()) webView.frame = CGRect(x:0, y: 0, width:SCREEN_WHIDTH() , height:SCREEN_HEIGHT()+HEIGHT_BOTTOM_MARGIN())
} }
let count = self.getWebCookie(urlStr: self.webViewUrl) }
let url2:NSURL = NSURL.init(string: WebActionOC.share().getUrl(self.webViewUrl))! let url2:NSURL = NSURL.init(string: WebActionOC.share().getUrl(self.webViewUrl))!
let urlRequest:NSMutableURLRequest = NSMutableURLRequest.init(url: url2 as URL) let urlRequest:NSMutableURLRequest = NSMutableURLRequest.init(url: url2 as URL)
// urlRequest.setValue(WebActionOC.share()?.getCookieValue((WebActionOC.share()?.encryptAES(count, key: self.appid))!, andWebView: webView) as String?, forHTTPHeaderField: "Cookie")
self.view.addSubview(webView)
// webView.load((urlRequest as NSMutableURLRequest) as URLRequest, mimeType: )
webView.loadRequest(urlRequest as URLRequest) webView.loadRequest(urlRequest as URLRequest)
......
...@@ -8,21 +8,21 @@ ...@@ -8,21 +8,21 @@
import Foundation import Foundation
import UIKit import UIKit
import ScanKitFrameWork //import ScanKitFrameWork
extension WebSwiftViewController { extension WebSwiftViewController {
func gotoQRVC() { // func gotoQRVC() {
self.hmsCustomScanViewController = HmsCustomScanViewController() // self.hmsCustomScanViewController = HmsCustomScanViewController()
self.hmsCustomScanViewController.customizedScanDelegate = self // self.hmsCustomScanViewController.customizedScanDelegate = self
self.hmsCustomScanViewController.backButtonHidden = false // self.hmsCustomScanViewController.backButtonHidden = false
self.hmsCustomScanViewController.continuouslyScan = true // self.hmsCustomScanViewController.continuouslyScan = true
self.pushViewController(viewController: self.hmsCustomScanViewController, animated: true) // self.pushViewController(viewController: self.hmsCustomScanViewController, animated: true)
//
} // }
func customizedScanDelegate(forResult resultDic: [AnyHashable : Any]!) { // func customizedScanDelegate(forResult resultDic: [AnyHashable : Any]!) {
print(resultDic) // print(resultDic)
} // }
} }
...@@ -11,6 +11,9 @@ import UIKit ...@@ -11,6 +11,9 @@ import UIKit
extension WebSwiftViewController { extension WebSwiftViewController {
@available(iOS 8.0, *) @available(iOS 8.0, *)
func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) { func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
if self.isTabBarVC == IsTabBarVC.isTabBarVC {
return
}
if self.title == nil || self.title?.count == 0 { if self.title == nil || self.title?.count == 0 {
self.title = webView.title self.title = webView.title
if webView.title?.count == 0 { if webView.title?.count == 0 {
......
...@@ -8,10 +8,11 @@ ...@@ -8,10 +8,11 @@
import UIKit import UIKit
//import GGWkCookie //import GGWkCookie
import ScanKitFrameWork //import ScanKitFrameWork
//CustomizedScanDelegate
class WebSwiftViewController: BaseViewController,WKUIDelegate,WKNavigationDelegate,WKScriptMessageHandler,CustomizedScanDelegate { class WebSwiftViewController: BaseViewController,WKUIDelegate,WKNavigationDelegate,WKScriptMessageHandler {
var newType:NewType = .OrdinaryNewsType var newType:NewType = .OrdinaryNewsType
var isTabBarVC:IsTabBarVC = .noIsTabBarVC
var isShowTitleType:IsShowTitleType = .YesShowTitleType var isShowTitleType:IsShowTitleType = .YesShowTitleType
var isHomePushType:IsHomePushType = .YesIsHomePushType var isHomePushType:IsHomePushType = .YesIsHomePushType
var webViewUrl:String? var webViewUrl:String?
...@@ -29,7 +30,7 @@ class WebSwiftViewController: BaseViewController,WKUIDelegate,WKNavigationDelega ...@@ -29,7 +30,7 @@ class WebSwiftViewController: BaseViewController,WKUIDelegate,WKNavigationDelega
var webCookieArray = NSArray() var webCookieArray = NSArray()
var hmsCustomScanViewController = HmsCustomScanViewController() // var hmsCustomScanViewController = HmsCustomScanViewController()
var documentController = UIDocumentInteractionController() var documentController = UIDocumentInteractionController()
///js调用原生方法名 ///js调用原生方法名
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment