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
0c5ea4a2
Commit
0c5ea4a2
authored
Jul 19, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'youhua-dev' of
http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS
into youhua-dev
parents
941e8493
a0dbf94b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
239 additions
and
31 deletions
+239
-31
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+5
-1
YHEvaluationViewVC.swift
...alaxy/Classes/Modules/Home(首页)/C/YHEvaluationViewVC.swift
+7
-0
YHStatusAdvantageVC.swift
...laxy/Classes/Modules/Home(首页)/C/YHStatusAdvantageVC.swift
+52
-20
YHHomeKingKongBlockView.swift
.../Classes/Modules/Home(首页)/V/YHHomeKingKongBlockView.swift
+23
-6
YHStatusAdvantageBottomView.swift
...sses/Modules/Home(首页)/V/YHStatusAdvantageBottomView.swift
+146
-0
YHServiceCenterMainViewController.swift
...ntService(服务中心)/C/YHServiceCenterMainViewController.swift
+6
-4
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
0c5ea4a2
...
...
@@ -490,6 +490,7 @@
A59B43C72C48F68200B28379
/* YHEvaluationView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A59B43C62C48F68200B28379
/* YHEvaluationView.swift */
;
};
A59B43C92C491FB100B28379
/* YHEvaluationViewVC.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A59B43C82C491FB100B28379
/* YHEvaluationViewVC.swift */
;
};
A59B43CB2C4A151200B28379
/* YHStatusAdvantageVC.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A59B43CA2C4A151200B28379
/* YHStatusAdvantageVC.swift */
;
};
A59B43CD2C4A36DF00B28379
/* YHStatusAdvantageBottomView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A59B43CC2C4A36DF00B28379
/* YHStatusAdvantageBottomView.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 */
;
};
...
...
@@ -1096,6 +1097,7 @@
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>"
;
};
A59B43CA2C4A151200B28379
/* YHStatusAdvantageVC.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHStatusAdvantageVC.swift
;
sourceTree
=
"<group>"
;
};
A59B43CC2C4A36DF00B28379
/* YHStatusAdvantageBottomView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHStatusAdvantageBottomView.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>"
;
};
...
...
@@ -2599,11 +2601,11 @@
A567E57A2BD7643D00D5D5A0
/* YHConfigManager.swift */
,
A567E5762BD7643D00D5D5A0
/* YHHomePageViewController.swift */
,
A5000F502C3BC28B00843452
/* YHHomeHoldViewPageViewController.swift */
,
A59B43C82C491FB100B28379
/* YHEvaluationViewVC.swift */
,
04213B242C48C15400797900
/* YHHomeIdentityViewController.swift */
,
04213B282C48EF5200797900
/* YHHomeInformationViewController.swift */
,
04213B2E2C49154900797900
/* YHHomeInfoDetailContainerViewController.swift */
,
04213B302C4917BD00797900
/* YHHomeInfoDetailViewController.swift */
,
A59B43C82C491FB100B28379
/* YHEvaluationViewVC.swift */
,
A59B43CA2C4A151200B28379
/* YHStatusAdvantageVC.swift */
,
);
path
=
C
;
...
...
@@ -2645,6 +2647,7 @@
04213B262C48C95E00797900
/* YHHomeIdentityCell.swift */
,
04213B2A2C48F1BE00797900
/* YHHomeInfoSectionCell.swift */
,
04213B2C2C48FEB000797900
/* YHHomeInfoSectionHeadView.swift */
,
A59B43CC2C4A36DF00B28379
/* YHStatusAdvantageBottomView.swift */
,
);
path
=
V
;
sourceTree
=
"<group>"
;
...
...
@@ -3644,6 +3647,7 @@
045EEEAB2B9F171A0022A143
/* YHImageClipperViewController.swift in Sources */
,
044414032BC39B8D00784A14
/* YHServerTableHeadView.swift in Sources */
,
045EEECB2B9F171A0022A143
/* YHScoreResultBaseModel.swift in Sources */
,
A59B43CD2C4A36DF00B28379
/* YHStatusAdvantageBottomView.swift in Sources */
,
049AB5F02C0F339200155DDF
/* YHVideoPlaySettingVC.swift in Sources */
,
04A7BD192BA441D400BD35A2
/* YHMyDocumentsUrlModel.swift in Sources */
,
04174D792BCD5B74000BA46D
/* YHMessageSessionCell.swift in Sources */
,
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHEvaluationViewVC.swift
View file @
0c5ea4a2
...
...
@@ -9,6 +9,9 @@
import
UIKit
import
WebKit
/*
快速测评
*/
class
YHEvaluationViewVC
:
YHBaseViewController
,
WKUIDelegate
,
WKNavigationDelegate
{
var
webview
=
WKWebView
()
var
progBar
=
UIProgressView
()
...
...
@@ -30,6 +33,10 @@ class YHEvaluationViewVC: YHBaseViewController, WKUIDelegate, WKNavigationDelega
gk_navBarAlpha
=
1.0
gk_navLineHidden
=
false
#if DEBUG
gk_navTitle
=
"快速测评"
#endif
NotificationCenter
.
default
.
addObserver
(
self
,
selector
:
#selector(
updateNetWorkUI
)
,
name
:
.
reachabilityChanged
,
object
:
nil
)
view
.
backgroundColor
=
.
white
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHStatusAdvantageVC.swift
View file @
0c5ea4a2
...
...
@@ -25,11 +25,34 @@ class YHStatusAdvantageVC: YHBaseViewController, WKUIDelegate, WKNavigationDeleg
return
view
}()
lazy
var
bottomHoldView
:
YHStatusAdvantageBottomView
=
{
let
view
=
YHStatusAdvantageBottomView
()
return
view
}()
//是否曾今有过网络
private
var
isNetWorkOkBefore
:
Bool
=
false
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
setupUI
()
}
deinit
{
webview
.
removeObserver
(
self
,
forKeyPath
:
"estimatedProgress"
)
NotificationCenter
.
default
.
removeObserver
(
self
)
}
}
// MARK: - 内部方法
private
extension
YHStatusAdvantageVC
{
func
setupUI
()
{
gk_navBarAlpha
=
1.0
gk_navLineHidden
=
false
gk_navTitle
=
"身份优势"
...
...
@@ -45,20 +68,46 @@ class YHStatusAdvantageVC: YHBaseViewController, WKUIDelegate, WKNavigationDeleg
// 创建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
webview
.
scrollView
.
contentInsetAdjustmentBehavior
=
.
never
// 创建网址
let
url
=
NSURL
(
string
:
url
)
// 创建请求
let
request
=
NSURLRequest
(
url
:
url
!
as
URL
)
// 加载请求
webview
.
load
(
request
as
URLRequest
)
// 添加wkwebview
self
.
view
.
addSubview
(
webview
)
view
.
addSubview
(
webview
)
view
.
addSubview
(
bottomHoldView
)
webview
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalToSuperview
()
.
offset
(
-
20
)
make
.
left
.
right
.
equalToSuperview
()
make
.
bottom
.
equalTo
(
bottomHoldView
.
snp
.
top
)
.
offset
(
-
14
)
}
bottomHoldView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
bottom
.
equalToSuperview
()
make
.
height
.
equalTo
(
YHStatusAdvantageBottomView
.
viewH
)
}
webview
.
scrollView
.
contentInsetAdjustmentBehavior
=
.
never
bottomHoldView
.
block
=
{
tag
in
if
tag
==
0
{
//快速测评
let
vc
=
YHEvaluationViewVC
()
self
.
navigationController
?
.
pushViewController
(
vc
)
}
else
if
tag
==
1
{
//todo for test hjl
let
codeUrl
=
"https://public-resuorces.oss-cn-shenzhen.aliyuncs.com/app/article_clue_default_user_code1.png"
let
downloadUrl
=
"https://public-resuorces.oss-cn-shenzhen.aliyuncs.com/app/article_clue_default_user_code.png"
YHConsultantQRCodeView
.
codeView
(
codeUrl
,
downloadUrl
:
downloadUrl
)
.
show
()
}
else
if
tag
==
2
{
//邀请有礼
if
YHLoginManager
.
shared
.
isLogin
()
{
let
vc
=
YHInvitationWithGiftsViewController
()
self
.
navigationController
?
.
pushViewController
(
vc
)
}
}
}
// 加载网页的进度条
progBar
=
UIProgressView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
self
.
view
.
frame
.
width
,
height
:
30
))
...
...
@@ -76,15 +125,6 @@ class YHStatusAdvantageVC: YHBaseViewController, WKUIDelegate, WKNavigationDeleg
updateNetWorkStatusUI
(
needReload
:
false
)
}
deinit
{
webview
.
removeObserver
(
self
,
forKeyPath
:
"estimatedProgress"
)
NotificationCenter
.
default
.
removeObserver
(
self
)
}
}
// MARK: - 内部方法
private
extension
YHStatusAdvantageVC
{
func
addRightItems
()
{
let
rightButtonItem
=
UIBarButtonItem
(
image
:
UIImage
(
named
:
"share_item"
)?
.
withRenderingMode
(
.
alwaysOriginal
),
style
:
.
plain
,
target
:
self
,
action
:
#selector(
share
)
)
gk_navRightBarButtonItem
=
rightButtonItem
...
...
@@ -99,10 +139,6 @@ private extension YHStatusAdvantageVC {
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/"
)
//todo : for test hjl
// YHShareManager.shared.sendMiniProgram(path: <#T##String#>, name: <#T##String#>)
...
...
@@ -169,8 +205,6 @@ private extension YHStatusAdvantageVC {
}
}
// MARK: - webview function
@objc
func
toBack
()
{
if
webview
.
canGoBack
{
webview
.
goBack
()
...
...
@@ -182,8 +216,6 @@ private extension YHStatusAdvantageVC {
webview
.
goForward
()
}
}
}
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/V/YHHomeKingKongBlockView.swift
View file @
0c5ea4a2
...
...
@@ -54,21 +54,38 @@ private extension YHHomeKingKongBlockView {
case
0
:
//身份优势
let
vc
=
YHStatusAdvantageVC
()
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
self
.
parentViewController
?
.
navigationController
?
.
pushViewController
(
vc
)
case
1
:
let
vc
=
YHOtherServiceViewController
()
vc
.
classID
=
4
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
//邀请有礼
tapShareForGiftView
()
case
2
:
//客户心声
let
vc
=
YHOtherServiceViewController
()
vc
.
classID
=
5
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
self
.
parentViewController
?
.
navigationController
?
.
pushViewController
(
vc
)
case
3
:
//香港办事
let
vc
=
YHHKEventCenterViewController
()
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
self
.
parentViewController
?
.
navigationController
?
.
pushViewController
(
vc
)
default
:
break
}
}
}
func
tapShareForGiftView
()
{
//判断是否登录成功
if
YHLoginManager
.
shared
.
isLogin
()
{
let
vc
=
YHInvitationWithGiftsViewController
()
self
.
parentViewController
?
.
navigationController
?
.
pushViewController
(
vc
)
}
else
{
YHOneKeyLoginManager
.
shared
.
oneKeyLogin
()
YHLoginManager
.
shared
.
loginSuccessActionBlock
=
{[
weak
self
]
in
guard
self
!=
nil
else
{
return
}
let
vc
=
YHInvitationWithGiftsViewController
()
self
?
.
parentViewController
?
.
navigationController
?
.
pushViewController
(
vc
)
YHLoginManager
.
shared
.
loginSuccessActionBlock
=
nil
}
}
}
}
galaxy/galaxy/Classes/Modules/Home(首页)/V/YHStatusAdvantageBottomView.swift
0 → 100644
View file @
0c5ea4a2
//
// YHStatusAdvantageBottomView.swift
// galaxy
//
// Created by davidhuangA on 2024/7/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHStatusAdvantageBottomView
:
UIView
{
static
let
viewH
:
CGFloat
=
98.0
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
,
height
:
YHBasicInfoFillBottomView
.
viewH
))
setupUI
()
}
required
init
?(
coder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
}
typealias
Block
=
(
Int
)
->
()
//0-快速测评 1-资讯顾问 2-分享有礼
var
block
:
Block
?
lazy
var
topLine
:
UIView
=
{
let
line
=
UIView
()
line
.
backgroundColor
=
UIColor
.
separatorColor
return
line
}()
//快速测评
lazy
var
quickEvaluationBtn
:
UIButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
titleLabel
?
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
15
)
button
.
contentHorizontalAlignment
=
.
center
button
.
setTitle
(
"快速测评"
,
for
:
.
normal
)
button
.
setTitleColor
(
UIColor
.
mainTextColor
,
for
:
.
normal
)
button
.
layer
.
cornerRadius
=
kCornerRadius3
button
.
clipsToBounds
=
true
button
.
addTarget
(
self
,
action
:
#selector(
clickEvaluationBtn
)
,
for
:
.
touchUpInside
)
button
.
backgroundColor
=
UIColor
.
contentBkgColor
return
button
}()
//咨询顾问
lazy
var
consultantBtn
:
UIButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
titleLabel
?
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
15
)
button
.
contentHorizontalAlignment
=
.
center
button
.
setTitle
(
"咨询顾问"
,
for
:
.
normal
)
button
.
setTitleColor
(
UIColor
.
white
,
for
:
.
normal
)
button
.
layer
.
cornerRadius
=
kCornerRadius3
button
.
clipsToBounds
=
true
button
.
addTarget
(
self
,
action
:
#selector(
clickConsultantBtn
)
,
for
:
.
touchUpInside
)
button
.
backgroundColor
=
UIColor
.
brandMainColor
return
button
}()
//邀请有礼
lazy
var
rewardBtn
:
UIButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
titleLabel
?
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
15
)
button
.
contentHorizontalAlignment
=
.
center
button
.
setTitle
(
"邀请有礼"
,
for
:
.
normal
)
button
.
setTitleColor
(
UIColor
.
white
,
for
:
.
normal
)
button
.
layer
.
cornerRadius
=
kCornerRadius3
button
.
clipsToBounds
=
true
button
.
addTarget
(
self
,
action
:
#selector(
clickRewardBtn
)
,
for
:
.
touchUpInside
)
button
.
backgroundColor
=
UIColor
.
brandMainColor
return
button
}()
override
func
layoutSubviews
()
{
super
.
layoutSubviews
()
if
YHLoginManager
.
shared
.
isLogin
()
{
quickEvaluationBtn
.
isHidden
=
true
consultantBtn
.
isHidden
=
true
rewardBtn
.
isHidden
=
false
}
else
{
quickEvaluationBtn
.
isHidden
=
false
consultantBtn
.
isHidden
=
false
rewardBtn
.
isHidden
=
true
}
}
}
private
extension
YHStatusAdvantageBottomView
{
func
setupUI
()
{
backgroundColor
=
.
white
addSubview
(
topLine
)
addSubview
(
quickEvaluationBtn
)
addSubview
(
consultantBtn
)
addSubview
(
rewardBtn
)
topLine
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
top
.
equalToSuperview
()
make
.
height
.
equalTo
(
0.5
)
}
quickEvaluationBtn
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalToSuperview
()
.
offset
(
10
)
make
.
left
.
equalTo
(
kMargin
)
make
.
right
.
equalTo
(
consultantBtn
.
snp
.
left
)
.
offset
(
-
11
)
make
.
height
.
equalTo
(
44
)
make
.
width
.
equalTo
(
116
)
}
consultantBtn
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
quickEvaluationBtn
.
snp
.
top
)
make
.
left
.
equalTo
(
quickEvaluationBtn
.
snp
.
right
)
.
offset
(
11
)
make
.
right
.
equalTo
(
-
kMargin
)
make
.
height
.
equalTo
(
44
)
// make.width.equalTo(116)
}
rewardBtn
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalToSuperview
()
.
offset
(
10
)
make
.
left
.
equalTo
(
kMargin
)
make
.
right
.
equalTo
(
-
kMargin
)
make
.
height
.
equalTo
(
44
)
// make.width.equalTo(116)
}
}
@objc
func
clickEvaluationBtn
()
{
block
?(
0
)
}
@objc
func
clickConsultantBtn
()
{
block
?(
1
)
}
@objc
func
clickRewardBtn
()
{
block
?(
2
)
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/C/YHServiceCenterMainViewController.swift
View file @
0c5ea4a2
...
...
@@ -89,10 +89,12 @@ class YHServiceCenterMainViewController: YHBaseViewController {
noDataView
.
clickBackBtnClickBlock
=
{[
weak
self
]
in
guard
self
!=
nil
else
{
return
}
let
vc
=
YHHomeWebViewController
()
vc
.
vcTitle
=
"香港身份测评码"
vc
.
showSavePicBottomFlag
=
true
vc
.
url
=
"https://cdn-public.galaxy-immi.com/app/cepingma.png"
// let vc = YHHomeWebViewController()
// vc.vcTitle = "香港身份测评码"
// vc.showSavePicBottomFlag = true
// vc.url = "https://cdn-public.galaxy-immi.com/app/cepingma.png"
let
vc
=
YHEvaluationViewVC
()
self
?
.
navigationController
?
.
pushViewController
(
vc
)
}
noDataView
.
clickShowBtnClickBlock
=
{
...
...
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