Commit 4f08d75a authored by Alex朱枝文's avatar Alex朱枝文

扫码相关功能

parent 69a1a665
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
archiveVersion = 1; archiveVersion = 1;
classes = { classes = {
}; };
objectVersion = 70; objectVersion = 60;
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
...@@ -2661,7 +2661,7 @@ ...@@ -2661,7 +2661,7 @@
/* End PBXFileReference section */ /* End PBXFileReference section */
/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */ /* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
043F0ED92E02A60C003354EB /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = { 043F0ED92E02A60C003354EB /* Exceptions for "yinheReplayExt" folder in "yinheReplayExt" target */ = {
isa = PBXFileSystemSynchronizedBuildFileExceptionSet; isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
membershipExceptions = ( membershipExceptions = (
Info.plist, Info.plist,
...@@ -2671,7 +2671,18 @@ ...@@ -2671,7 +2671,18 @@
/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */ /* End PBXFileSystemSynchronizedBuildFileExceptionSet section */
/* Begin PBXFileSystemSynchronizedRootGroup section */ /* Begin PBXFileSystemSynchronizedRootGroup section */
043F0ECD2E02A60C003354EB /* yinheReplayExt */ = {isa = PBXFileSystemSynchronizedRootGroup; exceptions = (043F0ED92E02A60C003354EB /* PBXFileSystemSynchronizedBuildFileExceptionSet */, ); explicitFileTypes = {}; explicitFolders = (); path = yinheReplayExt; sourceTree = "<group>"; }; 043F0ECD2E02A60C003354EB /* yinheReplayExt */ = {
isa = PBXFileSystemSynchronizedRootGroup;
exceptions = (
043F0ED92E02A60C003354EB /* Exceptions for "yinheReplayExt" folder in "yinheReplayExt" target */,
);
explicitFileTypes = {
};
explicitFolders = (
);
path = yinheReplayExt;
sourceTree = "<group>";
};
/* End PBXFileSystemSynchronizedRootGroup section */ /* End PBXFileSystemSynchronizedRootGroup section */
/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
...@@ -7270,14 +7281,10 @@ ...@@ -7270,14 +7281,10 @@
inputFileListPaths = ( inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-galaxy/Pods-galaxy-frameworks-${CONFIGURATION}-input-files.xcfilelist", "${PODS_ROOT}/Target Support Files/Pods-galaxy/Pods-galaxy-frameworks-${CONFIGURATION}-input-files.xcfilelist",
); );
inputPaths = (
);
name = "[CP] Embed Pods Frameworks"; name = "[CP] Embed Pods Frameworks";
outputFileListPaths = ( outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-galaxy/Pods-galaxy-frameworks-${CONFIGURATION}-output-files.xcfilelist", "${PODS_ROOT}/Target Support Files/Pods-galaxy/Pods-galaxy-frameworks-${CONFIGURATION}-output-files.xcfilelist",
); );
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-galaxy/Pods-galaxy-frameworks.sh\"\n"; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-galaxy/Pods-galaxy-frameworks.sh\"\n";
...@@ -7291,14 +7298,10 @@ ...@@ -7291,14 +7298,10 @@
inputFileListPaths = ( inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-galaxy/Pods-galaxy-resources-${CONFIGURATION}-input-files.xcfilelist", "${PODS_ROOT}/Target Support Files/Pods-galaxy/Pods-galaxy-resources-${CONFIGURATION}-input-files.xcfilelist",
); );
inputPaths = (
);
name = "[CP] Copy Pods Resources"; name = "[CP] Copy Pods Resources";
outputFileListPaths = ( outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-galaxy/Pods-galaxy-resources-${CONFIGURATION}-output-files.xcfilelist", "${PODS_ROOT}/Target Support Files/Pods-galaxy/Pods-galaxy-resources-${CONFIGURATION}-output-files.xcfilelist",
); );
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-galaxy/Pods-galaxy-resources.sh\"\n"; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-galaxy/Pods-galaxy-resources.sh\"\n";
......
...@@ -26,10 +26,18 @@ class YHScanViewController: LBXScanViewController { ...@@ -26,10 +26,18 @@ class YHScanViewController: LBXScanViewController {
setupScanStyle() setupScanStyle()
} }
override func handleCodeResult(arrayResult: [LBXScanResult]) { override func viewDidAppear(_ animated: Bool) {
// super.viewDidAppear(animated)
let navBar = gk_navigationBar
if view.subviews.contains(navBar) {
view.bringSubviewToFront(navBar)
}
} }
// override func handleCodeResult(arrayResult: [LBXScanResult]) {
// //
// }
deinit { deinit {
// //
} }
......
...@@ -11,7 +11,7 @@ import Foundation ...@@ -11,7 +11,7 @@ import Foundation
import AVFoundation import AVFoundation
protocol LBXScanViewControllerDelegate: AnyObject { protocol LBXScanViewControllerDelegate: AnyObject {
func scanFinished(scanResult: LBXScanResult, error: String?) func scanFinished(scanResult: LBXScanResult?, error: String?)
} }
protocol QRRectDelegate: AnyObject { protocol QRRectDelegate: AnyObject {
...@@ -45,7 +45,6 @@ class LBXScanViewController: YHBaseViewController, UIImagePickerControllerDelega ...@@ -45,7 +45,6 @@ class LBXScanViewController: YHBaseViewController, UIImagePickerControllerDelega
override open func viewDidLoad() { override open func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
self.view.backgroundColor = UIColor.black self.view.backgroundColor = UIColor.black
drawScanView()
// self.edgesForExtendedLayout = UIRectEdge(rawValue: 0) // self.edgesForExtendedLayout = UIRectEdge(rawValue: 0)
} }
...@@ -60,6 +59,7 @@ class LBXScanViewController: YHBaseViewController, UIImagePickerControllerDelega ...@@ -60,6 +59,7 @@ class LBXScanViewController: YHBaseViewController, UIImagePickerControllerDelega
override open func viewDidAppear(_ animated: Bool) { override open func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated) super.viewDidAppear(animated)
drawScanView()
LBXPermissions.authorizeCameraWith { [weak self] granted in LBXPermissions.authorizeCameraWith { [weak self] granted in
...@@ -135,15 +135,28 @@ class LBXScanViewController: YHBaseViewController, UIImagePickerControllerDelega ...@@ -135,15 +135,28 @@ class LBXScanViewController: YHBaseViewController, UIImagePickerControllerDelega
open func handleCodeResult(arrayResult: [LBXScanResult]) { open func handleCodeResult(arrayResult: [LBXScanResult]) {
if let delegate = scanResultDelegate { if let delegate = scanResultDelegate {
self.navigationController?.popViewController(animated: true) self.navigationController?.popViewController(animated: true)
let result: LBXScanResult = arrayResult[0] if arrayResult.count > 0 {
delegate.scanFinished(scanResult: result, error: nil) let result: LBXScanResult = arrayResult[0]
delegate.scanFinished(scanResult: result, error: nil)
} else {
delegate.scanFinished(scanResult: nil, error: "扫码结束,无结果")
}
} else { } else {
for result: LBXScanResult in arrayResult { for result: LBXScanResult in arrayResult {
debugPrint("%@", result.strScanned ?? "") debugPrint("%@", result.strScanned ?? "")
} }
let result: LBXScanResult = arrayResult[0] if arrayResult.count > 0 {
YHCommonAlertView.show(result.strBarCodeType, result.strScanned, "", "确定", fullGuestureEnable: false) { let result: LBXScanResult = arrayResult[0]
} callBack: { YHCommonAlertView.show(result.strBarCodeType, result.strScanned, "", "确定", fullGuestureEnable: false) {
} callBack: { [weak self] in
self?.startScan()
}
} else {
YHCommonAlertView.show("", "扫码结束,无结果", "", "确定", fullGuestureEnable: false) {
} callBack: { [weak self] in
self?.startScan()
}
} }
} }
} }
......
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