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
ff7ed205
authored
Jul 20, 2021
by
panjiangyi
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修复ts报错
parent
168aeeff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
store/index.ts
store/index.ts
View file @
ff7ed205
...
...
@@ -288,10 +288,11 @@ export default {
commit
,
})
/* ...params: Parameters<ChatStore.ACTION_GET_MY_CHAT_LIST> */
{
const
data
=
await
xim
.
fetchChatList
();
if
(
data
==
null
)
return
const
chatList
=
data
.
args
[
0
];
console
.
log
(
"testing"
,
chatList
);
commit
(
ChatStore
.
MUTATION_SAVE_CHAT_LIST
,
{
list
:
chatList
.
map
((
chat
)
=>
{
list
:
chatList
.
map
((
chat
:
any
)
=>
{
let
business_data
;
if
(
chat
.
business_data
)
{
business_data
=
JSON
.
parse
(
chat
.
business_data
);
...
...
@@ -408,7 +409,7 @@ export default {
{
state
,
commit
,
dispatch
},
params
:
Parameters
<
ChatStore
.
ACTION_CREATE_NEW_CHAT_BY_SERVICE_MAN
>
[
0
]
)
{
const
{
id
}
=
await
sdk
().
model
(
params
.
modelName
).
createChat
({
const
{
id
}
=
await
sdk
().
model
(
params
.
modelName
).
createChat
({
detailId
:
+
params
.
selectedListId
});
await
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
500
));
...
...
@@ -557,6 +558,7 @@ export default {
.
execute
();
await
dispatch
(
ChatStore
.
ACTION_GET_MY_CHAT_LIST
);
const
firstChat
=
state
[
ChatStore
.
STATE_MY_CHAT_ROOM_LIST
]?.
list
[
0
];
if
(
firstChat
==
null
)
return
const
chatInfo
=
await
getChatModelInfo
(
firstChat
.
business_data
.
model_name
,
firstChat
.
business_data
.
obj_id
);
await
dispatch
(
ChatStore
.
ACTION_SAVE_CURRENT_CHAT_ID_VERSION
,
{
chatId
:
firstChat
.
chat_id
,
...
...
@@ -616,7 +618,7 @@ export default {
},
[
ChatStore
.
GETTER_CURRENT_CURRENT_CHAT
](
state
)
{
const
chatId
=
state
[
ChatStore
.
STATE_CHAT_CURRENT_CHAT_ID
];
const
chatList
=
state
[
ChatStore
.
STATE_MY_CHAT_ROOM_LIST
]
.
list
;
const
chatList
=
state
[
ChatStore
.
STATE_MY_CHAT_ROOM_LIST
]
?.
list
??
[]
;
return
chatList
.
find
(
chat
=>
chat
.
chat_id
===
chatId
);
},
},
...
...
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