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
b469c5a8
authored
Jul 26, 2021
by
panjiangyi
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修改创建会话的逻辑
parent
3f8c4d69
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
16 deletions
store/index.ts
store/index.ts
View file @
b469c5a8
...
...
@@ -395,30 +395,22 @@ export default {
commit
(
ChatStore
.
MUTATION_SCROLL_TO_BOTTOM
);
},
async
[
ChatStore
.
ACTION_CREATE_NEW_CHAT_BY_SERVICE_MAN
](
{
state
,
commit
,
dispatch
},
{
commit
,
dispatch
},
params
:
Parameters
<
ChatStore
.
ACTION_CREATE_NEW_CHAT_BY_SERVICE_MAN
>
[
0
]
)
{
const
{
id
}
=
await
sdk
()
const
{
id
,
ImChatId
,
uniplat_version
}
=
await
sdk
()
.
model
(
params
.
modelName
)
.
chat
(
+
params
.
selectedListId
)
.
createChat
();
await
new
Promise
((
resolve
)
=>
setTimeout
(
resolve
,
500
));
const
uniplatId
=
id
.
value
;
const
chatId
=
ImChatId
.
value
;
const
v
=
uniplat_version
.
value
;
await
dispatch
(
ChatStore
.
ACTION_GET_MY_CHAT_LIST
);
const
newChatInfo
=
await
getChatModelInfo
(
params
.
modelName
,
params
.
selectedListId
);
const
roomList
=
state
[
ChatStore
.
STATE_MY_CHAT_ROOM_LIST
];
if
(
roomList
==
null
)
return
;
const
newChat
=
roomList
.
list
.
find
(
(
k
)
=>
k
.
chat_id
===
newChatInfo
.
chat_id
);
if
(
newChat
==
null
)
return
;
commit
(
ChatStore
.
MUTATION_SHOW_CHAT
);
await
dispatch
(
ChatStore
.
ACTION_SAVE_CURRENT_CHAT_ID_VERSION
,
{
chatId
:
newChat
.
chat_id
,
v
:
newChatInfo
.
uniplat_version
,
uniplatId
:
id
,
chatId
,
v
,
uniplatId
});
},
// async [ChatStore.ACTION_CREATE_NEW_CHAT_BY_CLIENT_SIDE](
...
...
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