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
2c30ba3d
Commit
2c30ba3d
authored
Jul 18, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、处理几处bug
2、首页UI 调整
parent
829196a1
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
511 additions
and
59 deletions
+511
-59
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+8
-0
Applegate(JPush).swift
galaxy/galaxy/Applegate(JPush).swift
+0
-2
YHEvaluationViewVC.swift
...alaxy/Classes/Modules/Home(首页)/C/YHEvaluationViewVC.swift
+230
-0
YHHomePageViewController.swift
...Classes/Modules/Home(首页)/C/YHHomePageViewController.swift
+10
-5
YHHomeWebViewController.swift
.../Classes/Modules/Home(首页)/C/YHHomeWebViewController.swift
+0
-4
YHAiRadarAreaView.swift
...galaxy/Classes/Modules/Home(首页)/V/YHAiRadarAreaView.swift
+14
-2
YHEvaluationView.swift
.../galaxy/Classes/Modules/Home(首页)/V/YHEvaluationView.swift
+113
-0
YHHomeHeadView.swift
...xy/galaxy/Classes/Modules/Home(首页)/V/YHHomeHeadView.swift
+42
-37
YHMySignatureDetailViewController.swift
...Signature(我的签字)/C/YHMySignatureDetailViewController.swift
+1
-1
YHMyFileMethodTableViewCell.swift
...中心)/MySignature(我的签字)/V/YHMyFileMethodTableViewCell.swift
+2
-2
YHShareManager.swift
galaxy/galaxy/Classes/Tools/Analytics/YHShareManager.swift
+19
-6
Contents.json
.../galaxy/Res/Assets.xcassets/Home/Evaluation/Contents.json
+6
-0
Contents.json
...ets/Home/Evaluation/evaluation_bkg.imageset/Contents.json
+22
-0
Group 2033194990@2x.png
...valuation/evaluation_bkg.imageset/Group 2033194990@2x.png
+0
-0
Group 2033194990@3x.png
...valuation/evaluation_bkg.imageset/Group 2033194990@3x.png
+0
-0
Contents.json
.../Home/Evaluation/evaluation_button.imageset/Contents.json
+22
-0
Group 2033194964@2x.png
...uation/evaluation_button.imageset/Group 2033194964@2x.png
+0
-0
Group 2033194964@3x.png
...uation/evaluation_button.imageset/Group 2033194964@3x.png
+0
-0
Contents.json
...ts/Home/Evaluation/evaluation_icon.imageset/Contents.json
+22
-0
激活身份@2x.png
...sets/Home/Evaluation/evaluation_icon.imageset/激活身份@2x.png
+0
-0
激活身份@3x.png
...sets/Home/Evaluation/evaluation_icon.imageset/激活身份@3x.png
+0
-0
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
2c30ba3d
...
...
@@ -472,6 +472,8 @@
A592FE932BA6CFFC0062FACA
/* YHCertificateEntryBottomView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A592FE922BA6CFFC0062FACA
/* YHCertificateEntryBottomView.swift */
;
};
A592FE952BA6D23C0062FACA
/* YHCertificateEntryCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A592FE942BA6D23C0062FACA
/* YHCertificateEntryCell.swift */
;
};
A592FE972BA6DB340062FACA
/* YHCertificateViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A592FE962BA6DB340062FACA
/* YHCertificateViewModel.swift */
;
};
A59B43C72C48F68200B28379
/* YHEvaluationView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A59B43C62C48F68200B28379
/* YHEvaluationView.swift */
;
};
A59B43C92C491FB100B28379
/* YHEvaluationViewVC.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A59B43C82C491FB100B28379
/* YHEvaluationViewVC.swift */
;
};
A5A89FD72C256B94005A71DD
/* YHHomeLastMessageModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5A89FD62C256B94005A71DD
/* YHHomeLastMessageModel.swift */
;
};
A5ACE9282B4564F7002C94D2
/* YHSmsCodeView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5ACE8DE2B4564F7002C94D2
/* YHSmsCodeView.swift */
;
};
A5ACE9292B4564F7002C94D2
/* YHSmsCodeInputView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A5ACE8E02B4564F7002C94D2
/* YHSmsCodeInputView.swift */
;
};
...
...
@@ -1060,6 +1062,8 @@
A592FE922BA6CFFC0062FACA
/* YHCertificateEntryBottomView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCertificateEntryBottomView.swift
;
sourceTree
=
"<group>"
;
};
A592FE942BA6D23C0062FACA
/* YHCertificateEntryCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCertificateEntryCell.swift
;
sourceTree
=
"<group>"
;
};
A592FE962BA6DB340062FACA
/* YHCertificateViewModel.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCertificateViewModel.swift
;
sourceTree
=
"<group>"
;
};
A59B43C62C48F68200B28379
/* YHEvaluationView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHEvaluationView.swift
;
sourceTree
=
"<group>"
;
};
A59B43C82C491FB100B28379
/* YHEvaluationViewVC.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHEvaluationViewVC.swift
;
sourceTree
=
"<group>"
;
};
A5A89FD62C256B94005A71DD
/* YHHomeLastMessageModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHHomeLastMessageModel.swift
;
sourceTree
=
"<group>"
;
};
A5ACE8DE2B4564F7002C94D2
/* YHSmsCodeView.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHSmsCodeView.swift
;
sourceTree
=
"<group>"
;
};
A5ACE8E02B4564F7002C94D2
/* YHSmsCodeInputView.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHSmsCodeInputView.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -2524,6 +2528,7 @@
A567E57A2BD7643D00D5D5A0
/* YHConfigManager.swift */
,
A567E5762BD7643D00D5D5A0
/* YHHomePageViewController.swift */
,
A5000F502C3BC28B00843452
/* YHHomeHoldViewPageViewController.swift */
,
A59B43C82C491FB100B28379
/* YHEvaluationViewVC.swift */
,
);
path
=
C
;
sourceTree
=
"<group>"
;
...
...
@@ -2559,6 +2564,7 @@
A566A7992C219FA400980D06
/* YHHomeSalonAreaView.swift */
,
A566A79B2C227C9B00980D06
/* YHOrderTipsItemView.swift */
,
04C85DE02C3677CB008B20D6
/* YHConsultantQRCodeView.swift */
,
A59B43C62C48F68200B28379
/* YHEvaluationView.swift */
,
);
path
=
V
;
sourceTree
=
"<group>"
;
...
...
@@ -3404,6 +3410,7 @@
A567E59C2BD7643D00D5D5A0
/* YHSearchInfomationVC.swift in Sources */
,
04174D732BCD5B74000BA46D
/* YHMsgViewModel.swift in Sources */
,
A567E5952BD7643D00D5D5A0
/* YHHomeClassifyModel.swift in Sources */
,
A59B43C72C48F68200B28379
/* YHEvaluationView.swift in Sources */
,
045EEF122B9F171A0022A143
/* YHCNIDCardModel.swift in Sources */
,
045EEF032B9F171A0022A143
/* YHFormItemDoubleChoiceCell.swift in Sources */
,
045EEEAE2B9F171A0022A143
/* YHWorkHighlightsTableViewCell.swift in Sources */
,
...
...
@@ -3417,6 +3424,7 @@
A53B61192BB3C9960010B573
/* YHMyDocListHeaderView.swift in Sources */
,
A567E5B22BD7643D00D5D5A0
/* YHHomeBannerCollectionViewCell.swift in Sources */
,
045EEF082B9F171A0022A143
/* YHBasicInfoCellModel.swift in Sources */
,
A59B43C92C491FB100B28379
/* YHEvaluationViewVC.swift in Sources */
,
0488518F2BF5FD1500C4E32D
/* YHOSSManager.swift in Sources */
,
A592FE952BA6D23C0062FACA
/* YHCertificateEntryCell.swift in Sources */
,
A5ACE9472B4564F7002C94D2
/* YHHUD.swift in Sources */
,
...
...
galaxy/galaxy/Applegate(JPush).swift
View file @
2c30ba3d
...
...
@@ -34,8 +34,6 @@ extension AppDelegate: JPUSHRegisterDelegate {
let
isProduction
=
false
#elseif TESTENV
let
isProduction
=
true
#elseif TESTENV
let
isProduction
=
true
#else
let
isProduction
=
true
#endif
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHEvaluationViewVC.swift
0 → 100644
View file @
2c30ba3d
//
// YHEvaluationViewVC.swift
// galaxy
//
// Created by davidhuangA on 2024/7/18.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
import
WebKit
class
YHEvaluationViewVC
:
YHBaseViewController
,
WKUIDelegate
,
WKNavigationDelegate
{
var
webview
=
WKWebView
()
var
progBar
=
UIProgressView
()
var
url
=
"https://www.baidu.com/"
lazy
var
noNetWorkTipsView
:
YHEmptyDataView
=
{
let
view
=
YHEmptyDataView
.
createView
(
"无网络"
,
kNotNetWorkBgName
)
view
.
topMargin
=
222
view
.
backgroundColor
=
.
white
view
.
isHidden
=
true
return
view
}()
//是否曾今有过网络
private
var
isNetWorkOkBefore
:
Bool
=
false
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
gk_navBarAlpha
=
1.0
gk_navLineHidden
=
false
NotificationCenter
.
default
.
addObserver
(
self
,
selector
:
#selector(
updateNetWorkUI
)
,
name
:
.
reachabilityChanged
,
object
:
nil
)
view
.
backgroundColor
=
.
white
//获取导航栏高度
let
navHeight
=
self
.
navigationController
?
.
navigationBar
.
frame
.
height
//获取状态栏高度
let
statusHeight
=
k_Height_statusBar
()
// 创建wkwebview
webview
=
WKWebView
(
frame
:
CGRect
(
x
:
0
,
y
:
statusHeight
+
navHeight
!
,
width
:
self
.
view
.
frame
.
width
,
height
:
self
.
view
.
frame
.
height
-
statusHeight
-
navHeight
!
-
59
-
k_Height_safeAreaInsetsBottom
()))
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
)
webview
.
snp
.
makeConstraints
{
make
in
make
.
edges
.
equalToSuperview
()
}
webview
.
scrollView
.
contentInsetAdjustmentBehavior
=
.
never
// 加载网页的进度条
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
)
view
.
addSubview
(
noNetWorkTipsView
)
self
.
noNetWorkTipsView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
bottom
.
equalToSuperview
()
make
.
top
.
equalToSuperview
()
.
offset
(
k_Height_NavigationtBarAndStatuBar
)
}
updateNetWorkStatusUI
(
needReload
:
false
)
}
deinit
{
webview
.
removeObserver
(
self
,
forKeyPath
:
"estimatedProgress"
)
NotificationCenter
.
default
.
removeObserver
(
self
)
}
}
// MARK: - 内部方法
private
extension
YHEvaluationViewVC
{
func
addRightItems
()
{
let
rightButtonItem
=
UIBarButtonItem
(
image
:
UIImage
(
named
:
"share_item"
)?
.
withRenderingMode
(
.
alwaysOriginal
),
style
:
.
plain
,
target
:
self
,
action
:
#selector(
share
)
)
gk_navRightBarButtonItem
=
rightButtonItem
gk_navItemRightSpace
=
16
}
@objc
func
share
()
{
if
!
YHNetworkStatusManager
.
shared
.
isNetWorkOK
{
YHHUD
.
flash
(
message
:
"网络不可用,请检查网络设置"
)
return
}
// YHShareManager.shared.sendLinkContent("", "", , link: self.url)
// YHShareManager.shared.sendLinkContent(link: "https://www.baidu.com/")
YHShareManager
.
shared
.
sendLinkContent
(
"Nick哥:我是标题"
,
"Nick哥-这是分享描述"
,
UIImage
(
named
:
"AppIcon"
)
??
UIImage
(),
link
:
"https://www.baidu.com/"
)
YHShareManager
.
shared
.
sendMiniProgram
(
path
:
<
#
T
##
String
#
>
,
name
:
<
#
T
##
String
#
>
)
// if YHLoginManager.shared.isLogin() {
// if vcTitle == "香港身份测评码" {
// guard let url = URL(string: url) else {
// return
// }
// let task = URLSession.shared.dataTask(with: url) { data, response, error in
// DispatchQueue.main.async {
// guard let data = data, error == nil else { return }
// let image = UIImage(data: data)
// if let image = image {
// YHShareManager.shared.sendImageContent(image)
// }
// }
// }
// task.resume()
// } else {
// guard let url = URL(string: self.model.img_url) else {
// return
// }
// let task = URLSession.shared.dataTask(with: url) { data, response, error in
// DispatchQueue.main.async {
// guard let data = data, error == nil else { return }
// let image = UIImage(data: data)
// if let image = image {
// YHShareManager.shared.sendLinkContent(self.model.title, "", image, link: self.url)
// }
// }
// }
// task.resume()
// }
// } else {
// YHOneKeyLoginManager.shared.oneKeyLogin()
// }
}
@objc
func
updateNetWorkUI
()
{
updateNetWorkStatusUI
(
needReload
:
true
)
}
func
updateNetWorkStatusUI
(
needReload
:
Bool
)
{
DispatchQueue
.
main
.
async
{
if
YHNetworkStatusManager
.
shared
.
isNetWorkOK
{
if
needReload
&&
self
.
isNetWorkOkBefore
==
false
{
self
.
webview
.
stopLoading
()
let
targetUrl
=
NSURL
(
string
:
self
.
url
)
let
request
=
NSURLRequest
(
url
:
targetUrl
!
as
URL
)
self
.
webview
.
load
(
request
as
URLRequest
)
}
self
.
isNetWorkOkBefore
=
true
}
if
self
.
isNetWorkOkBefore
==
false
{
self
.
view
.
bringSubviewToFront
(
self
.
noNetWorkTipsView
)
self
.
noNetWorkTipsView
.
isHidden
=
YHNetworkStatusManager
.
shared
.
isNetWorkOK
}
else
{
self
.
noNetWorkTipsView
.
isHidden
=
true
}
}
}
// MARK: - webview function
@objc
func
toBack
()
{
if
webview
.
canGoBack
{
webview
.
goBack
()
}
}
@objc
func
toForward
()
{
if
webview
.
canGoForward
{
webview
.
goForward
()
}
}
}
// MARK: - WKNavigationDelegate
extension
YHEvaluationViewVC
{
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
?)
{
}
func
webView
(
_
webView
:
WKWebView
,
didFinish
navigation
:
WKNavigation
!
)
{
addRightItems
()
}
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
)
}
func
webView
(
_
webView
:
WKWebView
,
didFailProvisionalNavigation
navigation
:
WKNavigation
!
,
withError
error
:
Error
)
{
printLog
(
"
\(
error
.
localizedDescription
)
"
)
}
}
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHHomePageViewController.swift
View file @
2c30ba3d
...
...
@@ -23,7 +23,7 @@ class YHHomePageViewController: YHBaseViewController {
let
serviceCenterMainReqVM
:
YHServiceCenterMainViewModel
=
YHServiceCenterMainViewModel
()
var
homeHeaderViewHeight
=
YHHomeHeadView
.
fixViewH
var
homeHeaderViewHeight
:
CGFloat
=
0.0
// = self.homeHeaderView.getHomeHeadViewH(showTips: false)
lazy
var
homeCollectView
=
{
...
...
@@ -67,7 +67,7 @@ private extension YHHomePageViewController {
// 是否展示订单提示视图
func
showOrderTipsView
(
_
show
:
Bool
)
{
homeHeaderViewHeight
=
show
?
homeHeaderView
.
homeHeadViewH
:
YHHomeHeadView
.
fixViewH
homeHeaderViewHeight
=
homeHeaderView
.
getHomeHeadViewH
(
showTips
:
show
)
//
show ? homeHeaderView.homeHeadViewH : YHHomeHeadView.fixViewH
homeHeaderView
.
frame
=
CGRect
(
x
:
20
,
y
:
-
homeHeaderViewHeight
,
width
:
KScreenWidth
-
40
,
height
:
homeHeaderViewHeight
)
homeHeaderView
.
isNeedHideOrderTipsView
=
!
show
homeCollectView
.
contentInset
=
UIEdgeInsets
(
top
:
homeHeaderViewHeight
,
left
:
0
,
bottom
:
0
,
right
:
0
)
...
...
@@ -225,16 +225,21 @@ private extension YHHomePageViewController {
make
.
bottom
.
equalToSuperview
()
}
homeHeaderView
.
frame
=
CGRect
(
x
:
20
,
y
:
-
YHHomeHeadView
.
fixViewH
,
width
:
KScreenWidth
-
40
,
height
:
YHHomeHeadView
.
fixViewH
)
let
headViewH
:
CGFloat
=
homeHeaderView
.
getHomeHeadViewH
(
showTips
:
false
)
homeHeaderViewHeight
=
headViewH
homeHeaderView
.
isNeedHideOrderTipsView
=
false
homeHeaderView
.
frame
=
CGRect
(
x
:
20
,
y
:
-
headViewH
,
width
:
KScreenWidth
-
40
,
height
:
headViewH
)
homeCollectView
.
addSubview
(
homeHeaderView
)
homeCollectView
.
contentInset
=
UIEdgeInsets
(
top
:
YHHomeHeadView
.
fix
ViewH
,
left
:
0
,
bottom
:
0
,
right
:
0
)
homeCollectView
.
contentInset
=
UIEdgeInsets
(
top
:
head
ViewH
,
left
:
0
,
bottom
:
0
,
right
:
0
)
let
tmpHeadView
=
homeCollectView
.
es
.
addYHPullToRefresh
{
self
.
getData
()
}
var
r
=
tmpHeadView
.
frame
r
.
origin
.
y
=
r
.
origin
.
y
-
YHHomeHeadView
.
fix
ViewH
r
.
origin
.
y
=
r
.
origin
.
y
-
head
ViewH
tmpHeadView
.
frame
=
r
printLog
(
tmpHeadView
.
frame
)
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHHomeWebViewController.swift
View file @
2c30ba3d
...
...
@@ -463,14 +463,10 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
}
}
extension
YHHomeWebViewController
{
func
addRightItems
()
{
let
rightButtonItem
=
UIBarButtonItem
(
image
:
UIImage
(
named
:
"share_item"
)?
.
withRenderingMode
(
.
alwaysOriginal
),
style
:
.
plain
,
target
:
self
,
action
:
#selector(
share
)
)
gk_navRightBarButtonItem
=
rightButtonItem
gk_navItemRightSpace
=
16
}
}
galaxy/galaxy/Classes/Modules/Home(首页)/V/YHAiRadarAreaView.swift
View file @
2c30ba3d
...
...
@@ -51,14 +51,26 @@ class YHAiRadarAreaView: UIView {
return
lable
}()
//
// lazy var lable3: UILabel = {
// let lable : UILabel = UILabel()
// lable.text = "前往查看"
// lable.font = UIFont.PFSC_R(ofSize: 13)
// lable.textColor = UIColor.white
// lable.backgroundColor = UIColor.brandMainColor
// lable.textAlignment = .center
// return lable
// }()
lazy
var
lable3
:
UILabel
=
{
let
lable
:
UILabel
=
UILabel
()
lable
.
text
=
"前往查看"
lable
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
13
)
lable
.
textColor
=
UIColor
.
white
lable
.
backgroundColor
=
UIColor
.
brandMainColor
lable
.
textColor
=
UIColor
.
mainTextColor
lable
.
textAlignment
=
.
center
lable
.
layer
.
borderColor
=
UIColor
.
mainTextColor18
.
cgColor
lable
.
layer
.
borderWidth
=
1
return
lable
}()
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/V/YHEvaluationView.swift
0 → 100644
View file @
2c30ba3d
//
// YHEvaluationView.swift
// galaxy
//
// Created by davidhuangA on 2024/7/18.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
import
AttributedString
class
YHEvaluationView
:
UIView
{
static
let
viewH
=
82.0
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
setupUI
()
let
tap
:
UITapGestureRecognizer
=
UITapGestureRecognizer
(
target
:
self
,
action
:
#selector(
tapButton(gestureRecognizer:)
)
)
addGestureRecognizer
(
tap
)
}
required
init
?(
coder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
}
lazy
var
bkgImageV
:
UIImageView
=
{
let
imgV
:
UIImageView
=
UIImageView
()
imgV
.
contentMode
=
.
scaleAspectFill
imgV
.
image
=
UIImage
(
named
:
"evaluation_bkg"
)
imgV
.
clipsToBounds
=
true
return
imgV
}()
lazy
var
lable1
:
UILabel
=
{
let
lable
:
UILabel
=
UILabel
()
lable
.
text
=
"香港身份20秒测评"
lable
.
font
=
UIFont
.
PFSC_B
(
ofSize
:
17
)
lable
.
textColor
=
UIColor
.
mainTextColor
return
lable
}()
lazy
var
iconImageV
:
UIImageView
=
{
let
imgV
:
UIImageView
=
UIImageView
()
imgV
.
contentMode
=
.
scaleAspectFill
imgV
.
image
=
UIImage
(
named
:
"evaluation_icon"
)
imgV
.
clipsToBounds
=
true
return
imgV
}()
lazy
var
buttonImageV
:
UIImageView
=
{
let
imgV
:
UIImageView
=
UIImageView
()
imgV
.
contentMode
=
.
scaleAspectFill
imgV
.
image
=
UIImage
(
named
:
"evaluation_button"
)
imgV
.
clipsToBounds
=
true
return
imgV
}()
}
extension
YHEvaluationView
{
@objc
func
tapButton
(
gestureRecognizer
:
UITapGestureRecognizer
)
{
// goTabBarBy(tabType: .community)
// DispatchQueue.main.async {
// NotificationCenter.default.post(name: YhConstant.YhNotification.goConnectionVCNotifiction, object: nil)
// }
//1.跳转 测评页 for test hjl
let
vc
=
YHEvaluationViewVC
()
self
.
parentViewController
?
.
navigationController
?
.
pushViewController
(
vc
)
}
func
setupUI
()
{
addSubview
(
bkgImageV
)
addSubview
(
iconImageV
)
addSubview
(
lable1
)
addSubview
(
buttonImageV
)
bkgImageV
.
snp
.
makeConstraints
{
make
in
make
.
edges
.
equalToSuperview
()
}
iconImageV
.
snp
.
makeConstraints
{
make
in
make
.
width
.
height
.
equalTo
(
34
)
make
.
left
.
equalTo
(
24
)
make
.
centerY
.
equalToSuperview
()
}
lable1
.
snp
.
makeConstraints
{
make
in
make
.
centerY
.
equalToSuperview
()
make
.
left
.
equalTo
(
iconImageV
.
snp
.
right
)
.
offset
(
12
)
make
.
right
.
equalTo
(
buttonImageV
.
snp
.
left
)
.
offset
(
-
24
)
make
.
height
.
equalTo
(
22
)
}
buttonImageV
.
snp
.
makeConstraints
{
make
in
make
.
centerY
.
equalToSuperview
()
make
.
right
.
equalToSuperview
()
.
offset
(
-
24
)
make
.
height
.
equalTo
(
34
)
make
.
width
.
equalTo
(
76
)
}
let
aa
:
ASAttributedString
=
.
init
(
"香港身份"
,
.
font
(
UIFont
.
PFSC_B
(
ofSize
:
17
)),
.
foreground
(
UIColor
.
mainTextColor
))
let
bb
:
ASAttributedString
=
.
init
(
"20"
,
.
font
(
UIFont
.
PFSC_B
(
ofSize
:
17
)),
.
foreground
(
UIColor
.
brandMainColor
))
let
cc
:
ASAttributedString
=
.
init
(
"秒测评"
,
.
font
(
UIFont
.
PFSC_B
(
ofSize
:
17
)),
.
foreground
(
UIColor
.
mainTextColor
))
lable1
.
attributed
.
text
=
aa
+
bb
+
cc
}
}
galaxy/galaxy/Classes/Modules/Home(首页)/V/YHHomeHeadView.swift
View file @
2c30ba3d
...
...
@@ -10,15 +10,22 @@ import UIKit
class
YHHomeHeadView
:
UIView
{
// 不包含订单提示视图的总高度
static
let
fixViewH
:
CGFloat
=
(
YHHomeBannerView
.
viewH
)
+
(
20
+
YHHomeKingKongBlockView
.
viewH
)
+
(
20
+
1
)
+
(
20
+
YHAiRadarAreaView
.
viewH
)
+
(
20
+
YHHomeSalonAreaView
.
viewH
)
+
(
20
+
1
)
+
20
private
static
let
fixViewH
:
CGFloat
=
(
YHHomeBannerView
.
viewH
)
+
(
20
+
YHHomeKingKongBlockView
.
viewH
)
+
(
20
+
1
)
+
(
20
+
YHAiRadarAreaView
.
viewH
)
+
(
20
+
YHHomeSalonAreaView
.
viewH
)
+
(
20
+
1
)
+
20
// 包含订单提示视图的总高度
// private static let viewHWithOrderTips: CGFloat = YHHomeHeadView.fixViewH + (20 + YHOrderTipsView.viewH)
var
homeHeadViewH
:
CGFloat
{
//展示 订单提示时候的 高度
private
var
homeHeadViewH
:
CGFloat
{
return
YHHomeHeadView
.
fixViewH
+
(
20
+
orderTipsView
.
tipViewH
)
}
//获取headView的具体高度
func
getHomeHeadViewH
(
showTips
:
Bool
)
->
CGFloat
{
if
showTips
{
return
homeHeadViewH
}
else
{
return
YHHomeHeadView
.
fixViewH
+
(
20
+
YHEvaluationView
.
viewH
)
}
}
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
initView
()
...
...
@@ -34,12 +41,6 @@ class YHHomeHeadView: UIView {
return
view
}()
// //2.香港身份 香港生活
// lazy var homeHkLife : YHHkLifeAndIdView = {
// let view = YHHkLifeAndIdView()
// return view
// }()
//3. 四大金刚区
lazy
var
homeKingKongBlock
:
YHHomeKingKongBlockView
=
{
let
view
=
YHHomeKingKongBlockView
()
...
...
@@ -53,7 +54,7 @@ class YHHomeHeadView: UIView {
}()
//4.优才订单提示视图 - 未登录态不
//4.优才订单提示视图 - 未登录态不
展示
lazy
var
orderTipsView
:
YHOrderTipsView
=
{
let
view
=
YHOrderTipsView
(
frame
:
.
zero
)
view
.
isHidden
=
true
...
...
@@ -61,6 +62,14 @@ class YHHomeHeadView: UIView {
}()
//4.1 测评页入口 - 未登录时才展示
lazy
var
evaluationView
:
YHEvaluationView
=
{
let
view
=
YHEvaluationView
(
frame
:
.
zero
)
view
.
isHidden
=
true
return
view
}()
//5. ai人脉雷达
lazy
var
aiRadarArea
:
YHAiRadarAreaView
=
{
let
view
=
YHAiRadarAreaView
(
frame
:
.
zero
)
...
...
@@ -88,32 +97,17 @@ class YHHomeHeadView: UIView {
var
isNeedHideOrderTipsView
:
Bool
=
true
{
didSet
{
self
.
orderTipsView
.
isHidden
=
isNeedHideOrderTipsView
// self.aiRadarArea.snp.updateConstraints { make in
// let topMargin = isNeedHideOrderTipsView ? 20.0 : 20.0 + orderTipsView.tipViewH + 20.0
// make.top.equalTo(bannerLineTop.snp.bottom).offset(topMargin)
// }
// self.setNeedsLayout()
// self.layoutIfNeeded()
updateSubViewsConstraints
()
}
}
// override func layoutSubviews() {
// super.layoutSubviews()
// }
func
updateSubViewsConstraints
()
{
homeBannerView
.
snp
.
remakeConstraints
{
make
in
make
.
top
.
equalTo
(
0
)
make
.
left
.
right
.
equalToSuperview
()
make
.
height
.
equalTo
(
YHHomeBannerView
.
viewH
)
}
// homeHkLife.snp.remakeConstraints { make in
// make.top.equalTo(homeBannerView.snp.bottom).offset(20)
// make.left.right.equalToSuperview()
// make.height.equalTo(YHHkLifeAndIdView.viewH)
// }
homeKingKongBlock
.
snp
.
remakeConstraints
{
make
in
make
.
top
.
equalTo
(
homeBannerView
.
snp
.
bottom
)
.
offset
(
20
)
make
.
left
.
right
.
equalToSuperview
()
...
...
@@ -128,15 +122,24 @@ class YHHomeHeadView: UIView {
orderTipsView
.
snp
.
removeConstraints
()
if
self
.
orderTipsView
.
isHidden
{
aiRadarArea
.
snp
.
remakeConstraints
{
make
in
orderTipsView
.
isHidden
=
true
evaluationView
.
isHidden
=
false
evaluationView
.
snp
.
remakeConstraints
{
make
in
make
.
top
.
equalTo
(
bannerLineTop
.
snp
.
bottom
)
.
offset
(
20
)
make
.
left
.
right
.
equalToSuperview
()
make
.
height
.
equalTo
(
YH
AiRadarArea
View
.
viewH
)
make
.
height
.
equalTo
(
YH
Evaluation
View
.
viewH
)
}
aiRadarArea
.
snp
.
remakeConstraints
{
make
in
make
.
top
.
equalTo
(
evaluationView
.
snp
.
bottom
)
.
offset
(
20
)
make
.
left
.
right
.
equalToSuperview
()
make
.
height
.
equalTo
(
YHAiRadarAreaView
.
viewH
)
}
}
else
{
orderTipsView
.
isHidden
=
false
evaluationView
.
isHidden
=
true
orderTipsView
.
snp
.
remakeConstraints
{
make
in
make
.
top
.
equalTo
(
bannerLineTop
.
snp
.
bottom
)
.
offset
(
20
)
make
.
left
.
right
.
equalToSuperview
()
...
...
@@ -176,13 +179,6 @@ private extension YHHomeHeadView {
make
.
height
.
equalTo
(
YHHomeBannerView
.
viewH
)
}
// addSubview(homeHkLife)
// homeHkLife.snp.makeConstraints { make in
// make.top.equalTo(homeBannerView.snp.bottom).offset(20)
// make.left.right.equalToSuperview()
// make.height.equalTo(YHHkLifeAndIdView.viewH)
// }
addSubview
(
homeKingKongBlock
)
homeKingKongBlock
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
homeBannerView
.
snp
.
bottom
)
.
offset
(
20
)
...
...
@@ -197,6 +193,7 @@ private extension YHHomeHeadView {
make
.
height
.
equalTo
(
1
)
}
//订单入口
addSubview
(
orderTipsView
)
orderTipsView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
bannerLineTop
.
snp
.
bottom
)
.
offset
(
20
)
...
...
@@ -205,6 +202,14 @@ private extension YHHomeHeadView {
// make.height.equalTo(orderTipsView.tipViewH)
}
//测评界面
addSubview
(
evaluationView
)
evaluationView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
bannerLineTop
.
snp
.
bottom
)
.
offset
(
20
)
make
.
left
.
right
.
equalToSuperview
()
make
.
height
.
equalTo
(
YHEvaluationView
.
viewH
)
}
addSubview
(
aiRadarArea
)
aiRadarArea
.
snp
.
makeConstraints
{
make
in
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MySignature(我的签字)/C/YHMySignatureDetailViewController.swift
View file @
2c30ba3d
...
...
@@ -366,7 +366,7 @@ extension YHMySignatureDetailViewController: UITableViewDelegate, UITableViewDat
let
cell
=
tableView
.
dequeueReusableCell
(
withClass
:
YHSignatureToActionTableViewCell
.
self
)
cell
.
dataSource
=
self
.
viewModel
.
mainModel
cell
.
isSign
=
self
.
isSign
cell
.
nim
iPath
=
getMiniPath
()
cell
.
min
iPath
=
getMiniPath
()
if
self
.
type
==
5
||
self
.
type
==
4
{
cell
.
isSign
=
true
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MySignature(我的签字)/V/YHMyFileMethodTableViewCell.swift
View file @
2c30ba3d
...
...
@@ -34,7 +34,7 @@ class YHSignatureToActionTableViewCell: UITableViewCell {
var
editButton
:
UIButton
!
var
submitButton
:
UIButton
!
var
lookButton
:
UIButton
!
var
nim
iPath
:
String
=
""
var
min
iPath
:
String
=
""
var
dataSource
:
YHMySignatureDetailModel
?
{
didSet
{
...
...
@@ -287,7 +287,7 @@ class YHSignatureToActionTableViewCell: UITableViewCell {
}
@objc
func
shareButtonClick
()
{
YHShareManager
.
shared
.
sendMiniProgram
(
path
:
nim
iPath
,
name
:
dataSource
?
.
doc_type_name
??
""
)
YHShareManager
.
shared
.
sendMiniProgram
(
path
:
min
iPath
,
name
:
dataSource
?
.
doc_type_name
??
""
)
}
func
updataButton
()
{
...
...
galaxy/galaxy/Classes/Tools/Analytics/YHShareManager.swift
View file @
2c30ba3d
...
...
@@ -119,12 +119,15 @@ extension YHShareManager {
message
.
title
=
title
message
.
description
=
description
let
width
=
240.0
as
CGFloat
let
height
=
width
*
image
.
size
.
height
/
image
.
size
.
width
UIGraphicsBeginImageContext
(
CGSizeMake
(
width
,
height
))
image
.
draw
(
in
:
CGRectMake
(
0
,
0
,
width
,
height
))
message
.
setThumbImage
(
UIGraphicsGetImageFromCurrentImageContext
()
??
UIImage
())
UIGraphicsEndImageContext
()
if
image
.
size
.
width
>
0
{
let
width
=
240.0
as
CGFloat
let
height
=
width
*
image
.
size
.
height
/
image
.
size
.
width
UIGraphicsBeginImageContext
(
CGSizeMake
(
width
,
height
))
image
.
draw
(
in
:
CGRectMake
(
0
,
0
,
width
,
height
))
message
.
setThumbImage
(
UIGraphicsGetImageFromCurrentImageContext
()
??
UIImage
())
UIGraphicsEndImageContext
()
}
let
ext
=
WXWebpageObject
()
ext
.
webpageUrl
=
link
...
...
@@ -215,7 +218,17 @@ extension YHShareManager {
object
.
path
=
path
object
.
webpageUrl
=
""
object
.
userName
=
"gh_35ddbd2e68d4"
#if DEBUG
object
.
miniProgramType
=
.
preview
#elseif TESTENV
object
.
miniProgramType
=
.
preview
#else
object
.
miniProgramType
=
.
release
#endif
message
.
mediaObject
=
object
message
.
title
=
"您的朋友邀请您点击小程序,协作签署
\(
name
)
"
// message.description = "有文书分享转发给您,需要您帮忙签署,快来看看吧~"
...
...
galaxy/galaxy/Res/Assets.xcassets/Home/Evaluation/Contents.json
0 → 100644
View file @
2c30ba3d
{
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/Home/Evaluation/evaluation_bkg.imageset/Contents.json
0 → 100644
View file @
2c30ba3d
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"Group 2033194990@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"Group 2033194990@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/Home/Evaluation/evaluation_bkg.imageset/Group 2033194990@2x.png
0 → 100644
View file @
2c30ba3d
87 KB
galaxy/galaxy/Res/Assets.xcassets/Home/Evaluation/evaluation_bkg.imageset/Group 2033194990@3x.png
0 → 100644
View file @
2c30ba3d
171 KB
galaxy/galaxy/Res/Assets.xcassets/Home/Evaluation/evaluation_button.imageset/Contents.json
0 → 100644
View file @
2c30ba3d
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"Group 2033194964@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"Group 2033194964@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/Home/Evaluation/evaluation_button.imageset/Group 2033194964@2x.png
0 → 100644
View file @
2c30ba3d
9.79 KB
galaxy/galaxy/Res/Assets.xcassets/Home/Evaluation/evaluation_button.imageset/Group 2033194964@3x.png
0 → 100644
View file @
2c30ba3d
18.7 KB
galaxy/galaxy/Res/Assets.xcassets/Home/Evaluation/evaluation_icon.imageset/Contents.json
0 → 100644
View file @
2c30ba3d
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"激活身份@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"激活身份@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/Home/Evaluation/evaluation_icon.imageset/激活身份@2x.png
0 → 100644
View file @
2c30ba3d
4.2 KB
galaxy/galaxy/Res/Assets.xcassets/Home/Evaluation/evaluation_icon.imageset/激活身份@3x.png
0 → 100644
View file @
2c30ba3d
7.94 KB
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