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
37f9405b
Commit
37f9405b
authored
Dec 06, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// AI
parent
2fa1df59
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
124 additions
and
6 deletions
+124
-6
YHAITabBarItemContentView.swift
galaxy/galaxy/Classes/Base/V/YHAITabBarItemContentView.swift
+88
-5
YHAIServiceListViewController.swift
...I/AI-Dialogue(AI对话)/C/YHAIServiceListViewController.swift
+6
-1
YHAIMessageModel.swift
...ses/Modules/AI/AI-Dialogue(AI对话)/M/YHAIMessageModel.swift
+2
-0
YHCardMessageCell.swift
...es/Modules/AI/AI-Dialogue(AI对话)/V/YHCardMessageCell.swift
+6
-0
Contents.json
...xcassets/AI-Chat/ai_tab_down_arrow.imageset/Contents.json
+22
-0
Rectangle 346242466@2x.png
...hat/ai_tab_down_arrow.imageset/Rectangle 346242466@2x.png
+0
-0
Rectangle 346242466@3x.png
...hat/ai_tab_down_arrow.imageset/Rectangle 346242466@3x.png
+0
-0
No files found.
galaxy/galaxy/Classes/Base/V/YHAITabBarItemContentView.swift
View file @
37f9405b
...
...
@@ -10,6 +10,52 @@ import ESTabBarController_swift
class
YHAITabBarItemContentView
:
ESTabBarItemContentView
{
var
timer
:
Timer
?
lazy
var
tipsView
:
UIView
=
{
let
v
=
UIView
()
let
grayView
=
UIView
()
grayView
.
backgroundColor
=
UIColor
(
hex
:
0x000000
,
alpha
:
0.6
)
grayView
.
layer
.
cornerRadius
=
6.0
grayView
.
clipsToBounds
=
true
v
.
addSubview
(
grayView
)
let
label
=
UILabel
()
label
.
textColor
=
UIColor
.
white
label
.
textAlignment
=
.
center
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
12
)
label
.
text
=
"Hi 我是港小宝,有什么需要帮助的,来找我吧~"
grayView
.
addSubview
(
label
)
let
arrowImgV
=
UIImageView
(
image
:
UIImage
(
named
:
"ai_tab_down_arrow"
))
v
.
addSubview
(
arrowImgV
)
arrowImgV
.
snp
.
makeConstraints
{
make
in
make
.
centerX
.
equalToSuperview
()
make
.
width
.
equalTo
(
24
)
make
.
height
.
equalTo
(
6
)
make
.
bottom
.
equalTo
(
-
4
)
}
label
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
15
)
make
.
right
.
equalTo
(
-
15
)
make
.
height
.
equalTo
(
34
)
make
.
top
.
bottom
.
equalToSuperview
()
}
grayView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
0
)
make
.
right
.
equalTo
(
0
)
make
.
top
.
equalToSuperview
()
make
.
bottom
.
equalTo
(
arrowImgV
.
snp
.
top
)
}
return
v
}()
lazy
var
bottomTitleLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
textColor
=
UIColor
.
mainTextColor
...
...
@@ -26,29 +72,66 @@ class YHAITabBarItemContentView: ESTabBarItemContentView {
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
createUI
()
}
public
required
init
?(
coder
aDecoder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
}
override
func
updateLayout
()
{
super
.
updateLayout
()
}
func
createUI
()
{
self
.
removeSubviews
()
self
.
addSubview
(
iconImgView
)
self
.
addSubview
(
bottomTitleLabel
)
self
.
addSubview
(
tipsView
)
bottomTitleLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
bottom
.
equalToSuperview
()
make
.
height
.
equalTo
(
14
)
}
iconImgView
.
snp
.
makeConstraints
{
make
in
make
.
width
.
height
.
equalTo
(
48.0
)
make
.
bottom
.
equalTo
(
bottomTitleLabel
.
snp
.
top
)
make
.
centerX
.
equalToSuperview
()
}
tipsView
.
snp
.
makeConstraints
{
make
in
make
.
centerX
.
equalToSuperview
()
make
.
bottom
.
equalTo
(
iconImgView
.
snp
.
top
)
}
startTimer
()
}
public
required
init
?(
coder
aDecoder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
func
startTimer
()
{
// 每隔 1 秒调用 timerFired 方法
timer
=
Timer
.
scheduledTimer
(
timeInterval
:
5.0
,
target
:
self
,
selector
:
#selector(
timerFired
)
,
userInfo
:
nil
,
repeats
:
false
)
}
override
func
updateLayout
()
{
super
.
updateLayout
()
@objc
func
timerFired
()
{
stopTimer
()
tipsView
.
isHidden
=
true
}
// 停止定时器
func
stopTimer
()
{
timer
?
.
invalidate
()
timer
=
nil
}
deinit
{
// 确保在视图控制器被销毁时停止定时器
stopTimer
()
}
}
galaxy/galaxy/Classes/Modules/AI/AI-Dialogue(AI对话)/C/YHAIServiceListViewController.swift
View file @
37f9405b
...
...
@@ -150,7 +150,7 @@ extension YHAIServiceListViewController: UICollectionViewDelegate, UICollectionV
}
}
else
if
model
.
redirectMode
==
2
{
// customerVoice -> APP客户心声 productList -> APP-首页银河甄选
// customerVoice -> APP客户心声 productList -> APP-首页银河甄选
AppServiceTab -> 服务页
if
model
.
redirectPath
==
YHAIJumpPageType
.
customerHeart
.
rawValue
{
//客户心声
let
vc
=
YHOtherServiceViewController
()
...
...
@@ -162,6 +162,11 @@ extension YHAIServiceListViewController: UICollectionViewDelegate, UICollectionV
let
vc
=
YHSelectViewController
()
vc
.
hideFlag
=
false
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
else
if
model
.
redirectPath
==
YHAIJumpPageType
.
appServiceTab
.
rawValue
{
// 服务页
UIViewController
.
current
?
.
navigationController
?
.
popToRootViewController
(
animated
:
true
)
goTabBarBy
(
tabType
:
.
service
)
}
}
else
if
model
.
redirectMode
==
3
{
// agent
...
...
galaxy/galaxy/Classes/Modules/AI/AI-Dialogue(AI对话)/M/YHAIMessageModel.swift
View file @
37f9405b
...
...
@@ -229,8 +229,10 @@ class YHAIMessageBody: SmartCodable {
}
enum
YHAIJumpPageType
:
String
{
// customerVoice -> APP客户心声 productList -> APP-首页银河甄选 AppServiceTab -> 服务页
case
customerHeart
=
"customerVoice"
// APP客户心声
case
galaxySelect
=
"productList"
// APP-首页银河甄选
case
appServiceTab
=
"AppServiceTab"
// 服务页
}
class
YHAIListInfoModel
:
SmartCodable
{
...
...
galaxy/galaxy/Classes/Modules/AI/AI-Dialogue(AI对话)/V/YHCardMessageCell.swift
View file @
37f9405b
...
...
@@ -48,7 +48,13 @@ class YHAIJumpPageTool {
let
vc
=
YHSelectViewController
()
vc
.
hideFlag
=
false
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
else
if
path
==
YHAIJumpPageType
.
appServiceTab
.
rawValue
{
// 服务页
UIViewController
.
current
?
.
navigationController
?
.
popToRootViewController
(
animated
:
true
)
goTabBarBy
(
tabType
:
.
service
)
}
}
else
if
mode
==
3
{
}
...
...
galaxy/galaxy/Res/Assets.xcassets/AI-Chat/ai_tab_down_arrow.imageset/Contents.json
0 → 100644
View file @
37f9405b
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"filename"
:
"Rectangle 346242466@2x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"Rectangle 346242466@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/AI-Chat/ai_tab_down_arrow.imageset/Rectangle 346242466@2x.png
0 → 100644
View file @
37f9405b
315 Bytes
galaxy/galaxy/Res/Assets.xcassets/AI-Chat/ai_tab_down_arrow.imageset/Rectangle 346242466@3x.png
0 → 100644
View file @
37f9405b
409 Bytes
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