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
2345161a
Commit
2345161a
authored
Dec 05, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// AI
parent
00f40aeb
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
58 additions
and
35 deletions
+58
-35
YHAIRobotChatViewController.swift
.../AI/AI-Dialogue(AI对话)/C/YHAIRobotChatViewController.swift
+23
-0
YHAIChatBannerItemCell.swift
...dules/AI/AI-Dialogue(AI对话)/V/YHAIChatBannerItemCell.swift
+1
-0
YHAIChatBannerView.swift
...s/Modules/AI/AI-Dialogue(AI对话)/V/YHAIChatBannerView.swift
+32
-33
Contents.json
...xcassets/AI-Chat/ai_chat_header_bg.imageset/Contents.json
+2
-2
Mask group@2x.png
...sets/AI-Chat/ai_chat_header_bg.imageset/Mask group@2x.png
+0
-0
Mask group@3x.png
...sets/AI-Chat/ai_chat_header_bg.imageset/Mask group@3x.png
+0
-0
卡片切图@2x.png
...s.xcassets/AI-Chat/ai_chat_header_bg.imageset/卡片切图@2x.png
+0
-0
卡片切图@3x.png
...s.xcassets/AI-Chat/ai_chat_header_bg.imageset/卡片切图@3x.png
+0
-0
No files found.
galaxy/galaxy/Classes/Modules/AI/AI-Dialogue(AI对话)/C/YHAIRobotChatViewController.swift
View file @
2345161a
...
@@ -239,6 +239,27 @@ class YHAIRobotChatViewController: YHBaseViewController {
...
@@ -239,6 +239,27 @@ class YHAIRobotChatViewController: YHBaseViewController {
}
}
return
[]
return
[]
}
}
func
getHeaderTitle
()
->
String
{
if
robotType
==
YHAYRobotType
.
education
.
rawValue
{
return
"Hello,我是香港教育宝"
}
else
if
robotType
==
YHAYRobotType
.
sale
.
rawValue
{
return
"Hello,我是新港生活规划师"
}
return
""
}
func
getHeaderDesc
()
->
String
{
if
robotType
==
YHAYRobotType
.
education
.
rawValue
{
return
"有香港教育的问题尽管问我"
}
else
if
robotType
==
YHAYRobotType
.
sale
.
rawValue
{
return
"香港身份办理问题可以找我"
}
return
""
}
}
}
extension
YHAIRobotChatViewController
:
UITableViewDelegate
,
UITableViewDataSource
{
extension
YHAIRobotChatViewController
:
UITableViewDelegate
,
UITableViewDataSource
{
...
@@ -344,6 +365,8 @@ extension YHAIRobotChatViewController: UITableViewDelegate, UITableViewDataSourc
...
@@ -344,6 +365,8 @@ extension YHAIRobotChatViewController: UITableViewDelegate, UITableViewDataSourc
}
}
let
view
=
YHAIChatBannerView
()
let
view
=
YHAIChatBannerView
()
view
.
titleLabel
.
text
=
getHeaderTitle
()
view
.
descLabel
.
text
=
getHeaderDesc
()
view
.
bannerArr
=
self
.
getBannerForRobotType
(
robotType
)
view
.
bannerArr
=
self
.
getBannerForRobotType
(
robotType
)
view
.
messages
=
getFlowMessages
()
view
.
messages
=
getFlowMessages
()
view
.
selectFlowMsgBlock
=
{
view
.
selectFlowMsgBlock
=
{
...
...
galaxy/galaxy/Classes/Modules/AI/AI-Dialogue(AI对话)/V/YHAIChatBannerItemCell.swift
View file @
2345161a
...
@@ -26,6 +26,7 @@ class YHAIChatBannerItemCell: FSPagerViewCell {
...
@@ -26,6 +26,7 @@ class YHAIChatBannerItemCell: FSPagerViewCell {
visualEffectView
.
colorTint
=
UIColor
(
hex
:
0xAFAFAF
)
.
withAlphaComponent
(
0.15
)
visualEffectView
.
colorTint
=
UIColor
(
hex
:
0xAFAFAF
)
.
withAlphaComponent
(
0.15
)
visualEffectView
.
blurRadius
=
16
visualEffectView
.
blurRadius
=
16
visualEffectView
.
scale
=
1
visualEffectView
.
scale
=
1
visualEffectView
.
isHidden
=
true
return
visualEffectView
return
visualEffectView
}()
}()
...
...
galaxy/galaxy/Classes/Modules/AI/AI-Dialogue(AI对话)/V/YHAIChatBannerView.swift
View file @
2345161a
...
@@ -37,27 +37,28 @@ class YHAIChatBannerView: UIView {
...
@@ -37,27 +37,28 @@ class YHAIChatBannerView: UIView {
}
}
}
}
lazy
var
bgImgV
:
UIImageView
=
{
lazy
var
titleLabel
:
UILabel
=
{
let
imagV
:
UIImageView
=
UIImageView
()
let
lable
=
UILabel
()
imagV
.
contentMode
=
.
scaleAspectFill
lable
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
12
)
imagV
.
clipsToBounds
=
true
lable
.
textColor
=
UIColor
.
init
(
hex
:
0x6D788A
)
imagV
.
image
=
UIImage
(
named
:
"ai_chat_header_bg"
)
lable
.
text
=
"Hello,我是新港生活规划师"
return
imagV
return
lable
}()
}()
lazy
var
rolerImgV
:
UIImageView
=
{
lazy
var
descLabel
:
UILabel
=
{
let
imagV
:
UIImageView
=
UIImageView
()
let
lable
=
UILabel
()
imagV
.
contentMode
=
.
scaleAspectFill
lable
.
font
=
UIFont
.
PFSC_B
(
ofSize
:
15
)
imagV
.
clipsToBounds
=
true
lable
.
textColor
=
UIColor
.
mainTextColor
imagV
.
image
=
UIImage
(
named
:
"ai_chat_header_role"
)
lable
.
text
=
"需要香港身份办理找我~"
return
imagV
return
lable
}()
}()
lazy
var
arrow
ImgV
:
UIImageView
=
{
lazy
var
bg
ImgV
:
UIImageView
=
{
let
imagV
:
UIImageView
=
UIImageView
()
let
imagV
:
UIImageView
=
UIImageView
()
imagV
.
contentMode
=
.
scaleAspectFill
imagV
.
contentMode
=
.
scaleAspectFill
imagV
.
clipsToBounds
=
true
imagV
.
clipsToBounds
=
true
imagV
.
image
=
UIImage
(
named
:
"ai_chat_heaer_banner_arrow"
)
imagV
.
image
=
UIImage
(
named
:
"ai_chat_header_bg"
)
imagV
.
isUserInteractionEnabled
=
true
return
imagV
return
imagV
}()
}()
...
@@ -130,46 +131,44 @@ class YHAIChatBannerView: UIView {
...
@@ -130,46 +131,44 @@ class YHAIChatBannerView: UIView {
func
createUI
()
{
func
createUI
()
{
addSubview
(
bgImgV
)
addSubview
(
bgImgV
)
addSubview
(
rolerImgV
)
bgImgV
.
addSubview
(
titleLabel
)
addSubview
(
bannerView
)
bgImgV
.
addSubview
(
descLabel
)
bgImgV
.
addSubview
(
bannerView
)
bannerView
.
addSubview
(
indicatorView
)
bannerView
.
addSubview
(
indicatorView
)
bannerView
.
addSubview
(
arrowImgV
)
bgImgV
.
snp
.
makeConstraints
{
make
in
bgImgV
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
0
)
make
.
top
.
equalTo
(
0
)
make
.
left
.
equalTo
(
20
)
make
.
left
.
equalTo
(
20
)
make
.
right
.
equalTo
(
-
20
)
make
.
right
.
equalTo
(
-
20
)
make
.
height
.
equalTo
(
2
09
)
make
.
height
.
equalTo
(
2
42
)
}
}
rolerImgV
.
snp
.
makeConstraints
{
make
in
titleLabel
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
10
)
make
.
top
.
equalTo
(
57
)
make
.
right
.
equalTo
(
-
20
)
make
.
left
.
equalTo
(
20
)
make
.
width
.
equalTo
(
180
)
make
.
height
.
equalTo
(
20
)
make
.
height
.
equalTo
(
180
)
}
descLabel
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
titleLabel
.
snp
.
bottom
)
make
.
left
.
equalTo
(
20
)
make
.
height
.
equalTo
(
24
)
}
}
bannerView
.
snp
.
makeConstraints
{
make
in
bannerView
.
snp
.
makeConstraints
{
make
in
make
.
bottom
.
equalTo
(
bgImgV
)
make
.
bottom
.
equalTo
(
bgImgV
)
make
.
left
.
equalTo
(
22
)
make
.
left
.
equalTo
(
0
)
make
.
right
.
equalTo
(
-
22
)
make
.
right
.
equalTo
(
0
)
make
.
height
.
equalTo
(
YHAIChatBannerView
.
bannersHeight
)
make
.
height
.
equalTo
(
YHAIChatBannerView
.
bannersHeight
)
}
}
indicatorView
.
snp
.
makeConstraints
{
make
in
indicatorView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalToSuperview
()
make
.
left
.
right
.
equalToSuperview
()
make
.
height
.
equalTo
(
2
)
make
.
height
.
equalTo
(
2
)
make
.
bottom
.
equalTo
(
-
1
4
)
make
.
bottom
.
equalTo
(
-
1
6
)
}
}
bannerView
.
reloadData
()
bannerView
.
reloadData
()
arrowImgV
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalTo
(
-
20
)
make
.
width
.
equalTo
(
12
)
make
.
height
.
equalTo
(
4
)
make
.
bottom
.
equalTo
(
-
40
)
}
addSubview
(
collectionView
)
addSubview
(
collectionView
)
collectionView
.
snp
.
makeConstraints
{
make
in
collectionView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
20
)
make
.
left
.
equalTo
(
20
)
...
...
galaxy/galaxy/Res/Assets.xcassets/AI-Chat/ai_chat_header_bg.imageset/Contents.json
View file @
2345161a
...
@@ -5,12 +5,12 @@
...
@@ -5,12 +5,12 @@
"scale"
:
"1x"
"scale"
:
"1x"
},
},
{
{
"filename"
:
"
Mask group
@2x.png"
,
"filename"
:
"
卡片切图
@2x.png"
,
"idiom"
:
"universal"
,
"idiom"
:
"universal"
,
"scale"
:
"2x"
"scale"
:
"2x"
},
},
{
{
"filename"
:
"
Mask group
@3x.png"
,
"filename"
:
"
卡片切图
@3x.png"
,
"idiom"
:
"universal"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
"scale"
:
"3x"
}
}
...
...
galaxy/galaxy/Res/Assets.xcassets/AI-Chat/ai_chat_header_bg.imageset/Mask group@2x.png
deleted
100644 → 0
View file @
00f40aeb
350 KB
galaxy/galaxy/Res/Assets.xcassets/AI-Chat/ai_chat_header_bg.imageset/Mask group@3x.png
deleted
100644 → 0
View file @
00f40aeb
739 KB
galaxy/galaxy/Res/Assets.xcassets/AI-Chat/ai_chat_header_bg.imageset/卡片切图@2x.png
0 → 100644
View file @
2345161a
221 KB
galaxy/galaxy/Res/Assets.xcassets/AI-Chat/ai_chat_header_bg.imageset/卡片切图@3x.png
0 → 100644
View file @
2345161a
457 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