Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
galaxy-iOS
Project
Project
Details
Activity
Releases
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
mobile-group
galaxy-iOS
Commits
06fa05f9
Commit
06fa05f9
authored
Mar 06, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
点击预览
parent
5874af92
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
121 additions
and
2 deletions
+121
-2
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+4
-0
YHHomeViewController.swift
...axy/Classes/Modules/Home(首页)/C/YHHomeViewController.swift
+4
-0
YHWorkExperienceViewController.swift
...rkExperience(工作经验)/C/YHWorkExperienceViewController.swift
+4
-0
YHCompanyViewModel.swift
...)/WorkExperience(工作经验)/ViewModel/YHCompanyViewModel.swift
+0
-2
YHNewWebViewController.swift
.../Classes/Modules/Login(登录)/C/YHNewWebViewController.swift
+109
-0
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
06fa05f9
...
...
@@ -80,6 +80,7 @@
046975122B96C77000A0CB66
/* YHClipperButton.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
046975112B96C77000A0CB66
/* YHClipperButton.swift */
;
};
046975162B96EB2200A0CB66
/* YHImageResultViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
046975152B96EB2200A0CB66
/* YHImageResultViewController.swift */
;
};
046975182B96EEB200A0CB66
/* YHResultBottomView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
046975172B96EEB200A0CB66
/* YHResultBottomView.swift */
;
};
047294E82B988A19008E0B84
/* YHNewWebViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
047294E72B988A19008E0B84
/* YHNewWebViewController.swift */
;
};
04754A952B96FF3D00F8ADCA
/* UITextField+Extension.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04754A942B96FF3D00F8ADCA
/* UITextField+Extension.swift */
;
};
04808C062B4686510056D53C
/* ATAuthSDK.bundle in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04808C042B4686510056D53C
/* ATAuthSDK.bundle */
;
};
04808C082B4686C10056D53C
/* ATAuthSDK_D.framework in Embed Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04808C032B4686510056D53C
/* ATAuthSDK_D.framework */
;
settings
=
{
ATTRIBUTES
=
(
CodeSignOnCopy
,
RemoveHeadersOnCopy
,
);
};
};
...
...
@@ -398,6 +399,7 @@
046975112B96C77000A0CB66
/* YHClipperButton.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHClipperButton.swift
;
sourceTree
=
"<group>"
;
};
046975152B96EB2200A0CB66
/* YHImageResultViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHImageResultViewController.swift
;
sourceTree
=
"<group>"
;
};
046975172B96EEB200A0CB66
/* YHResultBottomView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHResultBottomView.swift
;
sourceTree
=
"<group>"
;
};
047294E72B988A19008E0B84
/* YHNewWebViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHNewWebViewController.swift
;
sourceTree
=
"<group>"
;
};
04754A942B96FF3D00F8ADCA
/* UITextField+Extension.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
"UITextField+Extension.swift"
;
sourceTree
=
"<group>"
;
};
04808C032B4686510056D53C
/* ATAuthSDK_D.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
path
=
ATAuthSDK_D.framework
;
sourceTree
=
"<group>"
;
};
04808C042B4686510056D53C
/* ATAuthSDK.bundle */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
"wrapper.plug-in"
;
path
=
ATAuthSDK.bundle
;
sourceTree
=
"<group>"
;
};
...
...
@@ -1322,6 +1324,7 @@
04E86E082B707ACE00A35F4B
/* YHPhoneLoginViewController.swift */
,
04E86E0A2B70C13300A35F4B
/* YHCodeSueecssViewController.swift */
,
04E86E0C2B70D51D00A35F4B
/* YHWebViewViewController.swift */
,
047294E72B988A19008E0B84
/* YHNewWebViewController.swift */
,
);
path
=
C
;
sourceTree
=
"<group>"
;
...
...
@@ -2099,6 +2102,7 @@
04D5C5662B8ED92600190021
/* YHBaseModel.swift in Sources */
,
04E86E492B8445F400A35F4B
/* YHWorkActionView.swift in Sources */
,
A5ACE9272B4564F7002C94D2
/* YHLoginViewController.swift in Sources */
,
047294E82B988A19008E0B84
/* YHNewWebViewController.swift in Sources */
,
);
runOnlyForDeploymentPostprocessing
=
0
;
};
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHHomeViewController.swift
View file @
06fa05f9
...
...
@@ -401,6 +401,10 @@ extension YHHomeViewController : UITableViewDelegate,UITableViewDataSource {
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
tableView
.
deselectRow
(
at
:
indexPath
,
animated
:
true
)
printLog
(
"点击了 tableView Cell
\(
indexPath
.
row
)
"
)
let
vc
=
YHWebViewViewController
()
vc
.
url
=
"https://cloudapi.qiyuesuo.cn/contract/share/3202449385770287813?openPageToken=dd333ac2-88cd-40f8-b985-dc00c7c2f90a"
self
.
navigationController
?
.
pushViewController
(
vc
)
// https://cloudapi.qiyuesuo.cn/contract/share/3202449385770287813?openPageToken=d004e5af-aab9-43e4-b813-c5a6a8c16497
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/WorkExperience(工作经验)/C/YHWorkExperienceViewController.swift
View file @
06fa05f9
...
...
@@ -379,6 +379,10 @@ extension YHWorkExperienceViewController: UITableViewDelegate, UITableViewDataSo
return
}
}
}
else
{
let
vc
=
YHImageViewController
()
vc
.
imgString
=
model
.
fileUrl
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
}
}
return
cell
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/WorkExperience(工作经验)/ViewModel/YHCompanyViewModel.swift
View file @
06fa05f9
...
...
@@ -29,11 +29,9 @@ class YHCompanyViewModel: YHBaseViewModel {
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
)
callBackBlock
([],
error
)
}
}
failBlock
:
{
err
in
callBackBlock
([],
err
)
}
}
}
galaxy/galaxy/Classes/Modules/Login(登录)/C/YHNewWebViewController.swift
0 → 100644
View file @
06fa05f9
//
// YHNewWebViewController.swift
// galaxy
//
// Created by EDY on 2024/3/6.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
import
WebKit
class
YHNewWebViewController
:
YHBaseViewController
,
WKUIDelegate
,
WKNavigationDelegate
{
var
webview
=
WKWebView
()
var
progBar
=
UIProgressView
()
var
url
=
"https://www.baidu.com"
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
gk_navBackgroundColor
=
.
clear
gk_navShadowColor
=
.
clear
gk_navigationBar
.
isHidden
=
true
// 创建wkwebview
webview
=
WKWebView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
self
.
view
.
frame
.
width
,
height
:
self
.
view
.
frame
.
height
))
webview
.
navigationDelegate
=
self
// 创建网址
let
url
=
NSURL
(
string
:
url
)
// 创建请求
let
request
=
NSURLRequest
(
url
:
url
!
as
URL
)
// 加载请求
webview
.
load
(
request
as
URLRequest
)
// 添加wkwebview
self
.
view
.
addSubview
(
webview
)
// // 加载网页的进度条
// progBar = UIProgressView(frame: CGRect(x: 0, y: 0, width: self.view.frame.width, height: 30))
// progBar.progress = 0.0
// progBar.tintColor = UIColor.brandMainColor
// webview.addSubview(progBar)
// // 监听网页加载的进度
// webview.addObserver(self, forKeyPath: "estimatedProgress", options: .new, context: nil)
}
override
func
viewWillDisappear
(
_
animated
:
Bool
)
{
// webview.removeObserver(self, forKeyPath: "estimatedProgress")
}
// MARK: - WKNavigationDelegate
func
webView
(
_
webView
:
WKWebView
,
didFinish
navigation
:
WKNavigation
!
)
{
self
.
navigationItem
.
title
=
webview
.
title
}
// MARK: - WKUIDelegate
func
webView
(
_
webView
:
WKWebView
,
createWebViewWith
configuration
:
WKWebViewConfiguration
,
for
navigationAction
:
WKNavigationAction
,
windowFeatures
:
WKWindowFeatures
)
->
WKWebView
?
{
// 实现非安全链接的跳转。如果目标主视图不为空,则允许导航
if
!
(
navigationAction
.
targetFrame
?
.
isMainFrame
!=
nil
)
{
webview
.
load
(
navigationAction
.
request
)
}
return
nil
}
func
webView
(
_
webView
:
WKWebView
,
runJavaScriptAlertPanelWithMessage
message
:
String
,
initiatedByFrame
frame
:
WKFrameInfo
,
completionHandler
:
@escaping
()
->
Void
)
{
// 修复弹窗弹出的问题
let
alert
=
UIAlertController
(
title
:
nil
,
message
:
message
,
preferredStyle
:
.
alert
)
alert
.
addAction
(
UIAlertAction
(
title
:
"Ok"
,
style
:
.
default
,
handler
:
{
(
_
)
->
Void
in
completionHandler
()
}))
self
.
present
(
alert
,
animated
:
true
,
completion
:
nil
)
}
// MARK: - webview function
@objc
func
toBack
()
{
if
webview
.
canGoBack
{
webview
.
goBack
()
}
}
@objc
func
toForward
()
{
if
webview
.
canGoForward
{
webview
.
goForward
()
}
}
// MARK: - KVO
override
func
observeValue
(
forKeyPath
keyPath
:
String
?,
of
object
:
Any
?,
change
:
[
NSKeyValueChangeKey
:
Any
]?,
context
:
UnsafeMutableRawPointer
?)
{
if
keyPath
==
"estimatedProgress"
{
self
.
progBar
.
alpha
=
1.0
progBar
.
setProgress
(
Float
(
webview
.
estimatedProgress
),
animated
:
true
)
//进度条的值最大为1.0
if
(
self
.
webview
.
estimatedProgress
>=
1.0
)
{
UIView
.
animate
(
withDuration
:
0.3
,
delay
:
0.1
,
options
:
.
curveEaseInOut
,
animations
:
{
()
->
Void
in
self
.
progBar
.
alpha
=
0.0
},
completion
:
{
(
finished
:
Bool
)
->
Void
in
self
.
progBar
.
progress
=
0
})
}
}
}
override
class
func
observeValue
(
forKeyPath
keyPath
:
String
?,
of
object
:
Any
?,
change
:
[
NSKeyValueChangeKey
:
Any
]?,
context
:
UnsafeMutableRawPointer
?)
{
}
}
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