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
3ff9fc8d
Commit
3ff9fc8d
authored
Nov 27, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// AI
parent
11f57f60
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
2 deletions
+36
-2
YHAIServiceListViewController.swift
...I/AI-Dialogue(AI对话)/C/YHAIServiceListViewController.swift
+3
-1
YHAITabViewController.swift
...odules/AI/AI-Dialogue(AI对话)/C/YHAITabViewController.swift
+12
-0
YHAIProductCell.swift
...sses/Modules/AI/AI-Dialogue(AI对话)/V/YHAIProductCell.swift
+0
-1
Contents.json
...ssets/AI-Chat/ai_product_list_head.imageset/Contents.json
+21
-0
头部背景图.png
....xcassets/AI-Chat/ai_product_list_head.imageset/头部背景图.png
+0
-0
No files found.
galaxy/galaxy/Classes/Modules/AI/AI-Dialogue(AI对话)/C/YHAIServiceListViewController.swift
View file @
3ff9fc8d
...
@@ -68,7 +68,9 @@ extension YHAIServiceListViewController: UICollectionViewDelegate, UICollectionV
...
@@ -68,7 +68,9 @@ extension YHAIServiceListViewController: UICollectionViewDelegate, UICollectionV
// 返回每个单元格的大小
// 返回每个单元格的大小
func
collectionView
(
_
collectionView
:
UICollectionView
,
layout
collectionViewLayout
:
UICollectionViewLayout
,
sizeForItemAt
indexPath
:
IndexPath
)
->
CGSize
{
func
collectionView
(
_
collectionView
:
UICollectionView
,
layout
collectionViewLayout
:
UICollectionViewLayout
,
sizeForItemAt
indexPath
:
IndexPath
)
->
CGSize
{
return
CGSize
(
width
:
floor
((
KScreenWidth
-
16.0
*
2.0
-
10.0
)
/
2.0
),
height
:
178.0
)
let
width
=
floor
((
KScreenWidth
-
16.0
*
2.0
-
10.0
)
/
2.0
)
let
height
=
width
*
(
194.0
/
157.0
)
return
CGSize
(
width
:
width
,
height
:
height
)
}
}
// 返回自定义单元格
// 返回自定义单元格
...
...
galaxy/galaxy/Classes/Modules/AI/AI-Dialogue(AI对话)/C/YHAITabViewController.swift
View file @
3ff9fc8d
...
@@ -16,6 +16,11 @@ class YHAITabViewController: YHBaseViewController {
...
@@ -16,6 +16,11 @@ class YHAITabViewController: YHBaseViewController {
let
arrItemTitles
=
[
"银河AI"
,
"AI"
]
let
arrItemTitles
=
[
"银河AI"
,
"AI"
]
var
arrItemVCs
:
[
YHBaseViewController
]
=
[]
var
arrItemVCs
:
[
YHBaseViewController
]
=
[]
lazy
var
headerImgView
:
UIImageView
=
{
let
v
=
UIImageView
(
image
:
UIImage
(
named
:
"ai_product_list_head"
))
return
v
}()
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
...
@@ -56,6 +61,8 @@ class YHAITabViewController: YHBaseViewController {
...
@@ -56,6 +61,8 @@ class YHAITabViewController: YHBaseViewController {
func
createUI
()
{
func
createUI
()
{
view
.
addSubview
(
headerImgView
)
for
i
in
0
..<
arrItemTitles
.
count
{
for
i
in
0
..<
arrItemTitles
.
count
{
if
i
==
0
{
// 银河AI
if
i
==
0
{
// 银河AI
let
vc
=
YHAIServiceListViewController
()
let
vc
=
YHAIServiceListViewController
()
...
@@ -88,6 +95,11 @@ class YHAITabViewController: YHBaseViewController {
...
@@ -88,6 +95,11 @@ class YHAITabViewController: YHBaseViewController {
segmentedView
.
indicators
=
[
indicator
]
segmentedView
.
indicators
=
[
indicator
]
segmentedView
.
defaultSelectedIndex
=
defaltIndex
segmentedView
.
defaultSelectedIndex
=
defaltIndex
headerImgView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
left
.
right
.
equalToSuperview
()
make
.
height
.
equalTo
(
269
)
}
let
segmentHeight
=
29.0
let
segmentHeight
=
29.0
segmentedView
.
snp
.
makeConstraints
{
make
in
segmentedView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalToSuperview
()
make
.
left
.
right
.
equalToSuperview
()
...
...
galaxy/galaxy/Classes/Modules/AI/AI-Dialogue(AI对话)/V/YHAIProductCell.swift
View file @
3ff9fc8d
...
@@ -83,7 +83,6 @@ class YHAIProductCell: UICollectionViewCell {
...
@@ -83,7 +83,6 @@ class YHAIProductCell: UICollectionViewCell {
backgroundColor
=
.
clear
backgroundColor
=
.
clear
contentView
.
addSubview
(
bgImgView
)
contentView
.
addSubview
(
bgImgView
)
bgImgView
.
addSubview
(
iconView
)
bgImgView
.
addSubview
(
titleLabel
)
bgImgView
.
addSubview
(
titleLabel
)
bgImgView
.
addSubview
(
subtitleLabel
)
bgImgView
.
addSubview
(
subtitleLabel
)
bgImgView
.
addSubview
(
blackButton
)
bgImgView
.
addSubview
(
blackButton
)
...
...
galaxy/galaxy/Res/Assets.xcassets/AI-Chat/ai_product_list_head.imageset/Contents.json
0 → 100644
View file @
3ff9fc8d
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"头部背景图.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
galaxy/galaxy/Res/Assets.xcassets/AI-Chat/ai_product_list_head.imageset/头部背景图.png
0 → 100644
View file @
3ff9fc8d
776 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