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
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
store/index.ts
store/index.ts
View file @
ff7ed205
...
@@ -288,10 +288,11 @@ export default {
...
@@ -288,10 +288,11 @@ export default {
commit
,
commit
,
})
/* ...params: Parameters<ChatStore.ACTION_GET_MY_CHAT_LIST> */
{
})
/* ...params: Parameters<ChatStore.ACTION_GET_MY_CHAT_LIST> */
{
const
data
=
await
xim
.
fetchChatList
();
const
data
=
await
xim
.
fetchChatList
();
if
(
data
==
null
)
return
const
chatList
=
data
.
args
[
0
];
const
chatList
=
data
.
args
[
0
];
console
.
log
(
"testing"
,
chatList
);
console
.
log
(
"testing"
,
chatList
);
commit
(
ChatStore
.
MUTATION_SAVE_CHAT_LIST
,
{
commit
(
ChatStore
.
MUTATION_SAVE_CHAT_LIST
,
{
list
:
chatList
.
map
((
chat
)
=>
{
list
:
chatList
.
map
((
chat
:
any
)
=>
{
let
business_data
;
let
business_data
;
if
(
chat
.
business_data
)
{
if
(
chat
.
business_data
)
{
business_data
=
JSON
.
parse
(
chat
.
business_data
);
business_data
=
JSON
.
parse
(
chat
.
business_data
);
...
@@ -557,6 +558,7 @@ export default {
...
@@ -557,6 +558,7 @@ export default {
.
execute
();
.
execute
();
await
dispatch
(
ChatStore
.
ACTION_GET_MY_CHAT_LIST
);
await
dispatch
(
ChatStore
.
ACTION_GET_MY_CHAT_LIST
);
const
firstChat
=
state
[
ChatStore
.
STATE_MY_CHAT_ROOM_LIST
]?.
list
[
0
];
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
);
const
chatInfo
=
await
getChatModelInfo
(
firstChat
.
business_data
.
model_name
,
firstChat
.
business_data
.
obj_id
);
await
dispatch
(
ChatStore
.
ACTION_SAVE_CURRENT_CHAT_ID_VERSION
,
{
await
dispatch
(
ChatStore
.
ACTION_SAVE_CURRENT_CHAT_ID_VERSION
,
{
chatId
:
firstChat
.
chat_id
,
chatId
:
firstChat
.
chat_id
,
...
@@ -616,7 +618,7 @@ export default {
...
@@ -616,7 +618,7 @@ export default {
},
},
[
ChatStore
.
GETTER_CURRENT_CURRENT_CHAT
](
state
)
{
[
ChatStore
.
GETTER_CURRENT_CURRENT_CHAT
](
state
)
{
const
chatId
=
state
[
ChatStore
.
STATE_CHAT_CURRENT_CHAT_ID
];
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
);
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