Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
foreign
/
customer-service
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
0fa8de52
authored
Jul 26, 2021
by
panjiangyi
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
getChatModelInfo支持detail_name
parent
4d41bad9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
components/chat-list.vue
utils/chat-info.ts
xim/models/chat.ts
components/chat-list.vue
View file @
0fa8de52
...
@@ -214,7 +214,8 @@ export default class ChatList extends Vue {
...
@@ -214,7 +214,8 @@ export default class ChatList extends Vue {
}
}
const
info
=
await
getChatModelInfo
(
const
info
=
await
getChatModelInfo
(
wantedChatRoom
.
business_data
.
model_name
,
wantedChatRoom
.
business_data
.
model_name
,
wantedChatRoom
.
business_data
.
obj_id
wantedChatRoom
.
business_data
.
obj_id
,
wantedChatRoom
.
business_data
.
detail_name
);
);
await
this
.
saveChatId
({
await
this
.
saveChatId
({
chatId
:
wantedChatRoom
.
chat_id
,
chatId
:
wantedChatRoom
.
chat_id
,
...
...
utils/chat-info.ts
View file @
0fa8de52
...
@@ -7,7 +7,7 @@ const chatInfo: ChatInfo = {};
...
@@ -7,7 +7,7 @@ const chatInfo: ChatInfo = {};
export
const
getChatModel
=
()
=>
chatInfo
;
export
const
getChatModel
=
()
=>
chatInfo
;
export
async
function
getChatModelInfo
(
modelName
:
string
,
id
:
string
)
{
export
async
function
getChatModelInfo
(
modelName
:
string
,
id
:
string
,
detailname
?:
string
)
{
if
(
chatInfo
[
id
]
!=
null
)
{
if
(
chatInfo
[
id
]
!=
null
)
{
return
{
return
{
uniplatId
:
chatInfo
[
id
].
row
.
UniplatChatId
.
value
,
uniplatId
:
chatInfo
[
id
].
row
.
UniplatChatId
.
value
,
...
@@ -15,7 +15,7 @@ export async function getChatModelInfo(modelName: string, id: string) {
...
@@ -15,7 +15,7 @@ export async function getChatModelInfo(modelName: string, id: string) {
uniplat_version
:
0
,
uniplat_version
:
0
,
};
};
}
}
const
info
=
await
Chat
.
getSdk
().
model
(
modelName
).
detail
(
id
).
query
();
const
info
=
await
Chat
.
getSdk
().
model
(
modelName
).
detail
(
id
,
detailname
).
query
();
const
data
=
info
;
const
data
=
info
;
chatInfo
[
id
]
=
data
;
chatInfo
[
id
]
=
data
;
return
{
return
{
...
...
xim/models/chat.ts
View file @
0fa8de52
...
@@ -23,6 +23,7 @@ export interface Chat {
...
@@ -23,6 +23,7 @@ export interface Chat {
business_data
:
{
business_data
:
{
model_name
:
string
;
model_name
:
string
;
obj_id
:
string
;
obj_id
:
string
;
detail_name
:
string
;
};
};
is_finish
:
boolean
;
is_finish
:
boolean
;
is_deleted
:
boolean
;
is_deleted
:
boolean
;
...
...
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