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
43f328da
Commit
43f328da
authored
Dec 06, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// AI
parent
37f9405b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
20 deletions
+27
-20
YHAIProductCell.swift
...sses/Modules/AI/AI-Dialogue(AI对话)/V/YHAIProductCell.swift
+27
-20
No files found.
galaxy/galaxy/Classes/Modules/AI/AI-Dialogue(AI对话)/V/YHAIProductCell.swift
View file @
43f328da
...
...
@@ -17,9 +17,9 @@ class YHAIProductCell: UICollectionViewCell {
titleLabel
.
text
=
model
.
title
subtitleLabel
.
text
=
model
.
description
if
!
model
.
btnText
.
isEmpty
{
black
Button
.
setTitle
(
model
.
btnText
,
for
:
.
normal
)
black
TitleLabel
.
text
=
model
.
btnText
}
else
{
black
Button
.
setTitle
(
"去了解"
,
for
:
.
normal
)
black
TitleLabel
.
text
=
"去了解"
}
bgImgView
.
sd_setImage
(
with
:
URL
(
string
:
model
.
cover
),
placeholderImage
:
UIImage
(
named
:
"ai_product_bg_default"
))
}
...
...
@@ -48,22 +48,29 @@ class YHAIProductCell: UICollectionViewCell {
return
lable
}()
lazy
var
blackButton
:
UIButton
=
{
let
btn
=
UIButton
(
type
:
.
custom
)
btn
.
setTitle
(
"去了解"
,
for
:
.
normal
)
btn
.
setTitleColor
(
.
white
,
for
:
.
normal
)
btn
.
titleLabel
?
.
font
=
.
PFSC_M
(
ofSize
:
11
)
btn
.
backgroundColor
=
.
black
btn
.
addTarget
(
self
,
action
:
#selector(
didSendButtonClicked
)
,
for
:
.
touchUpInside
)
btn
.
YH_clickEdgeInsets
=
UIEdgeInsets
(
top
:
20
,
left
:
20
,
bottom
:
20
,
right
:
20
)
btn
.
layer
.
cornerRadius
=
13.0
btn
.
clipsToBounds
=
true
return
btn
lazy
var
blackView
:
UIView
=
{
let
v
=
UIView
()
v
.
backgroundColor
=
.
black
v
.
layer
.
cornerRadius
=
13.0
v
.
clipsToBounds
=
true
v
.
addSubview
(
blackTitleLabel
)
blackTitleLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
10
)
make
.
right
.
equalTo
(
-
10
)
make
.
top
.
bottom
.
equalToSuperview
()
}
return
v
}()
@objc
func
didSendButtonClicked
()
{
}
lazy
var
blackTitleLabel
:
UILabel
=
{
let
lable
=
UILabel
()
lable
.
textColor
=
UIColor
.
white
lable
.
textAlignment
=
.
left
lable
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
11
)
lable
.
text
=
"去了解"
return
lable
}()
required
init
?(
coder
:
NSCoder
)
{
super
.
init
(
coder
:
coder
)
...
...
@@ -82,7 +89,7 @@ class YHAIProductCell: UICollectionViewCell {
contentView
.
addSubview
(
bgImgView
)
bgImgView
.
addSubview
(
titleLabel
)
bgImgView
.
addSubview
(
subtitleLabel
)
bgImgView
.
addSubview
(
black
Button
)
bgImgView
.
addSubview
(
black
View
)
bgImgView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
0
)
...
...
@@ -101,14 +108,14 @@ class YHAIProductCell: UICollectionViewCell {
subtitleLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
22
)
make
.
right
.
equalTo
(
-
22
)
make
.
bottom
.
equalTo
(
black
Button
.
snp
.
top
)
.
offset
(
-
12
)
make
.
bottom
.
equalTo
(
black
View
.
snp
.
top
)
.
offset
(
-
12
)
}
black
Button
.
snp
.
makeConstraints
{
make
in
black
View
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
22
)
make
.
bottom
.
equalTo
(
-
24
)
make
.
height
.
equalTo
(
26
)
make
.
width
.
equalTo
(
54
)
make
.
right
.
lessThanOrEqualTo
(
-
22
)
}
}
...
...
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