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
416518c6
Commit
416518c6
authored
Dec 03, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// AI
parent
7af5bd7c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
YHAIRequestManager.swift
...s/Modules/AI/AI-Dialogue(AI对话)/C/YHAIRequestManager.swift
+5
-2
YHAITextMessageCell.swift
.../Modules/AI/AI-Dialogue(AI对话)/V/YHAITextMessageCell.swift
+1
-1
YHProductItemView.swift
...es/Modules/AI/AI-Dialogue(AI对话)/V/YHProductItemView.swift
+3
-4
No files found.
galaxy/galaxy/Classes/Modules/AI/AI-Dialogue(AI对话)/C/YHAIRequestManager.swift
View file @
416518c6
...
...
@@ -57,7 +57,7 @@ class YHAIRequestManager: NSObject {
}
func
requestAI
(
botId
:
String
,
conversationId
:
String
,
question
:
String
=
""
,
c
ompletion
:
((
_
msg
:
YHAIChatMessage
?,
_
done
:
Bool
)
->
Void
)?)
{
func
requestAI
(
botId
:
String
,
conversationId
:
String
,
question
:
String
=
""
,
c
allback
:
((
_
msg
:
YHAIChatMessage
?,
_
done
:
Bool
)
->
Void
)?)
{
let
url
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
AIChat
.
agentChat
self
.
uuid
=
UUID
()
.
uuidString
+
NSDate
()
.
timeIntervalSince1970
.
description
...
...
@@ -90,14 +90,17 @@ class YHAIRequestManager: NSObject {
print
(
string
)
self
.
handle
(
dataString
:
string
)
{
response
,
done
in
c
ompletion
?(
response
,
done
)
c
allback
?(
response
,
done
)
}
case
let
.
failure
(
error
):
print
(
"
\(
error
)
"
)
callback
?(
nil
,
true
)
}
case
let
.
complete
(
completion
):
print
(
"COMPLETE"
)
callback
?(
nil
,
true
)
if
let
af_error
=
completion
.
error
{
if
let
error
=
af_error
.
underlyingError
{
...
...
galaxy/galaxy/Classes/Modules/AI/AI-Dialogue(AI对话)/V/YHAITextMessageCell.swift
View file @
416518c6
...
...
@@ -50,7 +50,7 @@ class YHAITextMessageCell: UITableViewCell {
whiteContentView
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
equalTo
(
20
)
make
.
right
.
lessThanOrE
qualTo
(
-
20
)
make
.
right
.
e
qualTo
(
-
20
)
make
.
top
.
equalTo
(
20
)
make
.
bottom
.
equalTo
(
0
)
}
...
...
galaxy/galaxy/Classes/Modules/AI/AI-Dialogue(AI对话)/V/YHProductItemView.swift
View file @
416518c6
...
...
@@ -149,10 +149,10 @@ class YHProductTagView: UIView {
didSet
{
tagLabel
.
text
=
tagModel
.
text
if
!
tagModel
.
color
.
isEmpty
{
tagLabel
.
layer
.
borderColor
=
UIColor
(
hexString
:
tagModel
.
color
,
transparency
:
0.3
)?
.
cgColor
self
.
layer
.
borderColor
=
UIColor
(
hexString
:
tagModel
.
color
,
transparency
:
0.3
)?
.
cgColor
tagLabel
.
textColor
=
UIColor
(
hexString
:
tagModel
.
color
)
}
else
{
tagLabel
.
layer
.
borderColor
=
UIColor
.
mainTextColor
(
alpha
:
0.3
)
.
cgColor
self
.
layer
.
borderColor
=
UIColor
.
mainTextColor
(
alpha
:
0.3
)
.
cgColor
tagLabel
.
textColor
=
UIColor
.
mainTextColor
}
self
.
setNeedsLayout
()
...
...
@@ -165,7 +165,6 @@ class YHProductTagView: UIView {
lable
.
textColor
=
UIColor
.
mainTextColor
lable
.
textAlignment
=
.
center
lable
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
10
)
lable
.
layer
.
borderWidth
=
0.5
return
lable
}()
...
...
@@ -178,8 +177,8 @@ class YHProductTagView: UIView {
super
.
init
(
coder
:
coder
)
}
func
createUI
()
{
self
.
layer
.
borderColor
=
UIColor
.
mainTextColor
.
cgColor
self
.
layer
.
borderWidth
=
0.5
self
.
clipsToBounds
=
true
...
...
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