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
bba36282
Commit
bba36282
authored
Jan 14, 2025
by
Alex朱枝文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
银河管家增加引导弹窗
parent
bf80c08c
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
382 additions
and
2 deletions
+382
-2
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+4
-0
YHButlerServiceManager.swift
...s/ButlerServiceManager(银河管家)/YHButlerServiceManager.swift
+9
-0
YHCommunityViewController.swift
...s/Modules/Community(社区)/C/YHCommunityViewController.swift
+63
-0
YHHomeHoldViewPageViewController.swift
...Modules/Home(首页)/C/YHHomeHoldViewPageViewController.swift
+6
-1
YHConversationGuideView.swift
.../Classes/Modules/Home(首页)/V/YHConversationGuideView.swift
+142
-0
YHServerCenterHoldViewController.swift
.../OrderList(服务订单)/C/YHServerCenterHoldViewController.swift
+66
-0
YHIMHelper.swift
...ses/Modules/LivestreamSales(直播销售)/IM(环信)/YHIMHelper.swift
+1
-1
YHMyViewController.swift
...alaxy/Classes/Modules/Mine(我的)/C/YHMyViewController.swift
+69
-0
Contents.json
...ssets/Home/conversation_guide_icon.imageset/Contents.json
+22
-0
conversation_guide_icon@2x.png
...sation_guide_icon.imageset/conversation_guide_icon@2x.png
+0
-0
conversation_guide_icon@3x.png
...sation_guide_icon.imageset/conversation_guide_icon@3x.png
+0
-0
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
bba36282
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
objects
=
{
objects
=
{
/* Begin PBXBuildFile section */
/* Begin PBXBuildFile section */
0406C7112D2FBB0300193E7D
/* YHConversationGuideView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0406C7102D2FBB0300193E7D
/* YHConversationGuideView.swift */
;
};
0411CEDE2D14006C00644D35
/* YHGCMainApplicantInformationViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0411CEDD2D14006C00644D35
/* YHGCMainApplicantInformationViewController.swift */
;
};
0411CEDE2D14006C00644D35
/* YHGCMainApplicantInformationViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0411CEDD2D14006C00644D35
/* YHGCMainApplicantInformationViewController.swift */
;
};
0411CEE02D1400C200644D35
/* YHGCMainApplicantInformationViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0411CEDF2D1400C200644D35
/* YHGCMainApplicantInformationViewModel.swift */
;
};
0411CEE02D1400C200644D35
/* YHGCMainApplicantInformationViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0411CEDF2D1400C200644D35
/* YHGCMainApplicantInformationViewModel.swift */
;
};
0411CEE22D14014000644D35
/* YHGCMainInformationCardTableViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0411CEE12D14014000644D35
/* YHGCMainInformationCardTableViewCell.swift */
;
};
0411CEE22D14014000644D35
/* YHGCMainInformationCardTableViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0411CEE12D14014000644D35
/* YHGCMainInformationCardTableViewCell.swift */
;
};
...
@@ -1226,6 +1227,7 @@
...
@@ -1226,6 +1227,7 @@
/* End PBXCopyFilesBuildPhase section */
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
/* Begin PBXFileReference section */
0406C7102D2FBB0300193E7D
/* YHConversationGuideView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHConversationGuideView.swift
;
sourceTree
=
"<group>"
;
};
0411CEDD2D14006C00644D35
/* YHGCMainApplicantInformationViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHGCMainApplicantInformationViewController.swift
;
sourceTree
=
"<group>"
;
};
0411CEDD2D14006C00644D35
/* YHGCMainApplicantInformationViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHGCMainApplicantInformationViewController.swift
;
sourceTree
=
"<group>"
;
};
0411CEDF2D1400C200644D35
/* YHGCMainApplicantInformationViewModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHGCMainApplicantInformationViewModel.swift
;
sourceTree
=
"<group>"
;
};
0411CEDF2D1400C200644D35
/* YHGCMainApplicantInformationViewModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHGCMainApplicantInformationViewModel.swift
;
sourceTree
=
"<group>"
;
};
0411CEE12D14014000644D35
/* YHGCMainInformationCardTableViewCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHGCMainInformationCardTableViewCell.swift
;
sourceTree
=
"<group>"
;
};
0411CEE12D14014000644D35
/* YHGCMainInformationCardTableViewCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHGCMainInformationCardTableViewCell.swift
;
sourceTree
=
"<group>"
;
};
...
@@ -3159,6 +3161,7 @@
...
@@ -3159,6 +3161,7 @@
045C0AF42D12CA5E00BD2DC0
/* YHHomeWebViewBottomForSavePicView.swift */
,
045C0AF42D12CA5E00BD2DC0
/* YHHomeWebViewBottomForSavePicView.swift */
,
045C0AF52D12CA5E00BD2DC0
/* YHIdentityTabBar.swift */
,
045C0AF52D12CA5E00BD2DC0
/* YHIdentityTabBar.swift */
,
045C0AF62D12CA5E00BD2DC0
/* YHManagerFuncGuildeCheckView.swift */
,
045C0AF62D12CA5E00BD2DC0
/* YHManagerFuncGuildeCheckView.swift */
,
0406C7102D2FBB0300193E7D
/* YHConversationGuideView.swift */
,
045C0AF72D12CA5E00BD2DC0
/* YHMessageBellView.swift */
,
045C0AF72D12CA5E00BD2DC0
/* YHMessageBellView.swift */
,
045C0AF82D12CA5E00BD2DC0
/* YHOrderTipsItemView.swift */
,
045C0AF82D12CA5E00BD2DC0
/* YHOrderTipsItemView.swift */
,
045C0AF92D12CA5E00BD2DC0
/* YHOrderTipsView.swift */
,
045C0AF92D12CA5E00BD2DC0
/* YHOrderTipsView.swift */
,
...
@@ -7752,6 +7755,7 @@
...
@@ -7752,6 +7755,7 @@
045C13122D12CA5F00BD2DC0
/* YHAdopterCardExampleView.swift in Sources */
,
045C13122D12CA5F00BD2DC0
/* YHAdopterCardExampleView.swift in Sources */
,
045C13132D12CA5F00BD2DC0
/* YHMySettingViewController.swift in Sources */
,
045C13132D12CA5F00BD2DC0
/* YHMySettingViewController.swift in Sources */
,
045C13142D12CA5F00BD2DC0
/* YHHKImmigrationRecordsVC.swift in Sources */
,
045C13142D12CA5F00BD2DC0
/* YHHKImmigrationRecordsVC.swift in Sources */
,
0406C7112D2FBB0300193E7D
/* YHConversationGuideView.swift in Sources */
,
045C13152D12CA5F00BD2DC0
/* YHMineCertificateEntryViewController.swift in Sources */
,
045C13152D12CA5F00BD2DC0
/* YHMineCertificateEntryViewController.swift in Sources */
,
045C13162D12CA5F00BD2DC0
/* YHInformationAuthorizationStepOneViewController.swift in Sources */
,
045C13162D12CA5F00BD2DC0
/* YHInformationAuthorizationStepOneViewController.swift in Sources */
,
045C13172D12CA5F00BD2DC0
/* YHInformationFillTipsAlertView.swift in Sources */
,
045C13172D12CA5F00BD2DC0
/* YHInformationFillTipsAlertView.swift in Sources */
,
...
...
galaxy/galaxy/Classes/Modules/ButlerServiceManager(银河管家)/YHButlerServiceManager.swift
View file @
bba36282
...
@@ -36,6 +36,15 @@ class YHButlerServiceManager: NSObject {
...
@@ -36,6 +36,15 @@ class YHButlerServiceManager: NSObject {
var
unreadCount
:
Int
{
var
unreadCount
:
Int
{
allUnreadCount
()
allUnreadCount
()
}
}
var
guideWindowShowedKey
:
String
?
{
guard
let
userId
=
YHLoginManager
.
shared
.
userModel
?
.
id
,
userId
.
count
>
0
else
{
return
nil
}
return
"guideWindowShowedKey"
+
"_
\(
userId
)
"
}
var
didShowWindowDict
:
[
String
:
Bool
]
=
[:]
private
override
init
()
{
private
override
init
()
{
super
.
init
()
super
.
init
()
...
...
galaxy/galaxy/Classes/Modules/Community(社区)/C/YHCommunityViewController.swift
View file @
bba36282
...
@@ -16,6 +16,11 @@ class YHCommunityViewController: YHBaseViewController {
...
@@ -16,6 +16,11 @@ class YHCommunityViewController: YHBaseViewController {
var
arrItemVCs
:
[
YHBaseViewController
]
=
[]
var
arrItemVCs
:
[
YHBaseViewController
]
=
[]
private
lazy
var
princleVM
:
YHPrincleViewModel
=
{
let
vm
=
YHPrincleViewModel
()
return
vm
}()
lazy
var
segmentedView
:
JXSegmentedView
=
{
lazy
var
segmentedView
:
JXSegmentedView
=
{
let
view
=
JXSegmentedView
(
frame
:
CGRect
(
x
:
0
,
y
:
k_Height_safeAreaInsetsTop
(),
width
:
KScreenWidth
,
height
:
48
))
let
view
=
JXSegmentedView
(
frame
:
CGRect
(
x
:
0
,
y
:
k_Height_safeAreaInsetsTop
(),
width
:
KScreenWidth
,
height
:
48
))
view
.
backgroundColor
=
.
clear
view
.
backgroundColor
=
.
clear
...
@@ -223,6 +228,7 @@ class YHCommunityViewController: YHBaseViewController {
...
@@ -223,6 +228,7 @@ class YHCommunityViewController: YHBaseViewController {
requestFriendRequest
()
requestFriendRequest
()
//处于第一个item的时候,才允许屏幕边缘手势返回
//处于第一个item的时候,才允许屏幕边缘手势返回
navigationController
?
.
interactivePopGestureRecognizer
?
.
isEnabled
=
(
segmentedView
.
selectedIndex
==
0
)
navigationController
?
.
interactivePopGestureRecognizer
?
.
isEnabled
=
(
segmentedView
.
selectedIndex
==
0
)
showAlert
()
}
}
override
func
viewWillDisappear
(
_
animated
:
Bool
)
{
override
func
viewWillDisappear
(
_
animated
:
Bool
)
{
...
@@ -232,6 +238,26 @@ class YHCommunityViewController: YHBaseViewController {
...
@@ -232,6 +238,26 @@ class YHCommunityViewController: YHBaseViewController {
navigationController
?
.
interactivePopGestureRecognizer
?
.
isEnabled
=
true
navigationController
?
.
interactivePopGestureRecognizer
?
.
isEnabled
=
true
}
}
private
func
showAlert
()
{
guard
YHLoginManager
.
shared
.
isLogin
()
else
{
return
}
princleVM
.
getPrincleStatus
{
[
weak
self
]
success
,
error
in
if
success
{
guard
let
self
=
self
else
{
return
}
guard
let
model
=
self
.
princleVM
.
alertStatusModel
else
{
return
}
if
model
.
type
==
20
{
self
.
showYHManagerGuideView
(
self
.
navigationController
)
}
}
}
}
func
requestFriendRequest
()
{
func
requestFriendRequest
()
{
if
YHLoginManager
.
shared
.
isLogin
()
{
if
YHLoginManager
.
shared
.
isLogin
()
{
self
.
friendViewModel
.
getMyFriendList
{
success
,
error
in
self
.
friendViewModel
.
getMyFriendList
{
success
,
error
in
...
@@ -311,3 +337,40 @@ extension YHCommunityViewController: JXSegmentedListContainerViewDataSource {
...
@@ -311,3 +337,40 @@ extension YHCommunityViewController: JXSegmentedListContainerViewDataSource {
}
}
}
}
extension
YHCommunityViewController
{
//MARK: - 跳银河管家
private
func
showYHManagerGuideView
(
_
navigationController
:
UINavigationController
?)
{
if
YHUatHelper
.
shared
.
getUatModuleStatusBy
(
module
:
.
QiYu_Service
)
!=
1
{
printLog
(
"非目标用户"
)
return
}
if
let
key
=
YHButlerServiceManager
.
shared
.
guideWindowShowedKey
,
YHButlerServiceManager
.
shared
.
didShowWindowDict
[
key
]
==
true
{
return
}
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
0.25
)
{
if
let
key
=
YHButlerServiceManager
.
shared
.
guideWindowShowedKey
{
YHButlerServiceManager
.
shared
.
didShowWindowDict
[
key
]
=
true
}
let
view
=
YHConversationGuideView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
,
height
:
KScreenHeight
))
view
.
checkButtonEvent
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
self
.
princleVM
.
postAlertStatus
(
20
)
{
success
,
error
in
}
self
.
gotoYinHeManager
(
navigationController
)
}
view
.
show
()
}
}
private
func
gotoYinHeManager
(
_
navigationController
:
UINavigationController
?)
{
guard
let
userId
=
YHLoginManager
.
shared
.
userModel
?
.
id
,
userId
.
count
>
0
else
{
return
}
//YHAnalytics.track("APP_HomeTab_IntelligentAssistant")
YHButlerServiceManager
.
shared
.
gotoButlerServiceSessionVC
(
navigationController
:
navigationController
,
completion
:
{
_
in
})
}
}
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHHomeHoldViewPageViewController.swift
View file @
bba36282
...
@@ -650,7 +650,9 @@ private extension YHHomeHoldViewPageViewController {
...
@@ -650,7 +650,9 @@ private extension YHHomeHoldViewPageViewController {
printLog
(
"非目标用户"
)
printLog
(
"非目标用户"
)
return
return
}
}
if
let
key
=
YHButlerServiceManager
.
shared
.
guideWindowShowedKey
,
YHButlerServiceManager
.
shared
.
didShowWindowDict
[
key
]
==
true
{
return
}
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
0.5
)
{
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
0.5
)
{
//判断是否在 首页tab
//判断是否在 首页tab
if
let
vc
=
UIApplication
.
shared
.
keyWindow
?
.
rootViewController
as?
YHTabBarViewController
{
if
let
vc
=
UIApplication
.
shared
.
keyWindow
?
.
rootViewController
as?
YHTabBarViewController
{
...
@@ -663,6 +665,9 @@ private extension YHHomeHoldViewPageViewController {
...
@@ -663,6 +665,9 @@ private extension YHHomeHoldViewPageViewController {
if
self
.
segmentedView
.
selectedIndex
!=
0
{
if
self
.
segmentedView
.
selectedIndex
!=
0
{
return
return
}
}
if
let
key
=
YHButlerServiceManager
.
shared
.
guideWindowShowedKey
{
YHButlerServiceManager
.
shared
.
didShowWindowDict
[
key
]
=
true
}
// self.princleVM.postAlertStatus(20) { success, error in
// self.princleVM.postAlertStatus(20) { success, error in
// }
// }
...
...
galaxy/galaxy/Classes/Modules/Home(首页)/V/YHConversationGuideView.swift
0 → 100644
View file @
bba36282
//
// YHConversationGuideView.swift
// galaxy
//
// Created by alexzzw on 2025/1/9.
// Copyright © 2025 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHConversationGuideView
:
UIView
{
var
checkButtonEvent
:
(()
->
Void
)?
private
lazy
var
centerView
:
UIView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
.
clear
return
view
}()
private
lazy
var
bottomContainerView
:
UIView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
.
white
view
.
clipsToBounds
=
true
view
.
layer
.
cornerRadius
=
kCornerRadius6
return
view
}()
private
lazy
var
topImageView
:
UIImageView
=
{
let
imageV
=
UIImageView
()
imageV
.
image
=
UIImage
(
named
:
"conversation_guide_icon"
)
imageV
.
contentMode
=
.
scaleToFill
imageV
.
clipsToBounds
=
true
imageV
.
isUserInteractionEnabled
=
true
return
imageV
}()
lazy
var
checkButton
:
UIButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
addTarget
(
self
,
action
:
#selector(
clickCheckButton
)
,
for
:
.
touchUpInside
)
button
.
setTitle
(
"立即查看"
,
for
:
.
normal
)
button
.
setTitleColor
(
.
white
,
for
:
.
normal
)
button
.
backgroundColor
=
.
brandMainColor
button
.
layer
.
cornerRadius
=
3
button
.
titleLabel
?
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
14
)
return
button
}()
private
lazy
var
infoTitleLabel
:
UILabel
=
{
let
label
:
UILabel
=
UILabel
()
label
.
text
=
"您好!银河用户"
label
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
17
)
label
.
textColor
=
UIColor
.
mainTextColor
label
.
textAlignment
=
.
center
return
label
}()
private
lazy
var
infoContentLabel
:
UILabel
=
{
let
label
:
UILabel
=
UILabel
()
label
.
text
=
"我是您的专属文案管家,为您提供最贴心的帮助与引导,请随时告诉我您的需求"
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
label
.
textColor
=
UIColor
(
hexString
:
"#4D5665"
)
label
.
numberOfLines
=
0
label
.
lineBreakMode
=
.
byCharWrapping
label
.
textAlignment
=
.
center
return
label
}()
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
setupUI
()
}
required
init
?(
coder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
}
private
func
setupUI
()
{
backgroundColor
=
UIColor
(
hex
:
0x0000
,
alpha
:
0.5
)
addSubview
(
centerView
)
centerView
.
addSubview
(
bottomContainerView
)
centerView
.
addSubview
(
topImageView
)
bottomContainerView
.
addSubview
(
checkButton
)
bottomContainerView
.
addSubview
(
infoTitleLabel
)
bottomContainerView
.
addSubview
(
infoContentLabel
)
centerView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
.
offset
(
38
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
38
)
make
.
centerY
.
equalToSuperview
()
}
let
ratio
=
299.0
/
152.0
topImageView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
left
.
right
.
equalToSuperview
()
make
.
width
.
equalTo
(
topImageView
.
snp
.
height
)
.
multipliedBy
(
ratio
)
}
bottomContainerView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
bottom
.
equalToSuperview
()
make
.
top
.
equalTo
(
topImageView
.
snp
.
centerY
)
}
infoTitleLabel
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
topImageView
.
snp
.
bottom
)
.
offset
(
24
)
make
.
left
.
greaterThanOrEqualToSuperview
()
make
.
right
.
lessThanOrEqualToSuperview
()
make
.
centerX
.
equalToSuperview
()
}
infoContentLabel
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
infoTitleLabel
.
snp
.
bottom
)
.
offset
(
6
)
make
.
left
.
equalToSuperview
()
.
offset
(
20
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
20
)
}
checkButton
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
infoContentLabel
.
snp
.
bottom
)
.
offset
(
32
)
make
.
left
.
right
.
equalTo
(
infoContentLabel
)
make
.
height
.
equalTo
(
45
)
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
16
)
}
}
@objc
private
func
clickCheckButton
()
{
checkButtonEvent
?()
dismiss
()
}
func
show
()
{
let
window
=
UIApplication
.
shared
.
yhKeyWindow
()
window
?
.
addSubview
(
self
)
}
func
dismiss
()
{
removeFromSuperview
()
}
}
extension
YHConversationGuideView
:
UIGestureRecognizerDelegate
{
func
gestureRecognizer
(
_
gestureRecognizer
:
UIGestureRecognizer
,
shouldReceive
touch
:
UITouch
)
->
Bool
{
if
touch
.
view
==
self
{
return
true
}
return
false
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/OrderList(服务订单)/C/YHServerCenterHoldViewController.swift
View file @
bba36282
...
@@ -10,6 +10,11 @@ import UIKit
...
@@ -10,6 +10,11 @@ import UIKit
import
JXSegmentedView
import
JXSegmentedView
class
YHServerCenterHoldViewController
:
UIViewController
{
class
YHServerCenterHoldViewController
:
UIViewController
{
private
lazy
var
princleVM
:
YHPrincleViewModel
=
{
let
vm
=
YHPrincleViewModel
()
return
vm
}()
private
let
serviceCenterMainReqVM
:
YHServiceCenterViewModel
=
YHServiceCenterViewModel
()
private
let
serviceCenterMainReqVM
:
YHServiceCenterViewModel
=
YHServiceCenterViewModel
()
var
stepID
:
Int
=
0
var
stepID
:
Int
=
0
var
mobile
:
String
=
""
var
mobile
:
String
=
""
...
@@ -90,6 +95,10 @@ class YHServerCenterHoldViewController: UIViewController {
...
@@ -90,6 +95,10 @@ class YHServerCenterHoldViewController: UIViewController {
// Do any additional setup after loading the view.
// Do any additional setup after loading the view.
}
}
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
super
.
viewWillAppear
(
animated
)
showAlert
()
}
override
func
viewDidLayoutSubviews
()
{
override
func
viewDidLayoutSubviews
()
{
super
.
viewDidLayoutSubviews
()
super
.
viewDidLayoutSubviews
()
...
@@ -106,6 +115,25 @@ class YHServerCenterHoldViewController: UIViewController {
...
@@ -106,6 +115,25 @@ class YHServerCenterHoldViewController: UIViewController {
}
}
}
}
private
func
showAlert
()
{
guard
YHLoginManager
.
shared
.
isLogin
()
else
{
return
}
princleVM
.
getPrincleStatus
{
[
weak
self
]
success
,
error
in
if
success
{
guard
let
self
=
self
else
{
return
}
guard
let
model
=
self
.
princleVM
.
alertStatusModel
else
{
return
}
if
model
.
type
==
20
{
self
.
showYHManagerGuideView
(
self
.
navigationController
)
}
}
}
}
func
setupView
()
{
func
setupView
()
{
view
.
backgroundColor
=
.
clear
view
.
backgroundColor
=
.
clear
...
@@ -237,3 +265,41 @@ extension YHServerCenterHoldViewController: JXSegmentedListContainerViewDataSour
...
@@ -237,3 +265,41 @@ extension YHServerCenterHoldViewController: JXSegmentedListContainerViewDataSour
return
arrItemVCs
[
index
]
return
arrItemVCs
[
index
]
}
}
}
}
extension
YHServerCenterHoldViewController
{
//MARK: - 跳银河管家
private
func
showYHManagerGuideView
(
_
navigationController
:
UINavigationController
?)
{
if
YHUatHelper
.
shared
.
getUatModuleStatusBy
(
module
:
.
QiYu_Service
)
!=
1
{
printLog
(
"非目标用户"
)
return
}
if
let
key
=
YHButlerServiceManager
.
shared
.
guideWindowShowedKey
,
YHButlerServiceManager
.
shared
.
didShowWindowDict
[
key
]
==
true
{
return
}
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
0.25
)
{
if
let
key
=
YHButlerServiceManager
.
shared
.
guideWindowShowedKey
{
YHButlerServiceManager
.
shared
.
didShowWindowDict
[
key
]
=
true
}
let
view
=
YHConversationGuideView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
,
height
:
KScreenHeight
))
view
.
checkButtonEvent
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
self
.
princleVM
.
postAlertStatus
(
20
)
{
success
,
error
in
}
self
.
gotoYinHeManager
(
navigationController
)
}
view
.
show
()
}
}
private
func
gotoYinHeManager
(
_
navigationController
:
UINavigationController
?)
{
guard
let
userId
=
YHLoginManager
.
shared
.
userModel
?
.
id
,
userId
.
count
>
0
else
{
return
}
//YHAnalytics.track("APP_HomeTab_IntelligentAssistant")
YHButlerServiceManager
.
shared
.
gotoButlerServiceSessionVC
(
navigationController
:
navigationController
,
completion
:
{
_
in
})
}
}
galaxy/galaxy/Classes/Modules/LivestreamSales(直播销售)/IM(环信)/YHIMHelper.swift
View file @
bba36282
...
@@ -305,7 +305,7 @@ extension YHIMHelper: EMChatroomManagerDelegate {
...
@@ -305,7 +305,7 @@ extension YHIMHelper: EMChatroomManagerDelegate {
if
let
jsonString
=
ext
{
if
let
jsonString
=
ext
{
let
dic
=
jsonString
.
toDictionary
()
let
dic
=
jsonString
.
toDictionary
()
if
let
fromNickName
=
dic
[
"fromNickName"
]
{
if
let
fromNickName
=
dic
[
"fromNickName"
]
{
print
(
fromNickName
)
print
Log
(
fromNickName
)
NotificationCenter
.
default
.
post
(
name
:
YHIMHelper
.
didUserEnterRoomMessages
,
object
:
fromNickName
)
NotificationCenter
.
default
.
post
(
name
:
YHIMHelper
.
didUserEnterRoomMessages
,
object
:
fromNickName
)
return
return
...
...
galaxy/galaxy/Classes/Modules/Mine(我的)/C/YHMyViewController.swift
View file @
bba36282
...
@@ -59,6 +59,11 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
...
@@ -59,6 +59,11 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
let
msgViewModel
:
YHMsgViewModel
=
YHMsgViewModel
()
let
msgViewModel
:
YHMsgViewModel
=
YHMsgViewModel
()
let
loginViewModel
=
YHLoginViewModel
()
let
loginViewModel
=
YHLoginViewModel
()
let
userViewModel
=
YHMatchUserViewModel
()
let
userViewModel
=
YHMatchUserViewModel
()
private
lazy
var
princleVM
:
YHPrincleViewModel
=
{
let
vm
=
YHPrincleViewModel
()
return
vm
}()
lazy
var
tableView
:
UITableView
=
{
lazy
var
tableView
:
UITableView
=
{
let
tableView
=
UITableView
(
frame
:
CGRect
.
zero
,
style
:
.
grouped
)
let
tableView
=
UITableView
(
frame
:
CGRect
.
zero
,
style
:
.
grouped
)
...
@@ -165,6 +170,32 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
...
@@ -165,6 +170,32 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
checkSettingRedPoint
()
checkSettingRedPoint
()
headerView
.
updateAvatar
()
headerView
.
updateAvatar
()
requstUserBasicInfo
()
requstUserBasicInfo
()
showAlert
()
}
// override func viewDidAppear(_ animated: Bool) {
// super.viewDidAppear(animated)
// showYHManagerGuideView(self.navigationController)
// }
private
func
showAlert
()
{
guard
YHLoginManager
.
shared
.
isLogin
()
else
{
return
}
princleVM
.
getPrincleStatus
{
[
weak
self
]
success
,
error
in
if
success
{
guard
let
self
=
self
else
{
return
}
guard
let
model
=
self
.
princleVM
.
alertStatusModel
else
{
return
}
if
model
.
type
==
20
{
self
.
showYHManagerGuideView
(
self
.
navigationController
)
}
}
}
}
}
@objc
func
clickBtn
()
{
@objc
func
clickBtn
()
{
...
@@ -542,3 +573,41 @@ extension YHMyViewController {
...
@@ -542,3 +573,41 @@ extension YHMyViewController {
}
}
}
}
extension
YHMyViewController
{
//MARK: - 跳银河管家
private
func
showYHManagerGuideView
(
_
navigationController
:
UINavigationController
?)
{
if
YHUatHelper
.
shared
.
getUatModuleStatusBy
(
module
:
.
QiYu_Service
)
!=
1
{
printLog
(
"非目标用户"
)
return
}
if
let
key
=
YHButlerServiceManager
.
shared
.
guideWindowShowedKey
,
YHButlerServiceManager
.
shared
.
didShowWindowDict
[
key
]
==
true
{
return
}
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
0.25
)
{
if
let
key
=
YHButlerServiceManager
.
shared
.
guideWindowShowedKey
{
YHButlerServiceManager
.
shared
.
didShowWindowDict
[
key
]
=
true
}
let
view
=
YHConversationGuideView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
,
height
:
KScreenHeight
))
view
.
checkButtonEvent
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
self
.
princleVM
.
postAlertStatus
(
20
)
{
success
,
error
in
}
self
.
gotoYinHeManager
(
navigationController
)
}
view
.
show
()
}
}
private
func
gotoYinHeManager
(
_
navigationController
:
UINavigationController
?)
{
guard
let
userId
=
YHLoginManager
.
shared
.
userModel
?
.
id
,
userId
.
count
>
0
else
{
return
}
//YHAnalytics.track("APP_HomeTab_IntelligentAssistant")
YHButlerServiceManager
.
shared
.
gotoButlerServiceSessionVC
(
navigationController
:
navigationController
,
completion
:
{
_
in
})
}
}
galaxy/galaxy/Res/Assets.xcassets/Home/conversation_guide_icon.imageset/Contents.json
0 → 100644
View file @
bba36282
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"conversation_guide_icon@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"conversation_guide_icon@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/Home/conversation_guide_icon.imageset/conversation_guide_icon@2x.png
0 → 100644
View file @
bba36282
206 KB
galaxy/galaxy/Res/Assets.xcassets/Home/conversation_guide_icon.imageset/conversation_guide_icon@3x.png
0 → 100644
View file @
bba36282
456 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