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
6bbc7551
authored
Oct 15, 2021
by
Sixong.Zhu
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
update
parent
058ab68c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
store/index.ts
store/model.ts
store/index.ts
View file @
6bbc7551
...
@@ -524,7 +524,7 @@ export default {
...
@@ -524,7 +524,7 @@ export default {
{
commit
,
dispatch
},
{
commit
,
dispatch
},
params
:
Parameters
<
ChatStore
.
ACTION_CREATE_NEW_CHAT_BY_SERVICE_MAN
>
[
0
]
params
:
Parameters
<
ChatStore
.
ACTION_CREATE_NEW_CHAT_BY_SERVICE_MAN
>
[
0
]
)
{
)
{
const
{
imChatId
}
=
await
Chat
.
getSdk
()
const
{
imChatId
,
catalog
}
=
await
Chat
.
getSdk
()
.
model
(
params
.
modelName
)
.
model
(
params
.
modelName
)
.
chat
(
+
params
.
selectedListId
,
orgId
())
.
chat
(
+
params
.
selectedListId
,
orgId
())
.
createChat
();
.
createChat
();
...
@@ -535,6 +535,7 @@ export default {
...
@@ -535,6 +535,7 @@ export default {
ChatStore
.
ACTION_SAVE_CURRENT_CHAT_ID_VERSION
,
ChatStore
.
ACTION_SAVE_CURRENT_CHAT_ID_VERSION
,
chatId
chatId
);
);
return
{
chatId
,
catalog
};
},
},
async
[
ChatStore
.
ACTION_CREATE_NEW_CHAT_BY_CLIENT
](
async
[
ChatStore
.
ACTION_CREATE_NEW_CHAT_BY_CLIENT
](
{
commit
,
dispatch
},
{
commit
,
dispatch
},
...
@@ -552,6 +553,7 @@ export default {
...
@@ -552,6 +553,7 @@ export default {
);
);
// 打开会话后获取一下会话列表,刷新未读消息
// 打开会话后获取一下会话列表,刷新未读消息
dispatch
(
ChatStore
.
ACTION_GET_MY_CHAT_LIST
);
dispatch
(
ChatStore
.
ACTION_GET_MY_CHAT_LIST
);
return
chatId
;
},
},
async
[
ChatStore
.
ACTION_REGISTER_EVENT
]({
dispatch
,
commit
,
state
})
{
async
[
ChatStore
.
ACTION_REGISTER_EVENT
]({
dispatch
,
commit
,
state
})
{
const
chatId
=
state
[
ChatStore
.
STATE_CHAT_CURRENT_CHAT_ID
];
const
chatId
=
state
[
ChatStore
.
STATE_CHAT_CURRENT_CHAT_ID
];
...
...
store/model.ts
View file @
6bbc7551
...
@@ -278,14 +278,14 @@ export namespace ChatStore {
...
@@ -278,14 +278,14 @@ export namespace ChatStore {
selectedListId
:
string
;
selectedListId
:
string
;
uids
:
string
[];
uids
:
string
[];
showByPage
?:
boolean
;
showByPage
?:
boolean
;
})
=>
Promise
<
void
>
;
})
=>
Promise
<
{
chat
:
number
;
catalog
:
string
}
>
;
export
const
ACTION_CREATE_NEW_CHAT_BY_CLIENT
=
"顾客向客服发起新会话"
;
export
const
ACTION_CREATE_NEW_CHAT_BY_CLIENT
=
"顾客向客服发起新会话"
;
export
type
ACTION_CREATE_NEW_CHAT_BY_CLIENT
=
(
params
:
{
export
type
ACTION_CREATE_NEW_CHAT_BY_CLIENT
=
(
params
:
{
modelName
:
string
;
modelName
:
string
;
selectedListId
:
string
;
selectedListId
:
string
;
uids
:
string
[];
uids
:
string
[];
})
=>
Promise
<
void
>
;
})
=>
Promise
<
number
>
;
export
const
ACTION_CREATE_NEW_CHAT_BY_CLIENT_SIDE
=
export
const
ACTION_CREATE_NEW_CHAT_BY_CLIENT_SIDE
=
"startNewConversationByCustomerSide"
;
"startNewConversationByCustomerSide"
;
...
@@ -381,7 +381,7 @@ export interface ChatStoreState {
...
@@ -381,7 +381,7 @@ export interface ChatStoreState {
[
ChatStore
.
STATE_CHAT_CURRENT_USER_TYPE
]:
ChatStore
.
STATE_CHAT_CURRENT_USER_TYPE
;
[
ChatStore
.
STATE_CHAT_CURRENT_USER_TYPE
]:
ChatStore
.
STATE_CHAT_CURRENT_USER_TYPE
;
[
ChatStore
.
STATE_CHAT_SEND_FAIL_MESSAGE
]:
ChatStore
.
STATE_CHAT_SEND_FAIL_MESSAGE
;
[
ChatStore
.
STATE_CHAT_SEND_FAIL_MESSAGE
]:
ChatStore
.
STATE_CHAT_SEND_FAIL_MESSAGE
;
[
ChatStore
.
STATE_CHAT_USERNAME
]:
ChatStore
.
STATE_CHAT_USERNAME
;
[
ChatStore
.
STATE_CHAT_USERNAME
]:
ChatStore
.
STATE_CHAT_USERNAME
;
[
ChatStore
.
STATE_CURRENT_UNREAD_MESSAGE_COUNT
]
:
ChatStore
.
STATE_CURRENT_UNREAD_MESSAGE_COUNT
;
[
ChatStore
.
STATE_CURRENT_UNREAD_MESSAGE_COUNT
]:
ChatStore
.
STATE_CURRENT_UNREAD_MESSAGE_COUNT
;
}
}
export
const
chatStore
=
namespace
(
ChatStore
.
ns
);
export
const
chatStore
=
namespace
(
ChatStore
.
ns
);
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